From 5d9836bbeafb364eefc2f4755334ba4da938f714 Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Thu, 26 Mar 2026 09:59:44 +0000 Subject: [PATCH 1/7] Add AWS Parameter Store support to TriggerAuthentication Signed-off-by: Julia Jablonska --- .../v1alpha1/triggerauthentication_types.go | 33 + ...keda.sh_clustertriggerauthentications.yaml | 131 + .../bases/keda.sh_triggerauthentications.yaml | 131 + go.mod | 1 + go.sum | 2 + .../resolver/aws_parameterstore_handler.go | 118 + .../aws_parameterstore_handler_test.go | 102 + pkg/scaling/resolver/scale_resolvers.go | 18 + .../aws-sdk-go-v2/aws/go_module_metadata.go | 4 + .../internal/configsources/CHANGELOG.md | 3 + .../configsources/go_module_metadata.go | 4 + .../internal/endpoints/v2/CHANGELOG.md | 3 + .../endpoints/v2/go_module_metadata.go | 4 + .../aws-sdk-go-v2/service/ssm/CHANGELOG.md | 891 + .../aws/aws-sdk-go-v2/service/ssm/LICENSE.txt | 202 + .../aws-sdk-go-v2/service/ssm/api_client.go | 966 + .../service/ssm/api_op_AddTagsToResource.go | 226 + .../ssm/api_op_AssociateOpsItemRelatedItem.go | 181 + .../service/ssm/api_op_CancelCommand.go | 161 + ...api_op_CancelMaintenanceWindowExecution.go | 158 + .../service/ssm/api_op_CreateActivation.go | 234 + .../service/ssm/api_op_CreateAssociation.go | 370 + .../ssm/api_op_CreateAssociationBatch.go | 183 + .../service/ssm/api_op_CreateDocument.go | 255 + .../ssm/api_op_CreateMaintenanceWindow.go | 282 + .../service/ssm/api_op_CreateOpsItem.go | 290 + .../service/ssm/api_op_CreateOpsMetadata.go | 175 + .../service/ssm/api_op_CreatePatchBaseline.go | 305 + .../ssm/api_op_CreateResourceDataSync.go | 197 + .../service/ssm/api_op_DeleteActivation.go | 155 + .../service/ssm/api_op_DeleteAssociation.go | 169 + .../service/ssm/api_op_DeleteDocument.go | 170 + .../service/ssm/api_op_DeleteInventory.go | 231 + .../ssm/api_op_DeleteMaintenanceWindow.go | 156 + .../service/ssm/api_op_DeleteOpsItem.go | 175 + .../service/ssm/api_op_DeleteOpsMetadata.go | 152 + .../service/ssm/api_op_DeleteParameter.go | 156 + .../service/ssm/api_op_DeleteParameters.go | 165 + .../service/ssm/api_op_DeletePatchBaseline.go | 156 + .../ssm/api_op_DeleteResourceDataSync.go | 157 + .../ssm/api_op_DeleteResourcePolicy.go | 177 + .../ssm/api_op_DeregisterManagedInstance.go | 161 + ...op_DeregisterPatchBaselineForPatchGroup.go | 164 + ...p_DeregisterTargetFromMaintenanceWindow.go | 169 + ..._op_DeregisterTaskFromMaintenanceWindow.go | 164 + .../service/ssm/api_op_DescribeActivations.go | 261 + .../service/ssm/api_op_DescribeAssociation.go | 166 + ..._op_DescribeAssociationExecutionTargets.go | 280 + .../api_op_DescribeAssociationExecutions.go | 274 + .../api_op_DescribeAutomationExecutions.go | 265 + ...api_op_DescribeAutomationStepExecutions.go | 276 + .../ssm/api_op_DescribeAvailablePatches.go | 348 + .../service/ssm/api_op_DescribeDocument.go | 170 + .../ssm/api_op_DescribeDocumentPermission.go | 182 + ...p_DescribeEffectiveInstanceAssociations.go | 266 + ...escribeEffectivePatchesForPatchBaseline.go | 265 + ...i_op_DescribeInstanceAssociationsStatus.go | 266 + .../ssm/api_op_DescribeInstanceInformation.go | 289 + .../ssm/api_op_DescribeInstancePatchStates.go | 265 + ...escribeInstancePatchStatesForPatchGroup.go | 275 + .../ssm/api_op_DescribeInstancePatches.go | 304 + .../ssm/api_op_DescribeInstanceProperties.go | 268 + .../ssm/api_op_DescribeInventoryDeletions.go | 261 + ...intenanceWindowExecutionTaskInvocations.go | 279 + ...DescribeMaintenanceWindowExecutionTasks.go | 272 + ..._op_DescribeMaintenanceWindowExecutions.go | 278 + ...pi_op_DescribeMaintenanceWindowSchedule.go | 274 + ...api_op_DescribeMaintenanceWindowTargets.go | 271 + .../api_op_DescribeMaintenanceWindowTasks.go | 275 + .../ssm/api_op_DescribeMaintenanceWindows.go | 263 + ..._op_DescribeMaintenanceWindowsForTarget.go | 274 + .../service/ssm/api_op_DescribeOpsItems.go | 334 + .../service/ssm/api_op_DescribeParameters.go | 300 + .../ssm/api_op_DescribePatchBaselines.go | 271 + .../ssm/api_op_DescribePatchGroupState.go | 218 + .../service/ssm/api_op_DescribePatchGroups.go | 272 + .../ssm/api_op_DescribePatchProperties.go | 304 + .../service/ssm/api_op_DescribeSessions.go | 267 + .../api_op_DisassociateOpsItemRelatedItem.go | 161 + .../service/ssm/api_op_GetAccessToken.go | 161 + .../ssm/api_op_GetAutomationExecution.go | 159 + .../service/ssm/api_op_GetCalendarState.go | 195 + .../ssm/api_op_GetCommandInvocation.go | 571 + .../service/ssm/api_op_GetConnectionStatus.go | 161 + .../ssm/api_op_GetDefaultPatchBaseline.go | 160 + ...p_GetDeployablePatchSnapshotForInstance.go | 193 + .../service/ssm/api_op_GetDocument.go | 224 + .../service/ssm/api_op_GetExecutionPreview.go | 172 + .../service/ssm/api_op_GetInventory.go | 271 + .../service/ssm/api_op_GetInventorySchema.go | 268 + .../ssm/api_op_GetMaintenanceWindow.go | 212 + .../api_op_GetMaintenanceWindowExecution.go | 173 + ...pi_op_GetMaintenanceWindowExecutionTask.go | 221 + ...aintenanceWindowExecutionTaskInvocation.go | 205 + .../ssm/api_op_GetMaintenanceWindowTask.go | 258 + .../service/ssm/api_op_GetOpsItem.go | 170 + .../service/ssm/api_op_GetOpsMetadata.go | 171 + .../service/ssm/api_op_GetOpsSummary.go | 273 + .../service/ssm/api_op_GetParameter.go | 177 + .../service/ssm/api_op_GetParameterHistory.go | 280 + .../service/ssm/api_op_GetParameters.go | 186 + .../service/ssm/api_op_GetParametersByPath.go | 302 + .../service/ssm/api_op_GetPatchBaseline.go | 220 + .../api_op_GetPatchBaselineForPatchGroup.go | 167 + .../service/ssm/api_op_GetResourcePolicies.go | 263 + .../service/ssm/api_op_GetServiceSetting.go | 195 + .../ssm/api_op_LabelParameterVersion.go | 209 + .../ssm/api_op_ListAssociationVersions.go | 265 + .../service/ssm/api_op_ListAssociations.go | 269 + .../ssm/api_op_ListCommandInvocations.go | 279 + .../service/ssm/api_op_ListCommands.go | 272 + .../service/ssm/api_op_ListComplianceItems.go | 270 + .../ssm/api_op_ListComplianceSummaries.go | 267 + .../ssm/api_op_ListDocumentMetadataHistory.go | 195 + .../ssm/api_op_ListDocumentVersions.go | 264 + .../service/ssm/api_op_ListDocuments.go | 274 + .../ssm/api_op_ListInventoryEntries.go | 189 + .../service/ssm/api_op_ListNodes.go | 271 + .../service/ssm/api_op_ListNodesSummary.go | 281 + .../service/ssm/api_op_ListOpsItemEvents.go | 263 + .../ssm/api_op_ListOpsItemRelatedItems.go | 268 + .../service/ssm/api_op_ListOpsMetadata.go | 262 + .../api_op_ListResourceComplianceSummaries.go | 264 + .../ssm/api_op_ListResourceDataSync.go | 270 + .../service/ssm/api_op_ListTagsForResource.go | 164 + .../ssm/api_op_ModifyDocumentPermission.go | 177 + .../service/ssm/api_op_PutComplianceItems.go | 245 + .../service/ssm/api_op_PutInventory.go | 164 + .../service/ssm/api_op_PutParameter.go | 398 + .../service/ssm/api_op_PutResourcePolicy.go | 213 + .../api_op_RegisterDefaultPatchBaseline.go | 162 + ...i_op_RegisterPatchBaselineForPatchGroup.go | 164 + ..._op_RegisterTargetWithMaintenanceWindow.go | 255 + ...pi_op_RegisterTaskWithMaintenanceWindow.go | 322 + .../ssm/api_op_RemoveTagsFromResource.go | 188 + .../service/ssm/api_op_ResetServiceSetting.go | 196 + .../service/ssm/api_op_ResumeSession.go | 181 + .../ssm/api_op_SendAutomationSignal.go | 179 + .../service/ssm/api_op_SendCommand.go | 283 + .../service/ssm/api_op_StartAccessRequest.go | 165 + .../ssm/api_op_StartAssociationsOnce.go | 153 + .../ssm/api_op_StartAutomationExecution.go | 252 + .../ssm/api_op_StartChangeRequestExecution.go | 238 + .../ssm/api_op_StartExecutionPreview.go | 165 + .../service/ssm/api_op_StartSession.go | 212 + .../ssm/api_op_StopAutomationExecution.go | 157 + .../service/ssm/api_op_TerminateSession.go | 158 + .../ssm/api_op_UnlabelParameterVersion.go | 178 + .../service/ssm/api_op_UpdateAssociation.go | 375 + .../ssm/api_op_UpdateAssociationStatus.go | 172 + .../service/ssm/api_op_UpdateDocument.go | 192 + .../api_op_UpdateDocumentDefaultVersion.go | 167 + .../ssm/api_op_UpdateDocumentMetadata.go | 168 + .../ssm/api_op_UpdateMaintenanceWindow.go | 268 + .../api_op_UpdateMaintenanceWindowTarget.go | 210 + .../ssm/api_op_UpdateMaintenanceWindowTask.go | 397 + .../ssm/api_op_UpdateManagedInstanceRole.go | 169 + .../service/ssm/api_op_UpdateOpsItem.go | 246 + .../service/ssm/api_op_UpdateOpsMetadata.go | 164 + .../service/ssm/api_op_UpdatePatchBaseline.go | 309 + .../ssm/api_op_UpdateResourceDataSync.go | 171 + .../ssm/api_op_UpdateServiceSetting.go | 224 + .../aws/aws-sdk-go-v2/service/ssm/auth.go | 345 + .../service/ssm/deserializers.go | 52262 ++++++++++++++++ .../aws/aws-sdk-go-v2/service/ssm/doc.go | 34 + .../aws-sdk-go-v2/service/ssm/endpoints.go | 571 + .../aws-sdk-go-v2/service/ssm/generated.json | 179 + .../service/ssm/go_module_metadata.go | 6 + .../ssm/internal/endpoints/endpoints.go | 607 + .../aws/aws-sdk-go-v2/service/ssm/options.go | 242 + .../aws-sdk-go-v2/service/ssm/serializers.go | 16677 +++++ .../aws-sdk-go-v2/service/ssm/types/enums.go | 2443 + .../aws-sdk-go-v2/service/ssm/types/errors.go | 3868 ++ .../aws-sdk-go-v2/service/ssm/types/types.go | 6113 ++ .../aws-sdk-go-v2/service/ssm/validators.go | 7346 +++ vendor/modules.txt | 17 + 176 files changed, 126852 insertions(+) create mode 100644 pkg/scaling/resolver/aws_parameterstore_handler.go create mode 100644 pkg/scaling/resolver/aws_parameterstore_handler_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/LICENSE.txt create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAccessToken.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAccessRequest.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go diff --git a/apis/keda/v1alpha1/triggerauthentication_types.go b/apis/keda/v1alpha1/triggerauthentication_types.go index 55d6a55c636..b7266a133f0 100644 --- a/apis/keda/v1alpha1/triggerauthentication_types.go +++ b/apis/keda/v1alpha1/triggerauthentication_types.go @@ -102,6 +102,9 @@ type TriggerAuthenticationSpec struct { // +optional AwsSecretManager *AwsSecretManager `json:"awsSecretManager,omitempty"` + // +optional + AwsParameterStore *AwsParameterStore `json:"awsParameterStore,omitempty"` + // +optional BoundServiceAccountToken []BoundServiceAccountToken `json:"boundServiceAccountToken,omitempty"` } @@ -398,6 +401,36 @@ type AwsSecretManagerSecret struct { SecretKey string `json:"secretKey,omitempty"` } +// AwsParameterStore is used to authenticate using AWS Systems Manager Parameter Store +type AwsParameterStore struct { + // +kubebuilder:validation:MinItems=1 + Parameters []AwsParameterStoreParameter `json:"parameters"` + // +optional + Credentials *AwsParameterStoreCredentials `json:"credentials"` + // +optional + PodIdentity *AuthPodIdentity `json:"podIdentity"` + // +optional + Region string `json:"region,omitempty"` +} + +type AwsParameterStoreCredentials struct { + AccessKey *AwsParameterStoreValue `json:"accessKey"` + AccessSecretKey *AwsParameterStoreValue `json:"accessSecretKey"` + // +optional + AccessToken *AwsParameterStoreValue `json:"accessToken,omitempty"` +} + +type AwsParameterStoreValue struct { + ValueFrom ValueFromSecret `json:"valueFrom"` +} + +type AwsParameterStoreParameter struct { + Parameter string `json:"parameter"` + Name string `json:"name"` + // +optional + WithDecryption *bool `json:"withDecryption,omitempty"` +} + type BoundServiceAccountToken struct { Parameter string `json:"parameter"` ServiceAccountName string `json:"serviceAccountName"` diff --git a/config/crd/bases/keda.sh_clustertriggerauthentications.yaml b/config/crd/bases/keda.sh_clustertriggerauthentications.yaml index 7123545134e..9cb0a8fada2 100644 --- a/config/crd/bases/keda.sh_clustertriggerauthentications.yaml +++ b/config/crd/bases/keda.sh_clustertriggerauthentications.yaml @@ -67,6 +67,137 @@ spec: spec: description: TriggerAuthenticationSpec defines the various ways to authenticate properties: + awsParameterStore: + description: AwsParameterStore is used to authenticate using AWS Systems + Manager Parameter Store + properties: + credentials: + properties: + accessKey: + properties: + valueFrom: + properties: + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + required: + - valueFrom + type: object + accessSecretKey: + properties: + valueFrom: + properties: + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + required: + - valueFrom + type: object + accessToken: + properties: + valueFrom: + properties: + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + required: + - valueFrom + type: object + required: + - accessKey + - accessSecretKey + type: object + parameters: + items: + properties: + name: + type: string + parameter: + type: string + withDecryption: + type: boolean + required: + - name + - parameter + type: object + minItems: 1 + type: array + podIdentity: + description: |- + AuthPodIdentity allows users to select the platform native identity + mechanism + properties: + identityAuthorityHost: + description: Set identityAuthorityHost to override the default + Azure authority host. If this is set, then the IdentityTenantID + must also be set + type: string + identityId: + type: string + identityOwner: + description: IdentityOwner configures which identity has to + be used during auto discovery, keda or the scaled workload. + Mutually exclusive with roleArn + enum: + - keda + - workload + type: string + identityTenantId: + description: Set identityTenantId to override the default + Azure tenant id. If this is set, then the IdentityID must + also be set + type: string + provider: + description: PodIdentityProvider contains the list of providers + enum: + - azure-workload + - gcp + - aws + - aws-eks + - none + type: string + roleArn: + description: RoleArn sets the AWS RoleArn to be used. Mutually + exclusive with IdentityOwner + type: string + required: + - provider + type: object + region: + type: string + required: + - parameters + type: object awsSecretManager: description: AwsSecretManager is used to authenticate using AwsSecretManager properties: diff --git a/config/crd/bases/keda.sh_triggerauthentications.yaml b/config/crd/bases/keda.sh_triggerauthentications.yaml index a737ee10f18..e13a6ecb5d2 100644 --- a/config/crd/bases/keda.sh_triggerauthentications.yaml +++ b/config/crd/bases/keda.sh_triggerauthentications.yaml @@ -63,6 +63,137 @@ spec: spec: description: TriggerAuthenticationSpec defines the various ways to authenticate properties: + awsParameterStore: + description: AwsParameterStore is used to authenticate using AWS Systems + Manager Parameter Store + properties: + credentials: + properties: + accessKey: + properties: + valueFrom: + properties: + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + required: + - valueFrom + type: object + accessSecretKey: + properties: + valueFrom: + properties: + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + required: + - valueFrom + type: object + accessToken: + properties: + valueFrom: + properties: + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + - name + type: object + required: + - secretKeyRef + type: object + required: + - valueFrom + type: object + required: + - accessKey + - accessSecretKey + type: object + parameters: + items: + properties: + name: + type: string + parameter: + type: string + withDecryption: + type: boolean + required: + - name + - parameter + type: object + minItems: 1 + type: array + podIdentity: + description: |- + AuthPodIdentity allows users to select the platform native identity + mechanism + properties: + identityAuthorityHost: + description: Set identityAuthorityHost to override the default + Azure authority host. If this is set, then the IdentityTenantID + must also be set + type: string + identityId: + type: string + identityOwner: + description: IdentityOwner configures which identity has to + be used during auto discovery, keda or the scaled workload. + Mutually exclusive with roleArn + enum: + - keda + - workload + type: string + identityTenantId: + description: Set identityTenantId to override the default + Azure tenant id. If this is set, then the IdentityID must + also be set + type: string + provider: + description: PodIdentityProvider contains the list of providers + enum: + - azure-workload + - gcp + - aws + - aws-eks + - none + type: string + roleArn: + description: RoleArn sets the AWS RoleArn to be used. Mutually + exclusive with IdentityOwner + type: string + required: + - provider + type: object + region: + type: string + required: + - parameters + type: object awsSecretManager: description: AwsSecretManager is used to authenticate using AwsSecretManager properties: diff --git a/go.mod b/go.mod index dfcc1bbcebc..e88e52c663f 100644 --- a/go.mod +++ b/go.mod @@ -57,6 +57,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/kinesis v1.43.5 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.41.5 github.com/aws/aws-sdk-go-v2/service/sqs v1.42.25 + github.com/aws/aws-sdk-go-v2/service/ssm v1.68.3 github.com/aws/aws-sdk-go-v2/service/sts v1.41.10 github.com/beanstalkd/go-beanstalk v0.2.0 github.com/bradleyfalzon/ghinstallation/v2 v2.18.0 diff --git a/go.sum b/go.sum index e056a721701..3cad47d50a0 100644 --- a/go.sum +++ b/go.sum @@ -189,6 +189,8 @@ github.com/aws/aws-sdk-go-v2/service/signin v1.0.9 h1:QKZH0S178gCmFEgst8hN0mCX1K github.com/aws/aws-sdk-go-v2/service/signin v1.0.9/go.mod h1:7yuQJoT+OoH8aqIxw9vwF+8KpvLZ8AWmvmUWHsGQZvI= github.com/aws/aws-sdk-go-v2/service/sqs v1.42.25 h1:8Bv3TQ1Cob6HLlpUbAnWxeHhAkYScJO9RIHh2WPXaxw= github.com/aws/aws-sdk-go-v2/service/sqs v1.42.25/go.mod h1:eDstEbM0OEnBUnNQxIA7j74Jy61cCU1S4EMlCtdMwzs= +github.com/aws/aws-sdk-go-v2/service/ssm v1.68.3 h1:bBoWhx8lsFLTXintRX64ZBXcmFZbGqUmaPUrjXECqIc= +github.com/aws/aws-sdk-go-v2/service/ssm v1.68.3/go.mod h1:rcRkKbUJ2437WuXdq9fbj+MjTudYWzY9Ct8kiBbN8a8= github.com/aws/aws-sdk-go-v2/service/sso v1.11.18/go.mod h1:ytmEi5+qwcSNcV2pVA8PIb1DnKT/0Bu/K4nfJHwoM6c= github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 h1:lFd1+ZSEYJZYvv9d6kXzhkZu07si3f+GQ1AaYwa2LUM= github.com/aws/aws-sdk-go-v2/service/sso v1.30.15/go.mod h1:WSvS1NLr7JaPunCXqpJnWk1Bjo7IxzZXrZi1QQCkuqM= diff --git a/pkg/scaling/resolver/aws_parameterstore_handler.go b/pkg/scaling/resolver/aws_parameterstore_handler.go new file mode 100644 index 00000000000..44d9aacb0af --- /dev/null +++ b/pkg/scaling/resolver/aws_parameterstore_handler.go @@ -0,0 +1,118 @@ +/* +Copyright 2024 The KEDA Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resolver + +import ( + "context" + "fmt" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/ssm" + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + corev1listers "k8s.io/client-go/listers/core/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1" + awsutils "github.com/kedacore/keda/v2/pkg/scalers/aws" +) + +type AwsParameterStoreHandler struct { + parameterStore *kedav1alpha1.AwsParameterStore + session *ssm.Client + awsMetadata awsutils.AuthorizationMetadata +} + +func NewAwsParameterStoreHandler(a *kedav1alpha1.AwsParameterStore) *AwsParameterStoreHandler { + return &AwsParameterStoreHandler{ + parameterStore: a, + } +} + +func (apsh *AwsParameterStoreHandler) Read(ctx context.Context, logger logr.Logger, parameterName string, withDecryption *bool) (string, error) { + decrypt := true + if withDecryption != nil { + decrypt = *withDecryption + } + + input := &ssm.GetParameterInput{ + Name: aws.String(parameterName), + WithDecryption: aws.Bool(decrypt), + } + + result, err := apsh.session.GetParameter(ctx, input) + if err != nil { + logger.Error(err, "Error getting parameter from Parameter Store") + return "", err + } + + if result.Parameter == nil || result.Parameter.Value == nil { + logger.Error(nil, "Parameter value is nil") + return "", fmt.Errorf("parameter value is nil") + } + + return *result.Parameter.Value, nil +} + +func (apsh *AwsParameterStoreHandler) Initialize(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister, podSpec *corev1.PodSpec) error { + apsh.awsMetadata = awsutils.AuthorizationMetadata{ + TriggerUniqueKey: fmt.Sprintf("aws-parameter-store-%s", triggerNamespace), + } + awsRegion := "" + if apsh.parameterStore.Region != "" { + awsRegion = apsh.parameterStore.Region + } + apsh.awsMetadata.AwsRegion = awsRegion + podIdentity := apsh.parameterStore.PodIdentity + if podIdentity == nil { + podIdentity = &kedav1alpha1.AuthPodIdentity{} + } + + switch podIdentity.Provider { + case "", kedav1alpha1.PodIdentityProviderNone: + apsh.awsMetadata.AwsAccessKeyID = resolveAuthSecret(ctx, client, logger, apsh.parameterStore.Credentials.AccessKey.ValueFrom.SecretKeyRef.Name, triggerNamespace, apsh.parameterStore.Credentials.AccessKey.ValueFrom.SecretKeyRef.Key, secretsLister) + apsh.awsMetadata.AwsSecretAccessKey = resolveAuthSecret(ctx, client, logger, apsh.parameterStore.Credentials.AccessSecretKey.ValueFrom.SecretKeyRef.Name, triggerNamespace, apsh.parameterStore.Credentials.AccessSecretKey.ValueFrom.SecretKeyRef.Key, secretsLister) + if apsh.awsMetadata.AwsAccessKeyID == "" || apsh.awsMetadata.AwsSecretAccessKey == "" { + return fmt.Errorf("AccessKeyID and AccessSecretKey are expected when not using a pod identity provider") + } + case kedav1alpha1.PodIdentityProviderAws: + apsh.awsMetadata.UsingPodIdentity = true + if apsh.parameterStore.PodIdentity.IsWorkloadIdentityOwner() { + awsRoleArn, err := resolveServiceAccountAnnotation(ctx, client, podSpec.ServiceAccountName, triggerNamespace, kedav1alpha1.PodIdentityAnnotationEKS, true) + if err != nil { + return fmt.Errorf("error resolving role arn for aws: %w", err) + } + apsh.awsMetadata.AwsRoleArn = awsRoleArn + } else if apsh.parameterStore.PodIdentity.RoleArn != nil { + apsh.awsMetadata.AwsRoleArn = *apsh.parameterStore.PodIdentity.RoleArn + } + default: + return fmt.Errorf("pod identity provider %s not supported", podIdentity.Provider) + } + + config, err := awsutils.GetAwsConfig(ctx, apsh.awsMetadata) + if err != nil { + logger.Error(err, "Error getting credentials") + return err + } + apsh.session = ssm.NewFromConfig(*config) + return nil +} + +func (apsh *AwsParameterStoreHandler) Stop() { + awsutils.ClearAwsConfig(apsh.awsMetadata) +} diff --git a/pkg/scaling/resolver/aws_parameterstore_handler_test.go b/pkg/scaling/resolver/aws_parameterstore_handler_test.go new file mode 100644 index 00000000000..c3415308ba1 --- /dev/null +++ b/pkg/scaling/resolver/aws_parameterstore_handler_test.go @@ -0,0 +1,102 @@ +/* +Copyright 2024 The KEDA Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package resolver + +import ( + "context" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" + corev1 "k8s.io/api/core/v1" + + kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1" + "github.com/kedacore/keda/v2/pkg/mock/mock_client" + "github.com/kedacore/keda/v2/pkg/util" +) + +func TestAwsParameterStoreHandler_InitializeUsingStaticCredentials(t *testing.T) { + expectedAwsRegion := "mocked-region" + ctrl := gomock.NewController(util.GinkgoTestReporter{}) + mockClient := mock_client.NewMockClient(ctrl) + secret := corev1.Secret{ + Data: map[string][]byte{ + "mocked-access-key-key": []byte("secret"), + }, + } + mockClient.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).SetArg(2, secret).Times(2).Return(nil) + + awsParameterStoreHandler := &AwsParameterStoreHandler{ + parameterStore: &kedav1alpha1.AwsParameterStore{ + Region: expectedAwsRegion, + Credentials: &kedav1alpha1.AwsParameterStoreCredentials{ + AccessKey: &kedav1alpha1.AwsParameterStoreValue{ + ValueFrom: kedav1alpha1.ValueFromSecret{ + SecretKeyRef: kedav1alpha1.SecretKeyRef{ + Name: "mocked-access-key-secret", + Key: "mocked-access-key-key", + }, + }, + }, + AccessSecretKey: &kedav1alpha1.AwsParameterStoreValue{ + ValueFrom: kedav1alpha1.ValueFromSecret{ + SecretKeyRef: kedav1alpha1.SecretKeyRef{ + Name: "mocked-access-key-secret", + Key: "mocked-access-key-key", + }, + }, + }, + }, + }, + } + + err := awsParameterStoreHandler.Initialize(context.Background(), mockClient, logr.Discard(), "mocked-trigger-namespace", nil, &corev1.PodSpec{}) + + assert.NoError(t, err) + assert.Equal(t, expectedAwsRegion, awsParameterStoreHandler.parameterStore.Region) +} + +func TestAwsParameterStoreHandler_InitializeUsingPodIdentity(t *testing.T) { + tests := []struct { + provider kedav1alpha1.PodIdentityProvider + isError bool + }{ + {provider: kedav1alpha1.PodIdentityProviderAws, isError: false}, + {provider: kedav1alpha1.PodIdentityProviderAwsEKS, isError: true}, + {provider: kedav1alpha1.PodIdentityProviderAzureWorkload, isError: true}, + {provider: kedav1alpha1.PodIdentityProviderGCP, isError: true}, + } + + for _, tc := range tests { + awsParameterStoreHandler := &AwsParameterStoreHandler{ + parameterStore: &kedav1alpha1.AwsParameterStore{ + Region: "expectedAwsRegion", + PodIdentity: &kedav1alpha1.AuthPodIdentity{ + Provider: tc.provider, + }, + }, + } + + err := awsParameterStoreHandler.Initialize(context.Background(), nil, logr.Discard(), "mocked-trigger-namespace", nil, &corev1.PodSpec{}) + + if tc.isError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + } +} diff --git a/pkg/scaling/resolver/scale_resolvers.go b/pkg/scaling/resolver/scale_resolvers.go index 450ee3a9ad9..b46613801d1 100644 --- a/pkg/scaling/resolver/scale_resolvers.go +++ b/pkg/scaling/resolver/scale_resolvers.go @@ -382,6 +382,24 @@ func resolveAuthRef(ctx context.Context, client client.Client, logger logr.Logge } } } + if triggerAuthSpec.AwsParameterStore != nil && len(triggerAuthSpec.AwsParameterStore.Parameters) > 0 { + awsParameterStoreHandler := NewAwsParameterStoreHandler(triggerAuthSpec.AwsParameterStore) + err := awsParameterStoreHandler.Initialize(ctx, client, logger, triggerNamespace, authClientSet.SecretLister, podSpec) + defer awsParameterStoreHandler.Stop() + if err != nil { + logger.Error(err, "error authenticating to Aws Parameter Store", "triggerAuthRef.Name", triggerAuthRef.Name) + } else { + for _, parameter := range triggerAuthSpec.AwsParameterStore.Parameters { + res, err := awsParameterStoreHandler.Read(ctx, logger, parameter.Name, parameter.WithDecryption) + if err != nil { + logger.Error(err, "error trying to read parameter from Aws Parameter Store", "triggerAuthRef.Name", triggerAuthRef.Name, + "parameter.Name", parameter.Name) + } else { + result[parameter.Parameter] = res + } + } + } + } if triggerAuthSpec.BoundServiceAccountToken != nil { for _, e := range triggerAuthSpec.BoundServiceAccountToken { result[e.Parameter] = resolveBoundServiceAccountToken(ctx, client, logger, triggerNamespace, &e, authClientSet) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 57bfbfb694c..d70be8af9f5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,8 @@ package aws // goModuleVersion is the tagged release for this module +<<<<<<< HEAD const goModuleVersion = "1.41.5" +======= +const goModuleVersion = "1.41.4" +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 1def5e2d9fa..b354dc2bdcc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,7 +1,10 @@ +<<<<<<< HEAD # v1.4.21 (2026-03-26) * **Dependency Update**: Updated to the latest SDK module versions +======= +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) # v1.4.20 (2026-03-13) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 548da96016c..01f822db1ad 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,8 @@ package configsources // goModuleVersion is the tagged release for this module +<<<<<<< HEAD const goModuleVersion = "1.4.21" +======= +const goModuleVersion = "1.4.20" +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index a2a1c183ffa..3a761d8b421 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,7 +1,10 @@ +<<<<<<< HEAD # v2.7.21 (2026-03-26) * **Dependency Update**: Updated to the latest SDK module versions +======= +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) # v2.7.20 (2026-03-13) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 03a0b8c0380..91bdda0a1d7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,8 @@ package endpoints // goModuleVersion is the tagged release for this module +<<<<<<< HEAD const goModuleVersion = "2.7.21" +======= +const goModuleVersion = "2.7.20" +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md new file mode 100644 index 00000000000..a9ac9d77286 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md @@ -0,0 +1,891 @@ +# v1.68.3 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.2 (2026-03-03) + +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.1 (2026-02-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.0 (2026-02-20) + +* **Feature**: Add support for AssociationDispatchAssumeRole in AWS SSM State Manager. + +# v1.67.8 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.7 (2025-12-09) + +* No change notes available for this release. + +# v1.67.6 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.5 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.67.4 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.67.3 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.2 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.67.1 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.67.0 (2025-11-06) + +* **Feature**: Provides NoLongerSupportedException error message + +# v1.66.4 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.66.3 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.2 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.1 (2025-10-22) + +* No change notes available for this release. + +# v1.66.0 (2025-10-16) + +* **Feature**: Update endpoint ruleset parameters casing +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.65.1 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.65.0 (2025-09-23) + +* **Feature**: Added Dualstack support to GetDeployablePatchSnapshotForInstance +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.4 (2025-09-10) + +* No change notes available for this release. + +# v1.64.3 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.2 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.1 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.0 (2025-08-26) + +* **Feature**: Remove incorrect endpoint tests + +# v1.63.2 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.1 (2025-08-20) + +* **Bug Fix**: Remove unused deserialization code. + +# v1.63.0 (2025-08-11) + +* **Feature**: Add support for configuring per-service Options via callback on global config. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.0 (2025-08-04) + +* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.60.2 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.60.1 (2025-07-18) + +* **Documentation**: July 2025 doc-only updates for Systems Manager. + +# v1.60.0 (2025-06-30) + +* **Feature**: Introduces AccessType, a new filter value for the DescribeSessions API. + +# v1.59.3 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.59.2 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.59.1 (2025-06-06) + +* No change notes available for this release. + +# v1.59.0 (2025-04-29) + +* **Feature**: This release adds support for just-In-time node access in AWS Systems Manager. Just-in-time node access enables customers to move towards zero standing privileges by requiring operators to request access and obtain approval before remotely connecting to nodes managed by the SSM Agent. + +# v1.58.2 (2025-04-10) + +* No change notes available for this release. + +# v1.58.1 (2025-04-03) + +* No change notes available for this release. + +# v1.58.0 (2025-03-24) + +* **Feature**: This release adds the AvailableSecurityUpdatesComplianceStatus field to patch baseline operations, as well as the AvailableSecurityUpdateCount and InstancesWithAvailableSecurityUpdates to patch state operations. Applies to Windows Server managed nodes only. + +# v1.57.2 (2025-03-04.2) + +* **Bug Fix**: Add assurance test for operation order. + +# v1.57.1 (2025-02-28) + +* **Documentation**: Systems Manager doc-only updates for Feb. 2025. + +# v1.57.0 (2025-02-27) + +* **Feature**: Track credential providers via User-Agent Feature ids +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.13 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.12 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.11 (2025-02-04) + +* No change notes available for this release. + +# v1.56.10 (2025-01-31) + +* **Dependency Update**: Switch to code-generated waiter matchers, removing the dependency on go-jmespath. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.9 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.8 (2025-01-24) + +* **Documentation**: Systems Manager doc-only update for January, 2025. +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + +# v1.56.7 (2025-01-17) + +* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. + +# v1.56.6 (2025-01-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.5 (2025-01-14) + +* **Bug Fix**: Fix issue where waiters were not failing on unmatched errors as they should. This may have breaking behavioral changes for users in fringe cases. See [this announcement](https://github.com/aws/aws-sdk-go-v2/discussions/2954) for more information. + +# v1.56.4 (2025-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.3 (2025-01-08) + +* No change notes available for this release. + +# v1.56.2 (2024-12-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.1 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.0 (2024-11-21) + +* **Feature**: Added support for providing high-level overviews of managed nodes and previewing the potential impact of a runbook execution. + +# v1.55.6 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.55.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.4 (2024-10-03) + +* No change notes available for this release. + +# v1.54.3 (2024-09-27) + +* No change notes available for this release. + +# v1.54.2 (2024-09-25) + +* No change notes available for this release. + +# v1.54.1 (2024-09-23) + +* No change notes available for this release. + +# v1.54.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.0 (2024-09-17) + +* **Feature**: Support for additional levels of cross-account, cross-Region organizational units in Automation. Various documentation updates. +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.52.8 (2024-09-04) + +* No change notes available for this release. + +# v1.52.7 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.6 (2024-08-22) + +* No change notes available for this release. + +# v1.52.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.4 (2024-08-09) + +* **Documentation**: Systems Manager doc-only updates for August 2024. + +# v1.52.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.51.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.51.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.7 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.6 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.5 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.4 (2024-05-23) + +* No change notes available for this release. + +# v1.50.3 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.2 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.1 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.50.0 (2024-04-24) + +* **Feature**: Add SSM DescribeInstanceProperties API to public AWS SDK. + +# v1.49.5 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.4 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.3 (2024-03-12) + +* **Documentation**: March 2024 doc-only updates for Systems Manager. + +# v1.49.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.1 (2024-02-23) + +* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.48.0 (2024-02-21) + +* **Feature**: This release adds support for sharing Systems Manager parameters with other AWS accounts. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.47.1 (2024-02-20) + +* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. + +# v1.47.0 (2024-02-16) + +* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. + +# v1.46.1 (2024-02-15) + +* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. + +# v1.46.0 (2024-02-13) + +* **Feature**: Bump minimum Go version to 1.20 per our language support policy. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.0 (2024-01-31) + +* **Feature**: This release adds an optional Duration parameter to StateManager Associations. This allows customers to specify how long an apply-only-on-cron association execution should run. Once the specified Duration is out all the ongoing cancellable commands or automations are cancelled. + +# v1.44.7 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.6 (2023-12-20) + +* No change notes available for this release. + +# v1.44.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.44.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.44.2 (2023-12-01) + +* **Bug Fix**: Correct wrapping of errors in authentication workflow. +* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.3 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.2 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.43.1 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.0 (2023-11-16) + +* **Feature**: This release introduces the ability to filter automation execution steps which have parent steps. In addition, runbook variable information is returned by GetAutomationExecution and parent step information is returned by the DescribeAutomationStepExecutions API. + +# v1.42.2 (2023-11-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.0 (2023-11-01) + +* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.0 (2023-10-31) + +* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.0 (2023-10-24) + +* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162). + +# v1.39.0 (2023-10-20) + +* **Feature**: This release introduces a new API: DeleteOpsItem. This allows deletion of an OpsItem. + +# v1.38.2 (2023-10-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.1 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.0 (2023-09-25) + +* **Feature**: This release updates the enum values for ResourceType in SSM DescribeInstanceInformation input and ConnectionStatus in GetConnectionStatus output. + +# v1.37.5 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.4 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.3 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.1 (2023-08-01) + +* No change notes available for this release. + +# v1.37.0 (2023-07-31) + +* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.9 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.8 (2023-07-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.7 (2023-06-27) + +* **Documentation**: Systems Manager doc-only update for June 2023. + +# v1.36.6 (2023-06-15) + +* No change notes available for this release. + +# v1.36.5 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.4 (2023-05-04) + +* No change notes available for this release. + +# v1.36.3 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.2 (2023-04-10) + +* No change notes available for this release. + +# v1.36.1 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.0 (2023-03-22) + +* **Feature**: This Patch Manager release supports creating, updating, and deleting Patch Baselines for AmazonLinux2023, AlmaLinux. + +# v1.35.7 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.6 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.5 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. +* **Documentation**: Document only update for Feb 2023 + +# v1.35.4 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.3 (2023-02-15) + +* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. +* **Bug Fix**: Correct error type parsing for restJson services. + +# v1.35.2 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.1 (2023-01-23) + +* No change notes available for this release. + +# v1.35.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.34.0 (2023-01-04) + +* **Feature**: Adding support for QuickSetup Document Type in Systems Manager + +# v1.33.4 (2022-12-21) + +* **Documentation**: Doc-only updates for December 2022. + +# v1.33.3 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.2 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.1 (2022-11-22) + +* No change notes available for this release. + +# v1.33.0 (2022-11-16) + +* **Feature**: This release adds support for cross account access in CreateOpsItem, UpdateOpsItem and GetOpsItem. It introduces new APIs to setup resource policies for SSM resources: PutResourcePolicy, GetResourcePolicies and DeleteResourcePolicy. + +# v1.32.1 (2022-11-10) + +* No change notes available for this release. + +# v1.32.0 (2022-11-07) + +* **Feature**: This release includes support for applying a CloudWatch alarm to multi account multi region Systems Manager Automation + +# v1.31.3 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.2 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.1 (2022-10-20) + +* No change notes available for this release. + +# v1.31.0 (2022-10-13) + +* **Feature**: Support of AmazonLinux2022 by Patch Manager + +# v1.30.0 (2022-09-26) + +* **Feature**: This release includes support for applying a CloudWatch alarm to Systems Manager capabilities like Automation, Run Command, State Manager, and Maintenance Windows. + +# v1.29.0 (2022-09-23) + +* **Feature**: This release adds new SSM document types ConformancePackTemplate and CloudFormation + +# v1.28.1 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2022-09-14) + +* **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API. +* **Feature**: This release adds support for Systems Manager State Manager Association tagging. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.13 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.12 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.11 (2022-08-30) + +* No change notes available for this release. + +# v1.27.10 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.9 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.8 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.7 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.6 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.5 (2022-07-27) + +* **Documentation**: Adding doc updates for OpsCenter support in Service Setting actions. + +# v1.27.4 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.3 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2022-05-04) + +* **Feature**: This release adds the TargetMaps parameter in SSM State Manager API. + +# v1.26.0 (2022-04-29) + +* **Feature**: Update the StartChangeRequestExecution, adding TargetMaps to the Runbook parameter + +# v1.25.1 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2022-04-19) + +* **Feature**: Added offset support for specifying the number of days to wait after the date and time specified by a CRON expression when creating SSM association. + +# v1.24.1 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2022-03-25) + +* **Feature**: This Patch Manager release supports creating, updating, and deleting Patch Baselines for Rocky Linux OS. + +# v1.23.1 (2022-03-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.0 (2022-03-23) + +* **Feature**: Update AddTagsToResource, ListTagsForResource, and RemoveTagsFromResource APIs to reflect the support for tagging Automation resources. Includes other minor documentation updates. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2022-03-08) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2022-02-24) + +* **Feature**: API client updated +* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.0 (2022-01-14) + +* **Feature**: Updated API models +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. +* **Feature**: Updated to latest service endpoints + +# v1.17.1 (2021-12-02) + +* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.0 (2021-11-30) + +* **Feature**: API client updated + +# v1.16.0 (2021-11-19) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.0 (2021-11-12) + +* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. +* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. + +# v1.14.0 (2021-11-06) + +* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.0 (2021-10-21) + +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2021-10-11) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-09-24) + +* **Feature**: API client updated + +# v1.10.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2021-08-27) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.1 (2021-08-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.0 (2021-08-12) + +* **Feature**: API client updated + +# v1.8.1 (2021-08-04) + +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.0 (2021-07-15) + +* **Feature**: Updated service model to latest version. +* **Documentation**: Updated service model to latest revision. +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-06-25) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.6.2 (2021-06-04) + +* **Documentation**: Updated service client to latest API model. + +# v1.6.1 (2021-05-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.6.0 (2021-05-14) + +* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. +* **Feature**: Updated to latest service API model. +* **Dependency Update**: Updated to the latest SDK module versions + diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go new file mode 100644 index 00000000000..2e7b8302036 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go @@ -0,0 +1,966 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + cryptorand "crypto/rand" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "SSM" +const ServiceAPIVersion = "2014-11-06" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssm") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/ssm") +} + +// Client provides the API client to make operations call for Amazon Simple +// Systems Manager (SSM). +type Client struct { + options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveIdempotencyTokenProvider(&options) + + resolveEndpointResolverV2(&options) + + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + initializeTimeOffsetResolver(client) + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { + ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssm") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AuthSchemePreference: cfg.AuthSchemePreference, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveInterceptors(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, func(o *Options) { + for _, opt := range cfg.ServiceOptions { + opt(ServiceID, o) + } + for _, opt := range optFns { + opt(o) + } + }) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func resolveInterceptors(cfg aws.Config, o *Options) { + o.Interceptors = cfg.Interceptors.Copy() +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssm", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetry(stack *middleware.Stack, o Options) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssm") + }) + if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +type setCredentialSourceMiddleware struct { + ua *awsmiddleware.RequestUserAgent + options Options +} + +func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } + +func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) + if !ok { + return next.HandleBuild(ctx, in) + } + providerSources := asProviderSource.ProviderSources() + for _, source := range providerSources { + m.ua.AddCredentialsSource(source) + } + return next.HandleBuild(ctx, in) +} + +func addCredentialSource(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + mw := setCredentialSourceMiddleware{ua: ua, options: options} + return stack.Build.Insert(&mw, "UserAgent", middleware.Before) +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ + Interceptors: opts.Interceptors.BeforeRetryLoop, + }, "Retry", middleware.Before) +} + +func addInterceptAttempt(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ + BeforeAttempt: opts.Interceptors.BeforeAttempt, + AfterAttempt: opts.Interceptors.AfterAttempt, + }, "Retry", middleware.After) +} + +func addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } + + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go new file mode 100644 index 00000000000..792724a97c1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or overwrites one or more tags for the specified resource. Tags are +// metadata that you can assign to your automations, documents, managed nodes, +// maintenance windows, Parameter Store parameters, and patch baselines. Tags +// enable you to categorize your resources in different ways, for example, by +// purpose, owner, or environment. Each tag consists of a key and an optional +// value, both of which you define. For example, you could define a set of tags for +// your account's managed nodes that helps you track each node's owner and stack +// level. For example: +// +// - Key=Owner,Value=DbAdmin +// +// - Key=Owner,Value=SysAdmin +// +// - Key=Owner,Value=Dev +// +// - Key=Stack,Value=Production +// +// - Key=Stack,Value=Pre-Production +// +// - Key=Stack,Value=Test +// +// Most resources can have a maximum of 50 tags. Automations can have a maximum of +// 5 tags. +// +// We recommend that you devise a set of tag keys that meets your needs for each +// resource type. Using a consistent set of tag keys makes it easier for you to +// manage your resources. You can search and filter the resources based on the tags +// you add. Tags don't have any semantic meaning to and are interpreted strictly as +// a string of characters. +// +// For more information about using tags with Amazon Elastic Compute Cloud (Amazon +// EC2) instances, see [Tag your Amazon EC2 resources]in the Amazon EC2 User Guide. +// +// [Tag your Amazon EC2 resources]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html +func (c *Client) AddTagsToResource(ctx context.Context, params *AddTagsToResourceInput, optFns ...func(*Options)) (*AddTagsToResourceOutput, error) { + if params == nil { + params = &AddTagsToResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddTagsToResource", params, optFns, c.addOperationAddTagsToResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddTagsToResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddTagsToResourceInput struct { + + // The resource ID you want to tag. + // + // Use the ID of the resource. Here are some examples: + // + // MaintenanceWindow : mw-012345abcde + // + // PatchBaseline : pb-012345abcde + // + // Automation : example-c160-4567-8519-012345abcde + // + // OpsMetadata object: ResourceID for tagging is created from the Amazon Resource + // Name (ARN) for the object. Specifically, ResourceID is created from the strings + // that come after the word opsmetadata in the ARN. For example, an OpsMetadata + // object with an ARN of + // arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager has a + // ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager . + // + // For the Document and Parameter values, use the name of the resource. If you're + // tagging a shared document, you must use the full ARN of the document. + // + // ManagedInstance : mi-012345abcde + // + // The ManagedInstance type for this API operation is only for on-premises managed + // nodes. You must specify the name of the managed node in the following format: + // mi-ID_number . For example, mi-1a2b3c4d5e6f . + // + // This member is required. + ResourceId *string + + // Specifies the type of resource you are tagging. + // + // The ManagedInstance type for this API operation is for on-premises managed + // nodes. You must specify the name of the managed node in the following format: + // mi-ID_number . For example, mi-1a2b3c4d5e6f . + // + // This member is required. + ResourceType types.ResourceTypeForTagging + + // One or more tags. The value parameter is required. + // + // Don't enter personally identifiable information in this field. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type AddTagsToResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAddTagsToResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAddTagsToResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddTagsToResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddTagsToResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAddTagsToResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddTagsToResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go new file mode 100644 index 00000000000..fac57145d68 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a related item to a Systems Manager OpsCenter OpsItem. For example, +// you can associate an Incident Manager incident or analysis with an OpsItem. +// Incident Manager and OpsCenter are tools in Amazon Web Services Systems Manager. +func (c *Client) AssociateOpsItemRelatedItem(ctx context.Context, params *AssociateOpsItemRelatedItemInput, optFns ...func(*Options)) (*AssociateOpsItemRelatedItemOutput, error) { + if params == nil { + params = &AssociateOpsItemRelatedItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateOpsItemRelatedItem", params, optFns, c.addOperationAssociateOpsItemRelatedItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateOpsItemRelatedItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateOpsItemRelatedItemInput struct { + + // The type of association that you want to create between an OpsItem and a + // resource. OpsCenter supports IsParentOf and RelatesTo association types. + // + // This member is required. + AssociationType *string + + // The ID of the OpsItem to which you want to associate a resource as a related + // item. + // + // This member is required. + OpsItemId *string + + // The type of resource that you want to associate with an OpsItem. OpsCenter + // supports the following types: + // + // AWS::SSMIncidents::IncidentRecord : an Incident Manager incident. + // + // AWS::SSM::Document : a Systems Manager (SSM) document. + // + // This member is required. + ResourceType *string + + // The Amazon Resource Name (ARN) of the Amazon Web Services resource that you + // want to associate with the OpsItem. + // + // This member is required. + ResourceUri *string + + noSmithyDocumentSerde +} + +type AssociateOpsItemRelatedItemOutput struct { + + // The association ID. + AssociationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateOpsItemRelatedItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateOpsItemRelatedItem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAssociateOpsItemRelatedItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateOpsItemRelatedItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateOpsItemRelatedItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateOpsItemRelatedItem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go new file mode 100644 index 00000000000..fb6736006a4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attempts to cancel the command specified by the Command ID. There is no +// guarantee that the command will be terminated and the underlying process +// stopped. +func (c *Client) CancelCommand(ctx context.Context, params *CancelCommandInput, optFns ...func(*Options)) (*CancelCommandOutput, error) { + if params == nil { + params = &CancelCommandInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelCommand", params, optFns, c.addOperationCancelCommandMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelCommandOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelCommandInput struct { + + // The ID of the command you want to cancel. + // + // This member is required. + CommandId *string + + // (Optional) A list of managed node IDs on which you want to cancel the command. + // If not provided, the command is canceled on every node on which it was + // requested. + InstanceIds []string + + noSmithyDocumentSerde +} + +// Whether or not the command was successfully canceled. There is no guarantee +// that a request can be canceled. +type CancelCommandOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelCommand{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelCommand{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelCommand"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCancelCommandValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelCommand(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelCommand(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelCommand", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go new file mode 100644 index 00000000000..752f18d61a6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stops a maintenance window execution that is already in progress and cancels +// any tasks in the window that haven't already starting running. Tasks already in +// progress will continue to completion. +func (c *Client) CancelMaintenanceWindowExecution(ctx context.Context, params *CancelMaintenanceWindowExecutionInput, optFns ...func(*Options)) (*CancelMaintenanceWindowExecutionOutput, error) { + if params == nil { + params = &CancelMaintenanceWindowExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelMaintenanceWindowExecution", params, optFns, c.addOperationCancelMaintenanceWindowExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelMaintenanceWindowExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelMaintenanceWindowExecutionInput struct { + + // The ID of the maintenance window execution to stop. + // + // This member is required. + WindowExecutionId *string + + noSmithyDocumentSerde +} + +type CancelMaintenanceWindowExecutionOutput struct { + + // The ID of the maintenance window execution that has been stopped. + WindowExecutionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelMaintenanceWindowExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelMaintenanceWindowExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCancelMaintenanceWindowExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelMaintenanceWindowExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelMaintenanceWindowExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelMaintenanceWindowExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go new file mode 100644 index 00000000000..e5ad579c0c5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go @@ -0,0 +1,234 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Generates an activation code and activation ID you can use to register your +// on-premises servers, edge devices, or virtual machine (VM) with Amazon Web +// Services Systems Manager. Registering these machines with Systems Manager makes +// it possible to manage them using Systems Manager tools. You use the activation +// code and ID when installing SSM Agent on machines in your hybrid environment. +// For more information about requirements for managing on-premises machines using +// Systems Manager, see [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager User Guide. +// +// Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and +// on-premises servers and VMs that are configured for Systems Manager are all +// called managed nodes. +// +// [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-hybrid-multicloud.html +func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationInput, optFns ...func(*Options)) (*CreateActivationOutput, error) { + if params == nil { + params = &CreateActivationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateActivation", params, optFns, c.addOperationCreateActivationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateActivationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateActivationInput struct { + + // The name of the Identity and Access Management (IAM) role that you want to + // assign to the managed node. This IAM role must provide AssumeRole permissions + // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com + // . For more information, see [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]in the Amazon Web Services Systems Manager User + // Guide. + // + // You can't specify an IAM service-linked role for this parameter. You must + // create a unique role. + // + // [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html + // + // This member is required. + IamRole *string + + // The name of the registered, managed node as it will appear in the Amazon Web + // Services Systems Manager console or when you use the Amazon Web Services command + // line tools to list Systems Manager resources. + // + // Don't enter personally identifiable information in this field. + DefaultInstanceName *string + + // A user-defined description of the resource that you want to register with + // Systems Manager. + // + // Don't enter personally identifiable information in this field. + Description *string + + // The date by which this activation request should expire, in timestamp format, + // such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. + // If you don't provide an expiration date, the activation code expires in 24 + // hours. + ExpirationDate *time.Time + + // Specify the maximum number of managed nodes you want to register. The default + // value is 1 . + RegistrationLimit *int32 + + // Reserved for internal use. + RegistrationMetadata []types.RegistrationMetadataItem + + // Optional metadata that you assign to a resource. Tags enable you to categorize + // a resource in different ways, such as by purpose, owner, or environment. For + // example, you might want to tag an activation to identify which servers or + // virtual machines (VMs) in your on-premises environment you intend to activate. + // In this case, you could specify the following key-value pairs: + // + // - Key=OS,Value=Windows + // + // - Key=Environment,Value=Production + // + // When you install SSM Agent on your on-premises servers and VMs, you specify an + // activation ID and code. When you specify the activation ID and code, tags + // assigned to the activation are automatically applied to the on-premises servers + // or VMs. + // + // You can't add tags to or delete tags from an existing activation. You can tag + // your on-premises servers, edge devices, and VMs after they connect to Systems + // Manager for the first time and are assigned a managed node ID. This means they + // are listed in the Amazon Web Services Systems Manager console with an ID that is + // prefixed with "mi-". For information about how to add tags to your managed + // nodes, see AddTagsToResource. For information about how to remove tags from your managed nodes, + // see RemoveTagsFromResource. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateActivationOutput struct { + + // The code the system generates when it processes the activation. The activation + // code functions like a password to validate the activation ID. + ActivationCode *string + + // The ID number generated by the system when it processed the activation. The + // activation ID functions like a user name. + ActivationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateActivation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateActivation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateActivation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateActivationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateActivation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateActivation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateActivation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go new file mode 100644 index 00000000000..edac5ede541 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go @@ -0,0 +1,370 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A State Manager association defines the state that you want to maintain on your +// managed nodes. For example, an association can specify that anti-virus software +// must be installed and running on your managed nodes, or that certain ports must +// be closed. For static targets, the association specifies a schedule for when the +// configuration is reapplied. For dynamic targets, such as an Amazon Web Services +// resource group or an Amazon Web Services autoscaling group, State Manager, a +// tool in Amazon Web Services Systems Manager applies the configuration when new +// managed nodes are added to the group. The association also specifies actions to +// take when applying the configuration. For example, an association for anti-virus +// software might run once a day. If the software isn't installed, then State +// Manager installs it. If the software is installed, but the service isn't +// running, then the association might instruct State Manager to start the service. +func (c *Client) CreateAssociation(ctx context.Context, params *CreateAssociationInput, optFns ...func(*Options)) (*CreateAssociationOutput, error) { + if params == nil { + params = &CreateAssociationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAssociation", params, optFns, c.addOperationCreateAssociationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAssociationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAssociationInput struct { + + // The name of the SSM Command document or Automation runbook that contains the + // configuration information for the managed node. + // + // You can specify Amazon Web Services-predefined documents, documents you + // created, or a document that is shared with you from another Amazon Web Services + // account. + // + // For Systems Manager documents (SSM documents) that are shared with you from + // other Amazon Web Services accounts, you must specify the complete SSM document + // ARN, in the following format: + // + // arn:partition:ssm:region:account-id:document/document-name + // + // For example: + // + // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document + // + // For Amazon Web Services-predefined documents and SSM documents you created in + // your account, you only need to specify the document name. For example, + // AWS-ApplyPatchBaseline or My-Document . + // + // This member is required. + Name *string + + // The details for the CloudWatch alarm you want to apply to an automation or + // command. + AlarmConfiguration *types.AlarmConfiguration + + // By default, when you create a new association, the system runs it immediately + // after it is created and then according to the schedule you specified and when + // target changes are detected. Specify true for ApplyOnlyAtCronInterval if you + // want the association to run only according to the schedule you specified. + // + // For more information, see [Understanding when associations are applied to resources] and [>About target updates with Automation runbooks] in the Amazon Web Services Systems Manager User + // Guide. + // + // This parameter isn't supported for rate expressions. + // + // [Understanding when associations are applied to resources]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling + // [>About target updates with Automation runbooks]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates + ApplyOnlyAtCronInterval bool + + // A role used by association to take actions on your behalf. State Manager will + // assume this role and call required APIs when dispatching configurations to + // nodes. If not specified, [service-linked role for Systems Manager]will be used by default. + // + // It is recommended that you define a custom IAM role so that you have full + // control of the permissions that State Manager has when taking actions on your + // behalf. + // + // Service-linked role support in State Manager is being phased out. Associations + // relying on service-linked role may require updates in the future to continue + // functioning properly. + // + // [service-linked role for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html + AssociationDispatchAssumeRole *string + + // Specify a descriptive name for the association. + AssociationName *string + + // Choose the parameter that will define how your automation will branch out. This + // target is required for associations that use an Automation runbook and target + // resources by using rate controls. Automation is a tool in Amazon Web Services + // Systems Manager. + AutomationTargetParameterName *string + + // The names of Amazon Resource Names (ARNs) of the Change Calendar type documents + // you want to gate your associations under. The associations only run when that + // change calendar is open. For more information, see [Amazon Web Services Systems Manager Change Calendar]in the Amazon Web Services + // Systems Manager User Guide. + // + // [Amazon Web Services Systems Manager Change Calendar]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar + CalendarNames []string + + // The severity level to assign to the association. + ComplianceSeverity types.AssociationComplianceSeverity + + // The document version you want to associate with the targets. Can be a specific + // version or the default version. + // + // State Manager doesn't support running associations that use a new version of a + // document if that document is shared from another account. State Manager always + // runs the default version of a document if shared from another account, even + // though the Systems Manager console shows that a new version was processed. If + // you want to run an association using a new version of a document shared form + // another account, you must set the document version to default . + DocumentVersion *string + + // The number of hours the association can run before it is canceled. Duration + // applies to associations that are currently running, and any pending and in + // progress commands on all targets. If a target was taken offline for the + // association to run, it is made available again immediately, without a reboot. + // + // The Duration parameter applies only when both these conditions are true: + // + // - The association for which you specify a duration is cancelable according to + // the parameters of the SSM command document or Automation runbook associated with + // this execution. + // + // - The command specifies the [ApplyOnlyAtCronInterval]parameter, which means that the association + // doesn't run immediately after it is created, but only according to the specified + // schedule. + // + // [ApplyOnlyAtCronInterval]: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval + Duration *int32 + + // The managed node ID. + // + // InstanceId has been deprecated. To specify a managed node ID for an + // association, use the Targets parameter. Requests that include the parameter + // InstanceID with Systems Manager documents (SSM documents) that use schema + // version 2.0 or later will fail. In addition, if you use the parameter InstanceId + // , you can't use the parameters AssociationName , DocumentVersion , MaxErrors , + // MaxConcurrency , OutputLocation , or ScheduleExpression . To use these + // parameters, you must use the Targets parameter. + InstanceId *string + + // The maximum number of targets allowed to run the association at the same time. + // You can specify a number, for example 10, or a percentage of the target set, for + // example 10%. The default value is 100%, which means all targets run the + // association at the same time. + // + // If a new managed node starts and attempts to run an association while Systems + // Manager is running MaxConcurrency associations, the association is allowed to + // run. During the next association interval, the new managed node will process its + // association within the limit specified for MaxConcurrency . + MaxConcurrency *string + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for example + // 10%. If you specify 3, for example, the system stops sending requests when the + // fourth error is received. If you specify 0, then the system stops sending + // requests after the first error is returned. If you run an association on 50 + // managed nodes and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If you + // need to ensure that there won't be more than max-errors failed executions, set + // MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string + + // An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the + // output details of the request. + OutputLocation *types.InstanceAssociationOutputLocation + + // The parameters for the runtime configuration of the document. + Parameters map[string][]string + + // A cron expression when the association will be applied to the targets. + ScheduleExpression *string + + // Number of days to wait after the scheduled day to run an association. For + // example, if you specified a cron schedule of cron(0 0 ? * THU#2 *) , you could + // specify an offset of 3 to run the association each Sunday after the second + // Thursday of the month. For more information about cron schedules for + // associations, see [Reference: Cron and rate expressions for Systems Manager]in the Amazon Web Services Systems Manager User Guide. + // + // To use offsets, you must specify the ApplyOnlyAtCronInterval parameter. This + // option tells the system not to run an association immediately after you create + // it. + // + // [Reference: Cron and rate expressions for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html + ScheduleOffset *int32 + + // The mode for generating association compliance. You can specify AUTO or MANUAL . + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT . If the association execution doesn't run + // successfully, the association is NON-COMPLIANT . + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API + // operation. In this case, compliance data isn't managed by State Manager. It is + // managed by your direct call to the PutComplianceItemsAPI operation. + // + // By default, all associations use AUTO mode. + SyncCompliance types.AssociationSyncCompliance + + // Adds or overwrites one or more tags for a State Manager association. Tags are + // metadata that you can assign to your Amazon Web Services resources. Tags enable + // you to categorize your resources in different ways, for example, by purpose, + // owner, or environment. Each tag consists of a key and an optional value, both of + // which you define. + Tags []types.Tag + + // A location is a combination of Amazon Web Services Regions and Amazon Web + // Services accounts where you want to run the association. Use this action to + // create an association in multiple Regions and multiple accounts. + // + // The IncludeChildOrganizationUnits parameter is not supported by State Manager. + TargetLocations []types.TargetLocation + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The targets for the association. You can target managed nodes by using tags, + // Amazon Web Services resource groups, all managed nodes in an Amazon Web Services + // account, or individual managed node IDs. You can target all managed nodes in an + // Amazon Web Services account by specifying the InstanceIds key with a value of * + // . For more information about choosing targets for an association, see [Understanding targets and rate controls in State Manager associations]in the + // Amazon Web Services Systems Manager User Guide. + // + // [Understanding targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html + Targets []types.Target + + noSmithyDocumentSerde +} + +type CreateAssociationOutput struct { + + // Information about the association. + AssociationDescription *types.AssociationDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAssociation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAssociation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAssociation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateAssociationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAssociation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAssociation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAssociation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go new file mode 100644 index 00000000000..69589ad6f95 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates the specified Amazon Web Services Systems Manager document (SSM +// document) with the specified managed nodes or targets. +// +// When you associate a document with one or more managed nodes using IDs or tags, +// Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed +// node processes the document and configures the node as specified. +// +// If you associate a document with a managed node that already has an associated +// document, the system returns the AssociationAlreadyExists exception. +func (c *Client) CreateAssociationBatch(ctx context.Context, params *CreateAssociationBatchInput, optFns ...func(*Options)) (*CreateAssociationBatchOutput, error) { + if params == nil { + params = &CreateAssociationBatchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAssociationBatch", params, optFns, c.addOperationCreateAssociationBatchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAssociationBatchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAssociationBatchInput struct { + + // One or more associations. + // + // This member is required. + Entries []types.CreateAssociationBatchRequestEntry + + // A role used by association to take actions on your behalf. State Manager will + // assume this role and call required APIs when dispatching configurations to + // nodes. If not specified, [service-linked role for Systems Manager]will be used by default. + // + // It is recommended that you define a custom IAM role so that you have full + // control of the permissions that State Manager has when taking actions on your + // behalf. + // + // Service-linked role support in State Manager is being phased out. Associations + // relying on service-linked role may require updates in the future to continue + // functioning properly. + // + // [service-linked role for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html + AssociationDispatchAssumeRole *string + + noSmithyDocumentSerde +} + +type CreateAssociationBatchOutput struct { + + // Information about the associations that failed. + Failed []types.FailedCreateAssociation + + // Information about the associations that succeeded. + Successful []types.AssociationDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAssociationBatch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAssociationBatch{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAssociationBatch"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateAssociationBatchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAssociationBatch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAssociationBatch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAssociationBatch", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go new file mode 100644 index 00000000000..001f8521c69 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go @@ -0,0 +1,255 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Amazon Web Services Systems Manager (SSM document). An SSM document +// defines the actions that Systems Manager performs on your managed nodes. For +// more information about SSM documents, including information about supported +// schemas, features, and syntax, see [Amazon Web Services Systems Manager Documents]in the Amazon Web Services Systems Manager +// User Guide. +// +// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents.html +func (c *Client) CreateDocument(ctx context.Context, params *CreateDocumentInput, optFns ...func(*Options)) (*CreateDocumentOutput, error) { + if params == nil { + params = &CreateDocumentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDocument", params, optFns, c.addOperationCreateDocumentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDocumentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateDocumentInput struct { + + // The content for the new SSM document in JSON or YAML format. The content of the + // document must not exceed 64KB. This quota also includes the content specified + // for input parameters at runtime. We recommend storing the contents for your new + // document in an external JSON or YAML file and referencing the file in a command. + // + // For examples, see the following topics in the Amazon Web Services Systems + // Manager User Guide. + // + // [Create an SSM document (console)] + // + // [Create an SSM document (command line)] + // + // [Create an SSM document (API)] + // + // [Create an SSM document (console)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-console + // [Create an SSM document (command line)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-cli + // [Create an SSM document (API)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-using.html#create-ssm-document-api + // + // This member is required. + Content *string + + // A name for the SSM document. + // + // You can't use the following strings as document name prefixes. These are + // reserved by Amazon Web Services for use as document name prefixes: + // + // - aws + // + // - amazon + // + // - amzn + // + // - AWSEC2 + // + // - AWSConfigRemediation + // + // - AWSSupport + // + // This member is required. + Name *string + + // A list of key-value pairs that describe attachments to a version of a document. + Attachments []types.AttachmentsSource + + // An optional field where you can specify a friendly name for the SSM document. + // This value can differ for each version of the document. You can update this + // value at a later time using the UpdateDocumentoperation. + DisplayName *string + + // Specify the document format for the request. The document format can be JSON, + // YAML, or TEXT. JSON is the default format. + DocumentFormat types.DocumentFormat + + // The type of document to create. + // + // The DeploymentStrategy document type is an internal-use-only document type + // reserved for AppConfig. + DocumentType types.DocumentType + + // A list of SSM documents required by a document. This parameter is used + // exclusively by AppConfig. When a user creates an AppConfig configuration in an + // SSM document, the user must also specify a required document for validation + // purposes. In this case, an ApplicationConfiguration document requires an + // ApplicationConfigurationSchema document for validation purposes. For more + // information, see [What is AppConfig?]in the AppConfig User Guide. + // + // [What is AppConfig?]: https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html + Requires []types.DocumentRequires + + // Optional metadata that you assign to a resource. Tags enable you to categorize + // a resource in different ways, such as by purpose, owner, or environment. For + // example, you might want to tag an SSM document to identify the types of targets + // or the environment where it will run. In this case, you could specify the + // following key-value pairs: + // + // - Key=OS,Value=Windows + // + // - Key=Environment,Value=Production + // + // To add tags to an existing SSM document, use the AddTagsToResource operation. + Tags []types.Tag + + // Specify a target type to define the kinds of resources the document can run on. + // For example, to run a document on EC2 instances, specify the following value: + // /AWS::EC2::Instance . If you specify a value of '/' the document can run on all + // types of resources. If you don't specify a value, the document can't run on any + // resources. For a list of valid resource types, see [Amazon Web Services resource and property types reference]in the CloudFormation User + // Guide. + // + // [Amazon Web Services resource and property types reference]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html + TargetType *string + + // An optional field specifying the version of the artifact you are creating with + // the document. For example, Release12.1 . This value is unique across all + // versions of a document, and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +type CreateDocumentOutput struct { + + // Information about the SSM document. + DocumentDescription *types.DocumentDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDocument{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDocument{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDocument"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateDocumentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDocument(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateDocument(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateDocument", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go new file mode 100644 index 00000000000..ac036c3ded2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new maintenance window. +// +// The value you specify for Duration determines the specific end time for the +// maintenance window based on the time it begins. No maintenance window tasks are +// permitted to start after the resulting endtime minus the number of hours you +// specify for Cutoff . For example, if the maintenance window starts at 3 PM, the +// duration is three hours, and the value you specify for Cutoff is one hour, no +// maintenance window tasks can start after 5 PM. +func (c *Client) CreateMaintenanceWindow(ctx context.Context, params *CreateMaintenanceWindowInput, optFns ...func(*Options)) (*CreateMaintenanceWindowOutput, error) { + if params == nil { + params = &CreateMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateMaintenanceWindow", params, optFns, c.addOperationCreateMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateMaintenanceWindowInput struct { + + // Enables a maintenance window task to run on managed nodes, even if you haven't + // registered those nodes as targets. If enabled, then you must specify the + // unregistered managed nodes (by node ID) when you register a task with the + // maintenance window. + // + // If you don't enable this option, then you must specify previously-registered + // targets when you register a task with the maintenance window. + // + // This member is required. + AllowUnassociatedTargets bool + + // The number of hours before the end of the maintenance window that Amazon Web + // Services Systems Manager stops scheduling new tasks for execution. + // + // This member is required. + Cutoff int32 + + // The duration of the maintenance window in hours. + // + // This member is required. + Duration *int32 + + // The name of the maintenance window. + // + // This member is required. + Name *string + + // The schedule of the maintenance window in the form of a cron or rate expression. + // + // This member is required. + Schedule *string + + // User-provided idempotency token. + ClientToken *string + + // An optional description for the maintenance window. We recommend specifying a + // description to help you organize your maintenance windows. + Description *string + + // The date and time, in ISO-8601 Extended format, for when you want the + // maintenance window to become inactive. EndDate allows you to set a date and + // time in the future when the maintenance window will no longer run. + EndDate *string + + // The number of days to wait after the date and time specified by a cron + // expression before running the maintenance window. + // + // For example, the following cron expression schedules a maintenance window to + // run on the third Tuesday of every month at 11:30 PM. + // + // cron(30 23 ? * TUE#3 *) + // + // If the schedule offset is 2 , the maintenance window won't run until two days + // later. + ScheduleOffset *int32 + + // The time zone that the scheduled maintenance window executions are based on, in + // Internet Assigned Numbers Authority (IANA) format. For example: + // "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the [Time Zone Database]on + // the IANA website. + // + // [Time Zone Database]: https://www.iana.org/time-zones + ScheduleTimezone *string + + // The date and time, in ISO-8601 Extended format, for when you want the + // maintenance window to become active. StartDate allows you to delay activation + // of the maintenance window until the specified future date. + // + // When using a rate schedule, if you provide a start date that occurs in the + // past, the current date and time are used as the start date. + StartDate *string + + // Optional metadata that you assign to a resource. Tags enable you to categorize + // a resource in different ways, such as by purpose, owner, or environment. For + // example, you might want to tag a maintenance window to identify the type of + // tasks it will run, the types of targets, and the environment it will run in. In + // this case, you could specify the following key-value pairs: + // + // - Key=TaskType,Value=AgentUpdate + // + // - Key=OS,Value=Windows + // + // - Key=Environment,Value=Production + // + // To add tags to an existing maintenance window, use the AddTagsToResource operation. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateMaintenanceWindowOutput struct { + + // The ID of the created maintenance window. + WindowId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateMaintenanceWindowMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateMaintenanceWindow struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateMaintenanceWindow) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMaintenanceWindowInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateMaintenanceWindowMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMaintenanceWindow{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go new file mode 100644 index 00000000000..b4e3382268d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go @@ -0,0 +1,290 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a new OpsItem. You must have permission in Identity and Access +// Management (IAM) to create a new OpsItem. For more information, see [Set up OpsCenter]in the +// Amazon Web Services Systems Manager User Guide. +// +// Operations engineers and IT professionals use Amazon Web Services Systems +// Manager OpsCenter to view, investigate, and remediate operational issues +// impacting the performance and health of their Amazon Web Services resources. For +// more information, see [Amazon Web Services Systems Manager OpsCenter]in the Amazon Web Services Systems Manager User Guide. +// +// [Amazon Web Services Systems Manager OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html +// [Set up OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html +func (c *Client) CreateOpsItem(ctx context.Context, params *CreateOpsItemInput, optFns ...func(*Options)) (*CreateOpsItemOutput, error) { + if params == nil { + params = &CreateOpsItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOpsItem", params, optFns, c.addOperationCreateOpsItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOpsItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOpsItemInput struct { + + // User-defined text that contains information about the OpsItem, in Markdown + // format. + // + // Provide enough information so that users viewing this OpsItem for the first + // time understand the issue. + // + // This member is required. + Description *string + + // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. + // + // The source name can't contain the following strings: aws , amazon , and amzn . + // + // This member is required. + Source *string + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + // + // This member is required. + Title *string + + // The target Amazon Web Services account where you want to create an OpsItem. To + // make this call, your account must be configured to work with OpsItems across + // accounts. For more information, see [Set up OpsCenter]in the Amazon Web Services Systems Manager + // User Guide. + // + // [Set up OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html + AccountId *string + + // The time a runbook workflow ended. Currently reported only for the OpsItem type + // /aws/changerequest . + ActualEndTime *time.Time + + // The time a runbook workflow started. Currently reported only for the OpsItem + // type /aws/changerequest . + ActualStartTime *time.Time + + // Specify a category to assign to an OpsItem. + Category *string + + // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent + // when this OpsItem is edited or changed. + Notifications []types.OpsItemNotification + + // Operational data is custom data that provides useful reference details about + // the OpsItem. For example, you can specify log files, error strings, license + // keys, troubleshooting tips, or other relevant data. You enter operational data + // as key-value pairs. The key has a maximum length of 128 characters. The value + // has a maximum size of 20 KB. + // + // Operational data keys can't begin with the following: amazon , aws , amzn , ssm + // , /amazon , /aws , /amzn , /ssm . + // + // You can choose to make the data searchable by other users in the account or you + // can restrict search access. Searchable data means that all users with access to + // the OpsItem Overview page (as provided by the DescribeOpsItemsAPI operation) can view and + // search on the specified data. Operational data that isn't searchable is only + // viewable by users who have access to the OpsItem (as provided by the GetOpsItemAPI + // operation). + // + // Use the /aws/resources key in OperationalData to specify a related resource in + // the request. Use the /aws/automations key in OperationalData to associate an + // Automation runbook with the OpsItem. To view Amazon Web Services CLI example + // commands that use these keys, see [Create OpsItems manually]in the Amazon Web Services Systems Manager + // User Guide. + // + // [Create OpsItems manually]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html + OperationalData map[string]types.OpsItemDataValue + + // The type of OpsItem to create. Systems Manager supports the following types of + // OpsItems: + // + // - /aws/issue + // + // This type of OpsItem is used for default OpsItems created by OpsCenter. + // + // - /aws/insight + // + // This type of OpsItem is used by OpsCenter for aggregating and reporting on + // duplicate OpsItems. + // + // - /aws/changerequest + // + // This type of OpsItem is used by Change Manager for reviewing and approving or + // rejecting change requests. + // + // Amazon Web Services Systems Manager Change Manager is no longer open to new + // customers. Existing customers can continue to use the service as normal. For + // more information, see [Amazon Web Services Systems Manager Change Manager availability change]. + // + // [Amazon Web Services Systems Manager Change Manager availability change]: https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html + OpsItemType *string + + // The time specified in a change request for a runbook workflow to end. Currently + // supported only for the OpsItem type /aws/changerequest . + PlannedEndTime *time.Time + + // The time specified in a change request for a runbook workflow to start. + // Currently supported only for the OpsItem type /aws/changerequest . + PlannedStartTime *time.Time + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int32 + + // One or more OpsItems that share something in common with the current OpsItems. + // For example, related OpsItems can include OpsItems with similar error messages, + // impacted resources, or statuses for the impacted resource. + RelatedOpsItems []types.RelatedOpsItem + + // Specify a severity to assign to an OpsItem. + Severity *string + + // Optional metadata that you assign to a resource. + // + // Tags use a key-value pair. For example: + // + // Key=Department,Value=Finance + // + // To add tags to a new OpsItem, a user must have IAM permissions for both the + // ssm:CreateOpsItems operation and the ssm:AddTagsToResource operation. To add + // tags to an existing OpsItem, use the AddTagsToResourceoperation. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateOpsItemOutput struct { + + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + + // The ID of the OpsItem. + OpsItemId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOpsItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOpsItem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOpsItem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateOpsItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpsItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOpsItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOpsItem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go new file mode 100644 index 00000000000..c0d4838d219 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// If you create a new application in Application Manager, Amazon Web Services +// Systems Manager calls this API operation to specify information about the new +// application, including the application type. +func (c *Client) CreateOpsMetadata(ctx context.Context, params *CreateOpsMetadataInput, optFns ...func(*Options)) (*CreateOpsMetadataOutput, error) { + if params == nil { + params = &CreateOpsMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOpsMetadata", params, optFns, c.addOperationCreateOpsMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOpsMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOpsMetadataInput struct { + + // A resource ID for a new Application Manager application. + // + // This member is required. + ResourceId *string + + // Metadata for a new Application Manager application. + Metadata map[string]types.MetadataValue + + // Optional metadata that you assign to a resource. You can specify a maximum of + // five tags for an OpsMetadata object. Tags enable you to categorize a resource in + // different ways, such as by purpose, owner, or environment. For example, you + // might want to tag an OpsMetadata object to identify an environment or target + // Amazon Web Services Region. In this case, you could specify the following + // key-value pairs: + // + // - Key=Environment,Value=Production + // + // - Key=Region,Value=us-east-2 + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateOpsMetadataOutput struct { + + // The Amazon Resource Name (ARN) of the OpsMetadata Object or blob created by the + // call. + OpsMetadataArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOpsMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOpsMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOpsMetadata"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateOpsMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOpsMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOpsMetadata", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go new file mode 100644 index 00000000000..5898e4588ef --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go @@ -0,0 +1,305 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a patch baseline. +// +// For information about valid key-value pairs in PatchFilters for each supported +// operating system type, see PatchFilter. +func (c *Client) CreatePatchBaseline(ctx context.Context, params *CreatePatchBaselineInput, optFns ...func(*Options)) (*CreatePatchBaselineOutput, error) { + if params == nil { + params = &CreatePatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePatchBaseline", params, optFns, c.addOperationCreatePatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePatchBaselineInput struct { + + // The name of the patch baseline. + // + // This member is required. + Name *string + + // A set of rules used to include patches in the baseline. + ApprovalRules *types.PatchRuleGroup + + // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + ApprovedPatches []string + + // Defines the compliance level for approved patches. When an approved patch is + // reported as missing, this value describes the severity of the compliance + // violation. The default value is UNSPECIFIED . + ApprovedPatchesComplianceLevel types.PatchComplianceLevel + + // Indicates whether the list of approved patches includes non-security updates + // that should be applied to the managed nodes. The default value is false . + // Applies to Linux managed nodes only. + ApprovedPatchesEnableNonSecurity *bool + + // Indicates the status you want to assign to security patches that are available + // but not approved because they don't meet the installation criteria specified in + // the patch baseline. + // + // Example scenario: Security patches that you might want installed can be skipped + // if you have specified a long period to wait after a patch is released before + // installation. If an update to the patch is released during your specified + // waiting period, the waiting period for installing the patch starts over. If the + // waiting period is too long, multiple versions of the patch could be released but + // never installed. + // + // Supported for Windows Server managed nodes only. + AvailableSecurityUpdatesComplianceStatus types.PatchComplianceStatus + + // User-provided idempotency token. + ClientToken *string + + // A description of the patch baseline. + Description *string + + // A set of global filters used to include patches in the baseline. + // + // The GlobalFilters parameter can be configured only by using the CLI or an + // Amazon Web Services SDK. It can't be configured from the Patch Manager console, + // and its value isn't displayed in the console. + GlobalFilters *types.PatchFilterGroup + + // Defines the operating system the patch baseline applies to. The default value + // is WINDOWS . + OperatingSystem types.OperatingSystem + + // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + RejectedPatches []string + + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. + // + // ALLOW_AS_DEPENDENCY Linux and macOS: A package in the rejected patches list is + // installed only if it is a dependency of another package. It is considered + // compliant with the patch baseline, and its status is reported as INSTALLED_OTHER + // . This is the default action if no option is specified. + // + // Windows Server: Windows Server doesn't support the concept of package + // dependencies. If a package in the rejected patches list and already installed on + // the node, its status is reported as INSTALLED_OTHER . Any package not already + // installed on the node is skipped. This is the default action if no option is + // specified. + // + // BLOCK All OSs: Packages in the rejected patches list, and packages that + // include them as dependencies, aren't installed by Patch Manager under any + // circumstances. + // + // State value assignment for patch compliance: + // + // - If a package was installed before it was added to the rejected patches + // list, or is installed outside of Patch Manager afterward, it's considered + // noncompliant with the patch baseline and its status is reported as + // INSTALLED_REJECTED . + // + // - If an update attempts to install a dependency package that is now rejected + // by the baseline, when previous versions of the package were not rejected, the + // package being updated is reported as MISSING for SCAN operations and as FAILED + // for INSTALL operations. + RejectedPatchesAction types.PatchAction + + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. + Sources []types.PatchSource + + // Optional metadata that you assign to a resource. Tags enable you to categorize + // a resource in different ways, such as by purpose, owner, or environment. For + // example, you might want to tag a patch baseline to identify the severity level + // of patches it specifies and the operating system family it applies to. In this + // case, you could specify the following key-value pairs: + // + // - Key=PatchSeverity,Value=Critical + // + // - Key=OS,Value=Windows + // + // To add tags to an existing patch baseline, use the AddTagsToResource operation. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreatePatchBaselineOutput struct { + + // The ID of the created patch baseline. + BaselineId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreatePatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreatePatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreatePatchBaselineMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreatePatchBaselineValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreatePatchBaseline struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreatePatchBaseline) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreatePatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreatePatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreatePatchBaselineInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreatePatchBaselineMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreatePatchBaseline{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreatePatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreatePatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go new file mode 100644 index 00000000000..acd210662ef --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go @@ -0,0 +1,197 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A resource data sync helps you view data from multiple sources in a single +// location. Amazon Web Services Systems Manager offers two types of resource data +// sync: SyncToDestination and SyncFromSource . +// +// You can configure Systems Manager Inventory to use the SyncToDestination type +// to synchronize Inventory data from multiple Amazon Web Services Regions to a +// single Amazon Simple Storage Service (Amazon S3) bucket. For more information, +// see [Creating a resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. +// +// You can configure Systems Manager Explorer to use the SyncFromSource type to +// synchronize operational work items (OpsItems) and operational data (OpsData) +// from multiple Amazon Web Services Regions to a single Amazon S3 bucket. This +// type can synchronize OpsItems and OpsData from multiple Amazon Web Services +// accounts and Amazon Web Services Regions or EntireOrganization by using +// Organizations. For more information, see [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]in the Amazon Web Services Systems +// Manager User Guide. +// +// A resource data sync is an asynchronous operation that returns immediately. +// After a successful initial sync is completed, the system continuously syncs +// data. To check the status of a sync, use the ListResourceDataSync. +// +// By default, data isn't encrypted in Amazon S3. We strongly recommend that you +// enable encryption in Amazon S3 to ensure secure data storage. We also recommend +// that you secure access to the Amazon S3 bucket by creating a restrictive bucket +// policy. +// +// [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html +// [Creating a resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-create-resource-data-sync.html +func (c *Client) CreateResourceDataSync(ctx context.Context, params *CreateResourceDataSyncInput, optFns ...func(*Options)) (*CreateResourceDataSyncOutput, error) { + if params == nil { + params = &CreateResourceDataSyncInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateResourceDataSync", params, optFns, c.addOperationCreateResourceDataSyncMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateResourceDataSyncOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateResourceDataSyncInput struct { + + // A name for the configuration. + // + // This member is required. + SyncName *string + + // Amazon S3 configuration details for the sync. This parameter is required if the + // SyncType value is SyncToDestination. + S3Destination *types.ResourceDataSyncS3Destination + + // Specify information about the data sources to synchronize. This parameter is + // required if the SyncType value is SyncFromSource. + SyncSource *types.ResourceDataSyncSource + + // Specify SyncToDestination to create a resource data sync that synchronizes data + // to an S3 bucket for Inventory. If you specify SyncToDestination , you must + // provide a value for S3Destination . Specify SyncFromSource to synchronize data + // from a single account and multiple Regions, or multiple Amazon Web Services + // accounts and Amazon Web Services Regions, as listed in Organizations for + // Explorer. If you specify SyncFromSource , you must provide a value for + // SyncSource . The default value is SyncToDestination . + SyncType *string + + noSmithyDocumentSerde +} + +type CreateResourceDataSyncOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateResourceDataSync{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateResourceDataSync{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateResourceDataSync"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateResourceDataSyncValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResourceDataSync(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateResourceDataSync", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go new file mode 100644 index 00000000000..79043dd4c1d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an activation. You aren't required to delete an activation. If you +// delete an activation, you can no longer use it to register additional managed +// nodes. Deleting an activation doesn't de-register managed nodes. You must +// manually de-register managed nodes. +func (c *Client) DeleteActivation(ctx context.Context, params *DeleteActivationInput, optFns ...func(*Options)) (*DeleteActivationOutput, error) { + if params == nil { + params = &DeleteActivationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteActivation", params, optFns, c.addOperationDeleteActivationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteActivationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteActivationInput struct { + + // The ID of the activation that you want to delete. + // + // This member is required. + ActivationId *string + + noSmithyDocumentSerde +} + +type DeleteActivationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteActivation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteActivation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteActivation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteActivationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteActivation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteActivation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteActivation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go new file mode 100644 index 00000000000..8bb3c576775 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates the specified Amazon Web Services Systems Manager document (SSM +// document) from the specified managed node. If you created the association by +// using the Targets parameter, then you must delete the association by using the +// association ID. +// +// When you disassociate a document from a managed node, it doesn't change the +// configuration of the node. To change the configuration state of a managed node +// after you disassociate a document, you must create a new document with the +// desired configuration and associate it with the node. +func (c *Client) DeleteAssociation(ctx context.Context, params *DeleteAssociationInput, optFns ...func(*Options)) (*DeleteAssociationOutput, error) { + if params == nil { + params = &DeleteAssociationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAssociation", params, optFns, c.addOperationDeleteAssociationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAssociationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAssociationInput struct { + + // The association ID that you want to delete. + AssociationId *string + + // The managed node ID. + // + // InstanceId has been deprecated. To specify a managed node ID for an + // association, use the Targets parameter. Requests that include the parameter + // InstanceID with Systems Manager documents (SSM documents) that use schema + // version 2.0 or later will fail. In addition, if you use the parameter InstanceId + // , you can't use the parameters AssociationName , DocumentVersion , MaxErrors , + // MaxConcurrency , OutputLocation , or ScheduleExpression . To use these + // parameters, you must use the Targets parameter. + InstanceId *string + + // The name of the SSM document. + Name *string + + noSmithyDocumentSerde +} + +type DeleteAssociationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAssociation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAssociation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAssociation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAssociation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAssociation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAssociation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go new file mode 100644 index 00000000000..ef4db2cd134 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the Amazon Web Services Systems Manager document (SSM document) and all +// managed node associations to the document. +// +// Before you delete the document, we recommend that you use DeleteAssociation to disassociate all +// managed nodes that are associated with the document. +func (c *Client) DeleteDocument(ctx context.Context, params *DeleteDocumentInput, optFns ...func(*Options)) (*DeleteDocumentOutput, error) { + if params == nil { + params = &DeleteDocumentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDocument", params, optFns, c.addOperationDeleteDocumentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDocumentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDocumentInput struct { + + // The name of the document. + // + // This member is required. + Name *string + + // The version of the document that you want to delete. If not provided, all + // versions of the document are deleted. + DocumentVersion *string + + // Some SSM document types require that you specify a Force flag before you can + // delete the document. For example, you must specify a Force flag to delete a + // document of type ApplicationConfigurationSchema . You can restrict access to the + // Force flag in an Identity and Access Management (IAM) policy. + Force bool + + // The version name of the document that you want to delete. If not provided, all + // versions of the document are deleted. + VersionName *string + + noSmithyDocumentSerde +} + +type DeleteDocumentOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDocument{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDocument{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDocument"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDocumentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDocument(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDocument(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDocument", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go new file mode 100644 index 00000000000..09f58ecaa9e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go @@ -0,0 +1,231 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete a custom inventory type or the data associated with a custom Inventory +// type. Deleting a custom inventory type is also referred to as deleting a custom +// inventory schema. +func (c *Client) DeleteInventory(ctx context.Context, params *DeleteInventoryInput, optFns ...func(*Options)) (*DeleteInventoryOutput, error) { + if params == nil { + params = &DeleteInventoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteInventory", params, optFns, c.addOperationDeleteInventoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteInventoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteInventoryInput struct { + + // The name of the custom inventory type for which you want to delete either all + // previously collected data or the inventory type itself. + // + // This member is required. + TypeName *string + + // User-provided idempotency token. + ClientToken *string + + // Use this option to view a summary of the deletion request without deleting any + // data or the data type. This option is useful when you only want to understand + // what will be deleted. Once you validate that the data to be deleted is what you + // intend to delete, you can run the same command without specifying the DryRun + // option. + DryRun bool + + // Use the SchemaDeleteOption to delete a custom inventory type (schema). If you + // don't choose this option, the system only deletes existing inventory data + // associated with the custom inventory type. Choose one of the following options: + // + // DisableSchema: If you choose this option, the system ignores all inventory data + // for the specified version, and any earlier versions. To enable this schema + // again, you must call the PutInventory operation for a version greater than the + // disabled version. + // + // DeleteSchema: This option deletes the specified custom type from the Inventory + // service. You can recreate the schema later, if you want. + SchemaDeleteOption types.InventorySchemaDeleteOption + + noSmithyDocumentSerde +} + +type DeleteInventoryOutput struct { + + // Every DeleteInventory operation is assigned a unique ID. This option returns a + // unique ID. You can use this ID to query the status of a delete operation. This + // option is useful for ensuring that a delete operation has completed before you + // begin other operations. + DeletionId *string + + // A summary of the delete operation. For more information about this summary, see [Deleting custom inventory] + // in the Amazon Web Services Systems Manager User Guide. + // + // [Deleting custom inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary + DeletionSummary *types.InventoryDeletionSummary + + // The name of the inventory data type specified in the request. + TypeName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteInventory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteInventory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInventory"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteInventoryMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteInventoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInventory(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteInventory struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteInventory) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteInventory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteInventoryInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteInventoryInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteInventoryMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteInventory{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteInventory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteInventory", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go new file mode 100644 index 00000000000..d207e567bf0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a maintenance window. +func (c *Client) DeleteMaintenanceWindow(ctx context.Context, params *DeleteMaintenanceWindowInput, optFns ...func(*Options)) (*DeleteMaintenanceWindowOutput, error) { + if params == nil { + params = &DeleteMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMaintenanceWindow", params, optFns, c.addOperationDeleteMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMaintenanceWindowInput struct { + + // The ID of the maintenance window to delete. + // + // This member is required. + WindowId *string + + noSmithyDocumentSerde +} + +type DeleteMaintenanceWindowOutput struct { + + // The ID of the deleted maintenance window. + WindowId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go new file mode 100644 index 00000000000..58f1644843f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete an OpsItem. You must have permission in Identity and Access Management +// (IAM) to delete an OpsItem. +// +// Note the following important information about this operation. +// +// - Deleting an OpsItem is irreversible. You can't restore a deleted OpsItem. +// +// - This operation uses an eventual consistency model, which means the system +// can take a few minutes to complete this operation. If you delete an OpsItem and +// immediately call, for example, GetOpsItem, the deleted OpsItem might still appear in +// the response. +// +// - This operation is idempotent. The system doesn't throw an exception if you +// repeatedly call this operation for the same OpsItem. If the first call is +// successful, all additional calls return the same successful response as the +// first call. +// +// - This operation doesn't support cross-account calls. A delegated +// administrator or management account can't delete OpsItems in other accounts, +// even if OpsCenter has been set up for cross-account administration. For more +// information about cross-account administration, see [Setting up OpsCenter to centrally manage OpsItems across accounts]in the Systems Manager +// User Guide. +// +// [Setting up OpsCenter to centrally manage OpsItems across accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setting-up-cross-account.html +func (c *Client) DeleteOpsItem(ctx context.Context, params *DeleteOpsItemInput, optFns ...func(*Options)) (*DeleteOpsItemOutput, error) { + if params == nil { + params = &DeleteOpsItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOpsItem", params, optFns, c.addOperationDeleteOpsItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOpsItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOpsItemInput struct { + + // The ID of the OpsItem that you want to delete. + // + // This member is required. + OpsItemId *string + + noSmithyDocumentSerde +} + +type DeleteOpsItemOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOpsItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOpsItem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOpsItem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteOpsItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOpsItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOpsItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteOpsItem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go new file mode 100644 index 00000000000..6bd6f2da833 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete OpsMetadata related to an application. +func (c *Client) DeleteOpsMetadata(ctx context.Context, params *DeleteOpsMetadataInput, optFns ...func(*Options)) (*DeleteOpsMetadataOutput, error) { + if params == nil { + params = &DeleteOpsMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOpsMetadata", params, optFns, c.addOperationDeleteOpsMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOpsMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOpsMetadataInput struct { + + // The Amazon Resource Name (ARN) of an OpsMetadata Object to delete. + // + // This member is required. + OpsMetadataArn *string + + noSmithyDocumentSerde +} + +type DeleteOpsMetadataOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOpsMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOpsMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOpsMetadata"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteOpsMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOpsMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteOpsMetadata", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go new file mode 100644 index 00000000000..457fc53ca82 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete a parameter from the system. After deleting a parameter, wait for at +// least 30 seconds to create a parameter with the same name. +func (c *Client) DeleteParameter(ctx context.Context, params *DeleteParameterInput, optFns ...func(*Options)) (*DeleteParameterOutput, error) { + if params == nil { + params = &DeleteParameterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteParameter", params, optFns, c.addOperationDeleteParameterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteParameterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteParameterInput struct { + + // The name of the parameter to delete. + // + // You can't enter the Amazon Resource Name (ARN) for a parameter, only the + // parameter name itself. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteParameterOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteParameter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteParameter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteParameter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteParameterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteParameter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteParameter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteParameter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go new file mode 100644 index 00000000000..182b507b9ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete a list of parameters. After deleting a parameter, wait for at least 30 +// seconds to create a parameter with the same name. +func (c *Client) DeleteParameters(ctx context.Context, params *DeleteParametersInput, optFns ...func(*Options)) (*DeleteParametersOutput, error) { + if params == nil { + params = &DeleteParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteParameters", params, optFns, c.addOperationDeleteParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteParametersInput struct { + + // The names of the parameters to delete. After deleting a parameter, wait for at + // least 30 seconds to create a parameter with the same name. + // + // You can't enter the Amazon Resource Name (ARN) for a parameter, only the + // parameter name itself. + // + // This member is required. + Names []string + + noSmithyDocumentSerde +} + +type DeleteParametersOutput struct { + + // The names of the deleted parameters. + DeletedParameters []string + + // The names of parameters that weren't deleted because the parameters aren't + // valid. + InvalidParameters []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteParametersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteParameters", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go new file mode 100644 index 00000000000..88aa7cb54ba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a patch baseline. +func (c *Client) DeletePatchBaseline(ctx context.Context, params *DeletePatchBaselineInput, optFns ...func(*Options)) (*DeletePatchBaselineOutput, error) { + if params == nil { + params = &DeletePatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePatchBaseline", params, optFns, c.addOperationDeletePatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePatchBaselineInput struct { + + // The ID of the patch baseline to delete. + // + // This member is required. + BaselineId *string + + noSmithyDocumentSerde +} + +type DeletePatchBaselineOutput struct { + + // The ID of the deleted patch baseline. + BaselineId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeletePatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeletePatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeletePatchBaselineValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go new file mode 100644 index 00000000000..5b14caefc49 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a resource data sync configuration. After the configuration is deleted, +// changes to data on managed nodes are no longer synced to or from the target. +// Deleting a sync configuration doesn't delete data. +func (c *Client) DeleteResourceDataSync(ctx context.Context, params *DeleteResourceDataSyncInput, optFns ...func(*Options)) (*DeleteResourceDataSyncOutput, error) { + if params == nil { + params = &DeleteResourceDataSyncInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourceDataSync", params, optFns, c.addOperationDeleteResourceDataSyncMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourceDataSyncOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourceDataSyncInput struct { + + // The name of the configuration to delete. + // + // This member is required. + SyncName *string + + // Specify the type of resource data sync to delete. + SyncType *string + + noSmithyDocumentSerde +} + +type DeleteResourceDataSyncOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourceDataSync{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourceDataSync{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourceDataSync"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteResourceDataSyncValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourceDataSync(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourceDataSync", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..c602a049901 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a Systems Manager resource policy. A resource policy helps you to +// define the IAM entity (for example, an Amazon Web Services account) that can +// manage your Systems Manager resources. The following resources support Systems +// Manager resource policies. +// +// - OpsItemGroup - The resource policy for OpsItemGroup enables Amazon Web +// Services accounts to view and interact with OpsCenter operational work items +// (OpsItems). +// +// - Parameter - The resource policy is used to share a parameter with other +// accounts using Resource Access Manager (RAM). For more information about +// cross-account sharing of parameters, see [Working with shared parameters]in the Amazon Web Services Systems +// Manager User Guide. +// +// [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // ID of the current policy version. The hash helps to prevent multiple calls from + // attempting to overwrite a policy. + // + // This member is required. + PolicyHash *string + + // The policy ID. + // + // This member is required. + PolicyId *string + + // Amazon Resource Name (ARN) of the resource to which the policies are attached. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go new file mode 100644 index 00000000000..fca5e2e0b30 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the server or virtual machine from the list of registered servers. +// +// If you want to reregister an on-premises server, edge device, or VM, you must +// use a different Activation Code and Activation ID than used to register the +// machine previously. The Activation Code and Activation ID must not have already +// been used on the maximum number of activations specified when they were created. +// For more information, see [Deregistering managed nodes in a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User Guide. +// +// [Deregistering managed nodes in a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/fleet-manager-deregister-hybrid-nodes.html +func (c *Client) DeregisterManagedInstance(ctx context.Context, params *DeregisterManagedInstanceInput, optFns ...func(*Options)) (*DeregisterManagedInstanceOutput, error) { + if params == nil { + params = &DeregisterManagedInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterManagedInstance", params, optFns, c.addOperationDeregisterManagedInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterManagedInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterManagedInstanceInput struct { + + // The ID assigned to the managed node when you registered it using the activation + // process. + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type DeregisterManagedInstanceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterManagedInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterManagedInstance{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterManagedInstance"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeregisterManagedInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterManagedInstance(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeregisterManagedInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeregisterManagedInstance", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go new file mode 100644 index 00000000000..0e69416faa3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a patch group from a patch baseline. +func (c *Client) DeregisterPatchBaselineForPatchGroup(ctx context.Context, params *DeregisterPatchBaselineForPatchGroupInput, optFns ...func(*Options)) (*DeregisterPatchBaselineForPatchGroupOutput, error) { + if params == nil { + params = &DeregisterPatchBaselineForPatchGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterPatchBaselineForPatchGroup", params, optFns, c.addOperationDeregisterPatchBaselineForPatchGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterPatchBaselineForPatchGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterPatchBaselineForPatchGroupInput struct { + + // The ID of the patch baseline to deregister the patch group from. + // + // This member is required. + BaselineId *string + + // The name of the patch group that should be deregistered from the patch baseline. + // + // This member is required. + PatchGroup *string + + noSmithyDocumentSerde +} + +type DeregisterPatchBaselineForPatchGroupOutput struct { + + // The ID of the patch baseline the patch group was deregistered from. + BaselineId *string + + // The name of the patch group deregistered from the patch baseline. + PatchGroup *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterPatchBaselineForPatchGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeregisterPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterPatchBaselineForPatchGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeregisterPatchBaselineForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeregisterPatchBaselineForPatchGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go new file mode 100644 index 00000000000..16df9a45b51 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a target from a maintenance window. +func (c *Client) DeregisterTargetFromMaintenanceWindow(ctx context.Context, params *DeregisterTargetFromMaintenanceWindowInput, optFns ...func(*Options)) (*DeregisterTargetFromMaintenanceWindowOutput, error) { + if params == nil { + params = &DeregisterTargetFromMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterTargetFromMaintenanceWindow", params, optFns, c.addOperationDeregisterTargetFromMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterTargetFromMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterTargetFromMaintenanceWindowInput struct { + + // The ID of the maintenance window the target should be removed from. + // + // This member is required. + WindowId *string + + // The ID of the target definition to remove. + // + // This member is required. + WindowTargetId *string + + // The system checks if the target is being referenced by a task. If the target is + // being referenced, the system returns an error and doesn't deregister the target + // from the maintenance window. + Safe *bool + + noSmithyDocumentSerde +} + +type DeregisterTargetFromMaintenanceWindowOutput struct { + + // The ID of the maintenance window the target was removed from. + WindowId *string + + // The ID of the removed target definition. + WindowTargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterTargetFromMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeregisterTargetFromMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTargetFromMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeregisterTargetFromMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeregisterTargetFromMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go new file mode 100644 index 00000000000..7d70efcfafa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a task from a maintenance window. +func (c *Client) DeregisterTaskFromMaintenanceWindow(ctx context.Context, params *DeregisterTaskFromMaintenanceWindowInput, optFns ...func(*Options)) (*DeregisterTaskFromMaintenanceWindowOutput, error) { + if params == nil { + params = &DeregisterTaskFromMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterTaskFromMaintenanceWindow", params, optFns, c.addOperationDeregisterTaskFromMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterTaskFromMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterTaskFromMaintenanceWindowInput struct { + + // The ID of the maintenance window the task should be removed from. + // + // This member is required. + WindowId *string + + // The ID of the task to remove from the maintenance window. + // + // This member is required. + WindowTaskId *string + + noSmithyDocumentSerde +} + +type DeregisterTaskFromMaintenanceWindowOutput struct { + + // The ID of the maintenance window the task was removed from. + WindowId *string + + // The ID of the task removed from the maintenance window. + WindowTaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterTaskFromMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeregisterTaskFromMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTaskFromMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeregisterTaskFromMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeregisterTaskFromMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go new file mode 100644 index 00000000000..4f04352eb71 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go @@ -0,0 +1,261 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes details about the activation, such as the date and time the +// activation was created, its expiration date, the Identity and Access Management +// (IAM) role assigned to the managed nodes in the activation, and the number of +// nodes registered by using this activation. +func (c *Client) DescribeActivations(ctx context.Context, params *DescribeActivationsInput, optFns ...func(*Options)) (*DescribeActivationsOutput, error) { + if params == nil { + params = &DescribeActivationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeActivations", params, optFns, c.addOperationDescribeActivationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeActivationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeActivationsInput struct { + + // A filter to view information about your activations. + Filters []types.DescribeActivationsFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeActivationsOutput struct { + + // A list of activations for your Amazon Web Services account. + ActivationList []types.Activation + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeActivations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeActivations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeActivations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActivations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeActivationsPaginatorOptions is the paginator options for +// DescribeActivations +type DescribeActivationsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeActivationsPaginator is a paginator for DescribeActivations +type DescribeActivationsPaginator struct { + options DescribeActivationsPaginatorOptions + client DescribeActivationsAPIClient + params *DescribeActivationsInput + nextToken *string + firstPage bool +} + +// NewDescribeActivationsPaginator returns a new DescribeActivationsPaginator +func NewDescribeActivationsPaginator(client DescribeActivationsAPIClient, params *DescribeActivationsInput, optFns ...func(*DescribeActivationsPaginatorOptions)) *DescribeActivationsPaginator { + if params == nil { + params = &DescribeActivationsInput{} + } + + options := DescribeActivationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeActivationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeActivationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeActivations page. +func (p *DescribeActivationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeActivationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeActivations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeActivationsAPIClient is a client that implements the +// DescribeActivations operation. +type DescribeActivationsAPIClient interface { + DescribeActivations(context.Context, *DescribeActivationsInput, ...func(*Options)) (*DescribeActivationsOutput, error) +} + +var _ DescribeActivationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeActivations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeActivations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go new file mode 100644 index 00000000000..35b16c123bb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the association for the specified target or managed node. If you +// created the association by using the Targets parameter, then you must retrieve +// the association by using the association ID. +func (c *Client) DescribeAssociation(ctx context.Context, params *DescribeAssociationInput, optFns ...func(*Options)) (*DescribeAssociationOutput, error) { + if params == nil { + params = &DescribeAssociationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAssociation", params, optFns, c.addOperationDescribeAssociationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAssociationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAssociationInput struct { + + // The association ID for which you want information. + AssociationId *string + + // Specify the association version to retrieve. To view the latest version, either + // specify $LATEST for this parameter, or omit this parameter. To view a list of + // all associations for a managed node, use ListAssociations. To get a list of versions for a + // specific association, use ListAssociationVersions. + AssociationVersion *string + + // The managed node ID. + InstanceId *string + + // The name of the SSM document. + Name *string + + noSmithyDocumentSerde +} + +type DescribeAssociationOutput struct { + + // Information about the association. + AssociationDescription *types.AssociationDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAssociation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAssociation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAssociation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeAssociation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAssociation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go new file mode 100644 index 00000000000..9f97596c3bc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Views information about a specific execution of a specific association. +func (c *Client) DescribeAssociationExecutionTargets(ctx context.Context, params *DescribeAssociationExecutionTargetsInput, optFns ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) { + if params == nil { + params = &DescribeAssociationExecutionTargetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAssociationExecutionTargets", params, optFns, c.addOperationDescribeAssociationExecutionTargetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAssociationExecutionTargetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAssociationExecutionTargetsInput struct { + + // The association ID that includes the execution for which you want to view + // details. + // + // This member is required. + AssociationId *string + + // The execution ID for which you want to view details. + // + // This member is required. + ExecutionId *string + + // Filters for the request. You can specify the following filters and values. + // + // Status (EQUAL) + // + // ResourceId (EQUAL) + // + // ResourceType (EQUAL) + Filters []types.AssociationExecutionTargetsFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeAssociationExecutionTargetsOutput struct { + + // Information about the execution. + AssociationExecutionTargets []types.AssociationExecutionTarget + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAssociationExecutionTargets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAssociationExecutionTargets"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeAssociationExecutionTargetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociationExecutionTargets(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeAssociationExecutionTargetsPaginatorOptions is the paginator options +// for DescribeAssociationExecutionTargets +type DescribeAssociationExecutionTargetsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAssociationExecutionTargetsPaginator is a paginator for +// DescribeAssociationExecutionTargets +type DescribeAssociationExecutionTargetsPaginator struct { + options DescribeAssociationExecutionTargetsPaginatorOptions + client DescribeAssociationExecutionTargetsAPIClient + params *DescribeAssociationExecutionTargetsInput + nextToken *string + firstPage bool +} + +// NewDescribeAssociationExecutionTargetsPaginator returns a new +// DescribeAssociationExecutionTargetsPaginator +func NewDescribeAssociationExecutionTargetsPaginator(client DescribeAssociationExecutionTargetsAPIClient, params *DescribeAssociationExecutionTargetsInput, optFns ...func(*DescribeAssociationExecutionTargetsPaginatorOptions)) *DescribeAssociationExecutionTargetsPaginator { + if params == nil { + params = &DescribeAssociationExecutionTargetsInput{} + } + + options := DescribeAssociationExecutionTargetsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAssociationExecutionTargetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAssociationExecutionTargetsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAssociationExecutionTargets page. +func (p *DescribeAssociationExecutionTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAssociationExecutionTargets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAssociationExecutionTargetsAPIClient is a client that implements the +// DescribeAssociationExecutionTargets operation. +type DescribeAssociationExecutionTargetsAPIClient interface { + DescribeAssociationExecutionTargets(context.Context, *DescribeAssociationExecutionTargetsInput, ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) +} + +var _ DescribeAssociationExecutionTargetsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeAssociationExecutionTargets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAssociationExecutionTargets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go new file mode 100644 index 00000000000..e33cb7973ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Views all executions for a specific association ID. +func (c *Client) DescribeAssociationExecutions(ctx context.Context, params *DescribeAssociationExecutionsInput, optFns ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) { + if params == nil { + params = &DescribeAssociationExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAssociationExecutions", params, optFns, c.addOperationDescribeAssociationExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAssociationExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAssociationExecutionsInput struct { + + // The association ID for which you want to view execution history details. + // + // This member is required. + AssociationId *string + + // Filters for the request. You can specify the following filters and values. + // + // ExecutionId (EQUAL) + // + // Status (EQUAL) + // + // CreatedTime (EQUAL, GREATER_THAN, LESS_THAN) + Filters []types.AssociationExecutionFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeAssociationExecutionsOutput struct { + + // A list of the executions for the specified association ID. + AssociationExecutions []types.AssociationExecution + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAssociationExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAssociationExecutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAssociationExecutions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeAssociationExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociationExecutions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeAssociationExecutionsPaginatorOptions is the paginator options for +// DescribeAssociationExecutions +type DescribeAssociationExecutionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAssociationExecutionsPaginator is a paginator for +// DescribeAssociationExecutions +type DescribeAssociationExecutionsPaginator struct { + options DescribeAssociationExecutionsPaginatorOptions + client DescribeAssociationExecutionsAPIClient + params *DescribeAssociationExecutionsInput + nextToken *string + firstPage bool +} + +// NewDescribeAssociationExecutionsPaginator returns a new +// DescribeAssociationExecutionsPaginator +func NewDescribeAssociationExecutionsPaginator(client DescribeAssociationExecutionsAPIClient, params *DescribeAssociationExecutionsInput, optFns ...func(*DescribeAssociationExecutionsPaginatorOptions)) *DescribeAssociationExecutionsPaginator { + if params == nil { + params = &DescribeAssociationExecutionsInput{} + } + + options := DescribeAssociationExecutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAssociationExecutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAssociationExecutionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAssociationExecutions page. +func (p *DescribeAssociationExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAssociationExecutions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAssociationExecutionsAPIClient is a client that implements the +// DescribeAssociationExecutions operation. +type DescribeAssociationExecutionsAPIClient interface { + DescribeAssociationExecutions(context.Context, *DescribeAssociationExecutionsInput, ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) +} + +var _ DescribeAssociationExecutionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeAssociationExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAssociationExecutions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go new file mode 100644 index 00000000000..4f91f4c37de --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides details about all active and terminated Automation executions. +func (c *Client) DescribeAutomationExecutions(ctx context.Context, params *DescribeAutomationExecutionsInput, optFns ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) { + if params == nil { + params = &DescribeAutomationExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAutomationExecutions", params, optFns, c.addOperationDescribeAutomationExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAutomationExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAutomationExecutionsInput struct { + + // Filters used to limit the scope of executions that are requested. + Filters []types.AutomationExecutionFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeAutomationExecutionsOutput struct { + + // The list of details about each automation execution which has occurred which + // matches the filter specification, if any. + AutomationExecutionMetadataList []types.AutomationExecutionMetadata + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAutomationExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAutomationExecutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAutomationExecutions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeAutomationExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutomationExecutions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeAutomationExecutionsPaginatorOptions is the paginator options for +// DescribeAutomationExecutions +type DescribeAutomationExecutionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAutomationExecutionsPaginator is a paginator for +// DescribeAutomationExecutions +type DescribeAutomationExecutionsPaginator struct { + options DescribeAutomationExecutionsPaginatorOptions + client DescribeAutomationExecutionsAPIClient + params *DescribeAutomationExecutionsInput + nextToken *string + firstPage bool +} + +// NewDescribeAutomationExecutionsPaginator returns a new +// DescribeAutomationExecutionsPaginator +func NewDescribeAutomationExecutionsPaginator(client DescribeAutomationExecutionsAPIClient, params *DescribeAutomationExecutionsInput, optFns ...func(*DescribeAutomationExecutionsPaginatorOptions)) *DescribeAutomationExecutionsPaginator { + if params == nil { + params = &DescribeAutomationExecutionsInput{} + } + + options := DescribeAutomationExecutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAutomationExecutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAutomationExecutionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAutomationExecutions page. +func (p *DescribeAutomationExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAutomationExecutions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAutomationExecutionsAPIClient is a client that implements the +// DescribeAutomationExecutions operation. +type DescribeAutomationExecutionsAPIClient interface { + DescribeAutomationExecutions(context.Context, *DescribeAutomationExecutionsInput, ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) +} + +var _ DescribeAutomationExecutionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeAutomationExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAutomationExecutions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go new file mode 100644 index 00000000000..6f6e677d8fd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go @@ -0,0 +1,276 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Information about all active and terminated step executions in an Automation +// workflow. +func (c *Client) DescribeAutomationStepExecutions(ctx context.Context, params *DescribeAutomationStepExecutionsInput, optFns ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) { + if params == nil { + params = &DescribeAutomationStepExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAutomationStepExecutions", params, optFns, c.addOperationDescribeAutomationStepExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAutomationStepExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAutomationStepExecutionsInput struct { + + // The Automation execution ID for which you want step execution descriptions. + // + // This member is required. + AutomationExecutionId *string + + // One or more filters to limit the number of step executions returned by the + // request. + Filters []types.StepExecutionFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // Indicates whether to list step executions in reverse order by start time. The + // default value is 'false'. + ReverseOrder *bool + + noSmithyDocumentSerde +} + +type DescribeAutomationStepExecutionsOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // A list of details about the current state of all steps that make up an + // execution. + StepExecutions []types.StepExecution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAutomationStepExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAutomationStepExecutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAutomationStepExecutions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeAutomationStepExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutomationStepExecutions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeAutomationStepExecutionsPaginatorOptions is the paginator options for +// DescribeAutomationStepExecutions +type DescribeAutomationStepExecutionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAutomationStepExecutionsPaginator is a paginator for +// DescribeAutomationStepExecutions +type DescribeAutomationStepExecutionsPaginator struct { + options DescribeAutomationStepExecutionsPaginatorOptions + client DescribeAutomationStepExecutionsAPIClient + params *DescribeAutomationStepExecutionsInput + nextToken *string + firstPage bool +} + +// NewDescribeAutomationStepExecutionsPaginator returns a new +// DescribeAutomationStepExecutionsPaginator +func NewDescribeAutomationStepExecutionsPaginator(client DescribeAutomationStepExecutionsAPIClient, params *DescribeAutomationStepExecutionsInput, optFns ...func(*DescribeAutomationStepExecutionsPaginatorOptions)) *DescribeAutomationStepExecutionsPaginator { + if params == nil { + params = &DescribeAutomationStepExecutionsInput{} + } + + options := DescribeAutomationStepExecutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAutomationStepExecutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAutomationStepExecutionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAutomationStepExecutions page. +func (p *DescribeAutomationStepExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAutomationStepExecutions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAutomationStepExecutionsAPIClient is a client that implements the +// DescribeAutomationStepExecutions operation. +type DescribeAutomationStepExecutionsAPIClient interface { + DescribeAutomationStepExecutions(context.Context, *DescribeAutomationStepExecutionsInput, ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) +} + +var _ DescribeAutomationStepExecutionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeAutomationStepExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAutomationStepExecutions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go new file mode 100644 index 00000000000..fb0c3671020 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go @@ -0,0 +1,348 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all patches eligible to be included in a patch baseline. +// +// Currently, DescribeAvailablePatches supports only the Amazon Linux 1, Amazon +// Linux 2, and Windows Server operating systems. +func (c *Client) DescribeAvailablePatches(ctx context.Context, params *DescribeAvailablePatchesInput, optFns ...func(*Options)) (*DescribeAvailablePatchesOutput, error) { + if params == nil { + params = &DescribeAvailablePatchesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAvailablePatches", params, optFns, c.addOperationDescribeAvailablePatchesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAvailablePatchesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAvailablePatchesInput struct { + + // Each element in the array is a structure containing a key-value pair. + // + // Windows Server + // + // Supported keys for Windows Server managed node patches include the following: + // + // - PATCH_SET + // + // Sample values: OS | APPLICATION + // + // - PRODUCT + // + // Sample values: WindowsServer2012 | Office 2010 | MicrosoftDefenderAntivirus + // + // - PRODUCT_FAMILY + // + // Sample values: Windows | Office + // + // - MSRC_SEVERITY + // + // Sample values: ServicePacks | Important | Moderate + // + // - CLASSIFICATION + // + // Sample values: ServicePacks | SecurityUpdates | DefinitionUpdates + // + // - PATCH_ID + // + // Sample values: KB123456 | KB4516046 + // + // Linux + // + // When specifying filters for Linux patches, you must specify a key-pair for + // PRODUCT . For example, using the Command Line Interface (CLI), the following + // command fails: + // + // aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615 + // + // However, the following command succeeds: + // + // aws ssm describe-available-patches --filters + // Key=PRODUCT,Values=AmazonLinux2018.03 Key=CVE_ID,Values=CVE-2018-3615 + // + // Supported keys for Linux managed node patches include the following: + // + // - PRODUCT + // + // Sample values: AmazonLinux2018.03 | AmazonLinux2.0 + // + // - NAME + // + // Sample values: kernel-headers | samba-python | php + // + // - SEVERITY + // + // Sample values: Critical | Important | Medium | Low + // + // - EPOCH + // + // Sample values: 0 | 1 + // + // - VERSION + // + // Sample values: 78.6.1 | 4.10.16 + // + // - RELEASE + // + // Sample values: 9.56.amzn1 | 1.amzn2 + // + // - ARCH + // + // Sample values: i686 | x86_64 + // + // - REPOSITORY + // + // Sample values: Core | Updates + // + // - ADVISORY_ID + // + // Sample values: ALAS-2018-1058 | ALAS2-2021-1594 + // + // - CVE_ID + // + // Sample values: CVE-2018-3615 | CVE-2020-1472 + // + // - BUGZILLA_ID + // + // Sample values: 1463241 + Filters []types.PatchOrchestratorFilter + + // The maximum number of patches to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeAvailablePatchesOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // An array of patches. Each entry in the array is a patch structure. + Patches []types.Patch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAvailablePatches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAvailablePatches{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAvailablePatches"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAvailablePatches(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeAvailablePatchesPaginatorOptions is the paginator options for +// DescribeAvailablePatches +type DescribeAvailablePatchesPaginatorOptions struct { + // The maximum number of patches to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAvailablePatchesPaginator is a paginator for DescribeAvailablePatches +type DescribeAvailablePatchesPaginator struct { + options DescribeAvailablePatchesPaginatorOptions + client DescribeAvailablePatchesAPIClient + params *DescribeAvailablePatchesInput + nextToken *string + firstPage bool +} + +// NewDescribeAvailablePatchesPaginator returns a new +// DescribeAvailablePatchesPaginator +func NewDescribeAvailablePatchesPaginator(client DescribeAvailablePatchesAPIClient, params *DescribeAvailablePatchesInput, optFns ...func(*DescribeAvailablePatchesPaginatorOptions)) *DescribeAvailablePatchesPaginator { + if params == nil { + params = &DescribeAvailablePatchesInput{} + } + + options := DescribeAvailablePatchesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAvailablePatchesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAvailablePatchesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAvailablePatches page. +func (p *DescribeAvailablePatchesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAvailablePatchesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAvailablePatches(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAvailablePatchesAPIClient is a client that implements the +// DescribeAvailablePatches operation. +type DescribeAvailablePatchesAPIClient interface { + DescribeAvailablePatches(context.Context, *DescribeAvailablePatchesInput, ...func(*Options)) (*DescribeAvailablePatchesOutput, error) +} + +var _ DescribeAvailablePatchesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeAvailablePatches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAvailablePatches", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go new file mode 100644 index 00000000000..3e511fb43da --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the specified Amazon Web Services Systems Manager document (SSM +// document). +func (c *Client) DescribeDocument(ctx context.Context, params *DescribeDocumentInput, optFns ...func(*Options)) (*DescribeDocumentOutput, error) { + if params == nil { + params = &DescribeDocumentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDocument", params, optFns, c.addOperationDescribeDocumentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDocumentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDocumentInput struct { + + // The name of the SSM document. + // + // If you're calling a shared SSM document from a different Amazon Web Services + // account, Name is the full Amazon Resource Name (ARN) of the document. + // + // This member is required. + Name *string + + // The document version for which you want information. Can be a specific version + // or the default version. + DocumentVersion *string + + // An optional field specifying the version of the artifact associated with the + // document. For example, 12.6. This value is unique across all versions of a + // document, and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +type DescribeDocumentOutput struct { + + // Information about the SSM document. + Document *types.DocumentDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDocument{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDocument{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDocument"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeDocumentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDocument(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeDocument(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDocument", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go new file mode 100644 index 00000000000..c95e5250c4b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the permissions for a Amazon Web Services Systems Manager document +// (SSM document). If you created the document, you are the owner. If a document is +// shared, it can either be shared privately (by specifying a user's Amazon Web +// Services account ID) or publicly (All). +func (c *Client) DescribeDocumentPermission(ctx context.Context, params *DescribeDocumentPermissionInput, optFns ...func(*Options)) (*DescribeDocumentPermissionOutput, error) { + if params == nil { + params = &DescribeDocumentPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDocumentPermission", params, optFns, c.addOperationDescribeDocumentPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDocumentPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDocumentPermissionInput struct { + + // The name of the document for which you are the owner. + // + // This member is required. + Name *string + + // The permission type for the document. The permission type can be Share. + // + // This member is required. + PermissionType types.DocumentPermissionType + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeDocumentPermissionOutput struct { + + // The account IDs that have permission to use this document. The ID can be either + // an Amazon Web Services account number or all . + AccountIds []string + + // A list of Amazon Web Services accounts where the current document is shared and + // the version shared with each account. + AccountSharingInfoList []types.AccountSharingInfo + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDocumentPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDocumentPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDocumentPermission"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeDocumentPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDocumentPermission(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeDocumentPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDocumentPermission", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go new file mode 100644 index 00000000000..e427d2e07b3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// All associations for the managed nodes. +func (c *Client) DescribeEffectiveInstanceAssociations(ctx context.Context, params *DescribeEffectiveInstanceAssociationsInput, optFns ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) { + if params == nil { + params = &DescribeEffectiveInstanceAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeEffectiveInstanceAssociations", params, optFns, c.addOperationDescribeEffectiveInstanceAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeEffectiveInstanceAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeEffectiveInstanceAssociationsInput struct { + + // The managed node ID for which you want to view all associations. + // + // This member is required. + InstanceId *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeEffectiveInstanceAssociationsOutput struct { + + // The associations for the requested managed node. + Associations []types.InstanceAssociation + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEffectiveInstanceAssociations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeEffectiveInstanceAssociationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEffectiveInstanceAssociations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeEffectiveInstanceAssociationsPaginatorOptions is the paginator options +// for DescribeEffectiveInstanceAssociations +type DescribeEffectiveInstanceAssociationsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeEffectiveInstanceAssociationsPaginator is a paginator for +// DescribeEffectiveInstanceAssociations +type DescribeEffectiveInstanceAssociationsPaginator struct { + options DescribeEffectiveInstanceAssociationsPaginatorOptions + client DescribeEffectiveInstanceAssociationsAPIClient + params *DescribeEffectiveInstanceAssociationsInput + nextToken *string + firstPage bool +} + +// NewDescribeEffectiveInstanceAssociationsPaginator returns a new +// DescribeEffectiveInstanceAssociationsPaginator +func NewDescribeEffectiveInstanceAssociationsPaginator(client DescribeEffectiveInstanceAssociationsAPIClient, params *DescribeEffectiveInstanceAssociationsInput, optFns ...func(*DescribeEffectiveInstanceAssociationsPaginatorOptions)) *DescribeEffectiveInstanceAssociationsPaginator { + if params == nil { + params = &DescribeEffectiveInstanceAssociationsInput{} + } + + options := DescribeEffectiveInstanceAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeEffectiveInstanceAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeEffectiveInstanceAssociationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeEffectiveInstanceAssociations page. +func (p *DescribeEffectiveInstanceAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeEffectiveInstanceAssociations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeEffectiveInstanceAssociationsAPIClient is a client that implements the +// DescribeEffectiveInstanceAssociations operation. +type DescribeEffectiveInstanceAssociationsAPIClient interface { + DescribeEffectiveInstanceAssociations(context.Context, *DescribeEffectiveInstanceAssociationsInput, ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) +} + +var _ DescribeEffectiveInstanceAssociationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeEffectiveInstanceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeEffectiveInstanceAssociations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go new file mode 100644 index 00000000000..1c2dd30361d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the current effective patches (the patch and the approval state) for +// the specified patch baseline. Applies to patch baselines for Windows only. +func (c *Client) DescribeEffectivePatchesForPatchBaseline(ctx context.Context, params *DescribeEffectivePatchesForPatchBaselineInput, optFns ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) { + if params == nil { + params = &DescribeEffectivePatchesForPatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeEffectivePatchesForPatchBaseline", params, optFns, c.addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeEffectivePatchesForPatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeEffectivePatchesForPatchBaselineInput struct { + + // The ID of the patch baseline to retrieve the effective patches for. + // + // This member is required. + BaselineId *string + + // The maximum number of patches to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeEffectivePatchesForPatchBaselineOutput struct { + + // An array of patches and patch status. + EffectivePatches []types.EffectivePatch + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEffectivePatchesForPatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeEffectivePatchesForPatchBaselineValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEffectivePatchesForPatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeEffectivePatchesForPatchBaselinePaginatorOptions is the paginator +// options for DescribeEffectivePatchesForPatchBaseline +type DescribeEffectivePatchesForPatchBaselinePaginatorOptions struct { + // The maximum number of patches to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeEffectivePatchesForPatchBaselinePaginator is a paginator for +// DescribeEffectivePatchesForPatchBaseline +type DescribeEffectivePatchesForPatchBaselinePaginator struct { + options DescribeEffectivePatchesForPatchBaselinePaginatorOptions + client DescribeEffectivePatchesForPatchBaselineAPIClient + params *DescribeEffectivePatchesForPatchBaselineInput + nextToken *string + firstPage bool +} + +// NewDescribeEffectivePatchesForPatchBaselinePaginator returns a new +// DescribeEffectivePatchesForPatchBaselinePaginator +func NewDescribeEffectivePatchesForPatchBaselinePaginator(client DescribeEffectivePatchesForPatchBaselineAPIClient, params *DescribeEffectivePatchesForPatchBaselineInput, optFns ...func(*DescribeEffectivePatchesForPatchBaselinePaginatorOptions)) *DescribeEffectivePatchesForPatchBaselinePaginator { + if params == nil { + params = &DescribeEffectivePatchesForPatchBaselineInput{} + } + + options := DescribeEffectivePatchesForPatchBaselinePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeEffectivePatchesForPatchBaselinePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeEffectivePatchesForPatchBaselinePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeEffectivePatchesForPatchBaseline page. +func (p *DescribeEffectivePatchesForPatchBaselinePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeEffectivePatchesForPatchBaseline(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeEffectivePatchesForPatchBaselineAPIClient is a client that implements +// the DescribeEffectivePatchesForPatchBaseline operation. +type DescribeEffectivePatchesForPatchBaselineAPIClient interface { + DescribeEffectivePatchesForPatchBaseline(context.Context, *DescribeEffectivePatchesForPatchBaselineInput, ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) +} + +var _ DescribeEffectivePatchesForPatchBaselineAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeEffectivePatchesForPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeEffectivePatchesForPatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go new file mode 100644 index 00000000000..cf7775a4f70 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The status of the associations for the managed nodes. +func (c *Client) DescribeInstanceAssociationsStatus(ctx context.Context, params *DescribeInstanceAssociationsStatusInput, optFns ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) { + if params == nil { + params = &DescribeInstanceAssociationsStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceAssociationsStatus", params, optFns, c.addOperationDescribeInstanceAssociationsStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstanceAssociationsStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstanceAssociationsStatusInput struct { + + // The managed node IDs for which you want association status information. + // + // This member is required. + InstanceId *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstanceAssociationsStatusOutput struct { + + // Status information about the association. + InstanceAssociationStatusInfos []types.InstanceAssociationStatusInfo + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceAssociationsStatus"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeInstanceAssociationsStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceAssociationsStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstanceAssociationsStatusPaginatorOptions is the paginator options for +// DescribeInstanceAssociationsStatus +type DescribeInstanceAssociationsStatusPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstanceAssociationsStatusPaginator is a paginator for +// DescribeInstanceAssociationsStatus +type DescribeInstanceAssociationsStatusPaginator struct { + options DescribeInstanceAssociationsStatusPaginatorOptions + client DescribeInstanceAssociationsStatusAPIClient + params *DescribeInstanceAssociationsStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeInstanceAssociationsStatusPaginator returns a new +// DescribeInstanceAssociationsStatusPaginator +func NewDescribeInstanceAssociationsStatusPaginator(client DescribeInstanceAssociationsStatusAPIClient, params *DescribeInstanceAssociationsStatusInput, optFns ...func(*DescribeInstanceAssociationsStatusPaginatorOptions)) *DescribeInstanceAssociationsStatusPaginator { + if params == nil { + params = &DescribeInstanceAssociationsStatusInput{} + } + + options := DescribeInstanceAssociationsStatusPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstanceAssociationsStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstanceAssociationsStatusPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstanceAssociationsStatus page. +func (p *DescribeInstanceAssociationsStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstanceAssociationsStatus(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstanceAssociationsStatusAPIClient is a client that implements the +// DescribeInstanceAssociationsStatus operation. +type DescribeInstanceAssociationsStatusAPIClient interface { + DescribeInstanceAssociationsStatus(context.Context, *DescribeInstanceAssociationsStatusInput, ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) +} + +var _ DescribeInstanceAssociationsStatusAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInstanceAssociationsStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstanceAssociationsStatus", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go new file mode 100644 index 00000000000..57197d0ed07 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go @@ -0,0 +1,289 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides information about one or more of your managed nodes, including the +// operating system platform, SSM Agent version, association status, and IP +// address. This operation does not return information for nodes that are either +// Stopped or Terminated. +// +// If you specify one or more node IDs, the operation returns information for +// those managed nodes. If you don't specify node IDs, it returns information for +// all your managed nodes. If you specify a node ID that isn't valid or a node that +// you don't own, you receive an error. +// +// The IamRole field returned for this API operation is the role assigned to an +// Amazon EC2 instance configured with a Systems Manager Quick Setup host +// management configuration or the role assigned to an on-premises managed node. +func (c *Client) DescribeInstanceInformation(ctx context.Context, params *DescribeInstanceInformationInput, optFns ...func(*Options)) (*DescribeInstanceInformationOutput, error) { + if params == nil { + params = &DescribeInstanceInformationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceInformation", params, optFns, c.addOperationDescribeInstanceInformationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstanceInformationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstanceInformationInput struct { + + // One or more filters. Use a filter to return a more specific list of managed + // nodes. You can filter based on tags applied to your managed nodes. Tag filters + // can't be combined with other filter types. Use this Filters data type instead + // of InstanceInformationFilterList , which is deprecated. + Filters []types.InstanceInformationStringFilter + + // This is a legacy method. We recommend that you don't use this method. Instead, + // use the Filters data type. Filters enables you to return node information by + // filtering based on tags applied to managed nodes. + // + // Attempting to use InstanceInformationFilterList and Filters leads to an + // exception error. + InstanceInformationFilterList []types.InstanceInformationFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + // The default value is 10 items. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstanceInformationOutput struct { + + // The managed node information list. + InstanceInformationList []types.InstanceInformation + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstanceInformation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstanceInformation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceInformation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeInstanceInformationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceInformation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstanceInformationPaginatorOptions is the paginator options for +// DescribeInstanceInformation +type DescribeInstanceInformationPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + // The default value is 10 items. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstanceInformationPaginator is a paginator for +// DescribeInstanceInformation +type DescribeInstanceInformationPaginator struct { + options DescribeInstanceInformationPaginatorOptions + client DescribeInstanceInformationAPIClient + params *DescribeInstanceInformationInput + nextToken *string + firstPage bool +} + +// NewDescribeInstanceInformationPaginator returns a new +// DescribeInstanceInformationPaginator +func NewDescribeInstanceInformationPaginator(client DescribeInstanceInformationAPIClient, params *DescribeInstanceInformationInput, optFns ...func(*DescribeInstanceInformationPaginatorOptions)) *DescribeInstanceInformationPaginator { + if params == nil { + params = &DescribeInstanceInformationInput{} + } + + options := DescribeInstanceInformationPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstanceInformationPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstanceInformationPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstanceInformation page. +func (p *DescribeInstanceInformationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceInformationOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstanceInformation(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstanceInformationAPIClient is a client that implements the +// DescribeInstanceInformation operation. +type DescribeInstanceInformationAPIClient interface { + DescribeInstanceInformation(context.Context, *DescribeInstanceInformationInput, ...func(*Options)) (*DescribeInstanceInformationOutput, error) +} + +var _ DescribeInstanceInformationAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInstanceInformation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstanceInformation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go new file mode 100644 index 00000000000..beec1206511 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the high-level patch state of one or more managed nodes. +func (c *Client) DescribeInstancePatchStates(ctx context.Context, params *DescribeInstancePatchStatesInput, optFns ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) { + if params == nil { + params = &DescribeInstancePatchStatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstancePatchStates", params, optFns, c.addOperationDescribeInstancePatchStatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstancePatchStatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstancePatchStatesInput struct { + + // The ID of the managed node for which patch state information should be + // retrieved. + // + // This member is required. + InstanceIds []string + + // The maximum number of managed nodes to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstancePatchStatesOutput struct { + + // The high-level patch state for the requested managed nodes. + InstancePatchStates []types.InstancePatchState + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstancePatchStates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstancePatchStates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstancePatchStates"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeInstancePatchStatesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancePatchStates(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstancePatchStatesPaginatorOptions is the paginator options for +// DescribeInstancePatchStates +type DescribeInstancePatchStatesPaginatorOptions struct { + // The maximum number of managed nodes to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstancePatchStatesPaginator is a paginator for +// DescribeInstancePatchStates +type DescribeInstancePatchStatesPaginator struct { + options DescribeInstancePatchStatesPaginatorOptions + client DescribeInstancePatchStatesAPIClient + params *DescribeInstancePatchStatesInput + nextToken *string + firstPage bool +} + +// NewDescribeInstancePatchStatesPaginator returns a new +// DescribeInstancePatchStatesPaginator +func NewDescribeInstancePatchStatesPaginator(client DescribeInstancePatchStatesAPIClient, params *DescribeInstancePatchStatesInput, optFns ...func(*DescribeInstancePatchStatesPaginatorOptions)) *DescribeInstancePatchStatesPaginator { + if params == nil { + params = &DescribeInstancePatchStatesInput{} + } + + options := DescribeInstancePatchStatesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstancePatchStatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstancePatchStatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstancePatchStates page. +func (p *DescribeInstancePatchStatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstancePatchStates(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstancePatchStatesAPIClient is a client that implements the +// DescribeInstancePatchStates operation. +type DescribeInstancePatchStatesAPIClient interface { + DescribeInstancePatchStates(context.Context, *DescribeInstancePatchStatesInput, ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) +} + +var _ DescribeInstancePatchStatesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInstancePatchStates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstancePatchStates", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go new file mode 100644 index 00000000000..80cdb51c9be --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the high-level patch state for the managed nodes in the specified +// patch group. +func (c *Client) DescribeInstancePatchStatesForPatchGroup(ctx context.Context, params *DescribeInstancePatchStatesForPatchGroupInput, optFns ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { + if params == nil { + params = &DescribeInstancePatchStatesForPatchGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstancePatchStatesForPatchGroup", params, optFns, c.addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstancePatchStatesForPatchGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstancePatchStatesForPatchGroupInput struct { + + // The name of the patch group for which the patch state information should be + // retrieved. + // + // This member is required. + PatchGroup *string + + // Each entry in the array is a structure containing: + // + // - Key (string between 1 and 200 characters) + // + // - Values (array containing a single string) + // + // - Type (string "Equal", "NotEqual", "LessThan", "GreaterThan") + Filters []types.InstancePatchStateFilter + + // The maximum number of patches to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstancePatchStatesForPatchGroupOutput struct { + + // The high-level patch state for the requested managed nodes. + InstancePatchStates []types.InstancePatchState + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstancePatchStatesForPatchGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeInstancePatchStatesForPatchGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancePatchStatesForPatchGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstancePatchStatesForPatchGroupPaginatorOptions is the paginator +// options for DescribeInstancePatchStatesForPatchGroup +type DescribeInstancePatchStatesForPatchGroupPaginatorOptions struct { + // The maximum number of patches to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstancePatchStatesForPatchGroupPaginator is a paginator for +// DescribeInstancePatchStatesForPatchGroup +type DescribeInstancePatchStatesForPatchGroupPaginator struct { + options DescribeInstancePatchStatesForPatchGroupPaginatorOptions + client DescribeInstancePatchStatesForPatchGroupAPIClient + params *DescribeInstancePatchStatesForPatchGroupInput + nextToken *string + firstPage bool +} + +// NewDescribeInstancePatchStatesForPatchGroupPaginator returns a new +// DescribeInstancePatchStatesForPatchGroupPaginator +func NewDescribeInstancePatchStatesForPatchGroupPaginator(client DescribeInstancePatchStatesForPatchGroupAPIClient, params *DescribeInstancePatchStatesForPatchGroupInput, optFns ...func(*DescribeInstancePatchStatesForPatchGroupPaginatorOptions)) *DescribeInstancePatchStatesForPatchGroupPaginator { + if params == nil { + params = &DescribeInstancePatchStatesForPatchGroupInput{} + } + + options := DescribeInstancePatchStatesForPatchGroupPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstancePatchStatesForPatchGroupPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstancePatchStatesForPatchGroupPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstancePatchStatesForPatchGroup page. +func (p *DescribeInstancePatchStatesForPatchGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstancePatchStatesForPatchGroup(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstancePatchStatesForPatchGroupAPIClient is a client that implements +// the DescribeInstancePatchStatesForPatchGroup operation. +type DescribeInstancePatchStatesForPatchGroupAPIClient interface { + DescribeInstancePatchStatesForPatchGroup(context.Context, *DescribeInstancePatchStatesForPatchGroupInput, ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) +} + +var _ DescribeInstancePatchStatesForPatchGroupAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInstancePatchStatesForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstancePatchStatesForPatchGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go new file mode 100644 index 00000000000..2894ecb7b17 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go @@ -0,0 +1,304 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the patches on the specified managed node and their +// state relative to the patch baseline being used for the node. +func (c *Client) DescribeInstancePatches(ctx context.Context, params *DescribeInstancePatchesInput, optFns ...func(*Options)) (*DescribeInstancePatchesOutput, error) { + if params == nil { + params = &DescribeInstancePatchesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstancePatches", params, optFns, c.addOperationDescribeInstancePatchesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstancePatchesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstancePatchesInput struct { + + // The ID of the managed node whose patch state information should be retrieved. + // + // This member is required. + InstanceId *string + + // Each element in the array is a structure containing a key-value pair. + // + // Supported keys for DescribeInstancePatches include the following: + // + // - Classification + // + // Sample values: Security | SecurityUpdates + // + // - KBId + // + // Sample values: KB4480056 | java-1.7.0-openjdk.x86_64 + // + // - Severity + // + // Sample values: Important | Medium | Low + // + // - State + // + // Sample values: Installed | InstalledOther | InstalledPendingReboot + // + // For lists of all State values, see [Patch compliance state values]in the Amazon Web Services Systems Manager + // User Guide. + // + // [Patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html + Filters []types.PatchOrchestratorFilter + + // The maximum number of patches to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstancePatchesOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Each entry in the array is a structure containing: + // + // - Title (string) + // + // - KBId (string) + // + // - Classification (string) + // + // - Severity (string) + // + // - State (string, such as "INSTALLED" or "FAILED") + // + // - InstalledTime (DateTime) + // + // - InstalledBy (string) + Patches []types.PatchComplianceData + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstancePatches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstancePatches{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstancePatches"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeInstancePatchesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancePatches(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstancePatchesPaginatorOptions is the paginator options for +// DescribeInstancePatches +type DescribeInstancePatchesPaginatorOptions struct { + // The maximum number of patches to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstancePatchesPaginator is a paginator for DescribeInstancePatches +type DescribeInstancePatchesPaginator struct { + options DescribeInstancePatchesPaginatorOptions + client DescribeInstancePatchesAPIClient + params *DescribeInstancePatchesInput + nextToken *string + firstPage bool +} + +// NewDescribeInstancePatchesPaginator returns a new +// DescribeInstancePatchesPaginator +func NewDescribeInstancePatchesPaginator(client DescribeInstancePatchesAPIClient, params *DescribeInstancePatchesInput, optFns ...func(*DescribeInstancePatchesPaginatorOptions)) *DescribeInstancePatchesPaginator { + if params == nil { + params = &DescribeInstancePatchesInput{} + } + + options := DescribeInstancePatchesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstancePatchesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstancePatchesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstancePatches page. +func (p *DescribeInstancePatchesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePatchesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstancePatches(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstancePatchesAPIClient is a client that implements the +// DescribeInstancePatches operation. +type DescribeInstancePatchesAPIClient interface { + DescribeInstancePatches(context.Context, *DescribeInstancePatchesInput, ...func(*Options)) (*DescribeInstancePatchesOutput, error) +} + +var _ DescribeInstancePatchesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInstancePatches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstancePatches", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go new file mode 100644 index 00000000000..43dcbf5c0e1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// An API operation used by the Systems Manager console to display information +// about Systems Manager managed nodes. +func (c *Client) DescribeInstanceProperties(ctx context.Context, params *DescribeInstancePropertiesInput, optFns ...func(*Options)) (*DescribeInstancePropertiesOutput, error) { + if params == nil { + params = &DescribeInstancePropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceProperties", params, optFns, c.addOperationDescribeInstancePropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstancePropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstancePropertiesInput struct { + + // The request filters to use with the operator. + FiltersWithOperator []types.InstancePropertyStringFilter + + // An array of instance property filters. + InstancePropertyFilterList []types.InstancePropertyFilter + + // The maximum number of items to return for the call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token provided by a previous request to use to return the next set of + // properties. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstancePropertiesOutput struct { + + // Properties for the managed instances. + InstanceProperties []types.InstanceProperty + + // The token for the next set of properties to return. Use this token to get the + // next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstanceProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstanceProperties{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceProperties"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeInstancePropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstancePropertiesPaginatorOptions is the paginator options for +// DescribeInstanceProperties +type DescribeInstancePropertiesPaginatorOptions struct { + // The maximum number of items to return for the call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstancePropertiesPaginator is a paginator for +// DescribeInstanceProperties +type DescribeInstancePropertiesPaginator struct { + options DescribeInstancePropertiesPaginatorOptions + client DescribeInstancePropertiesAPIClient + params *DescribeInstancePropertiesInput + nextToken *string + firstPage bool +} + +// NewDescribeInstancePropertiesPaginator returns a new +// DescribeInstancePropertiesPaginator +func NewDescribeInstancePropertiesPaginator(client DescribeInstancePropertiesAPIClient, params *DescribeInstancePropertiesInput, optFns ...func(*DescribeInstancePropertiesPaginatorOptions)) *DescribeInstancePropertiesPaginator { + if params == nil { + params = &DescribeInstancePropertiesInput{} + } + + options := DescribeInstancePropertiesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstancePropertiesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstancePropertiesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstanceProperties page. +func (p *DescribeInstancePropertiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePropertiesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstanceProperties(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstancePropertiesAPIClient is a client that implements the +// DescribeInstanceProperties operation. +type DescribeInstancePropertiesAPIClient interface { + DescribeInstanceProperties(context.Context, *DescribeInstancePropertiesInput, ...func(*Options)) (*DescribeInstancePropertiesOutput, error) +} + +var _ DescribeInstancePropertiesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInstanceProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstanceProperties", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go new file mode 100644 index 00000000000..88421fe37ad --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go @@ -0,0 +1,261 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a specific delete inventory operation. +func (c *Client) DescribeInventoryDeletions(ctx context.Context, params *DescribeInventoryDeletionsInput, optFns ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) { + if params == nil { + params = &DescribeInventoryDeletionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInventoryDeletions", params, optFns, c.addOperationDescribeInventoryDeletionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInventoryDeletionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInventoryDeletionsInput struct { + + // Specify the delete inventory ID for which you want information. This ID was + // returned by the DeleteInventory operation. + DeletionId *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInventoryDeletionsOutput struct { + + // A list of status items for deleted inventory. + InventoryDeletions []types.InventoryDeletionStatusItem + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInventoryDeletions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInventoryDeletions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInventoryDeletions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInventoryDeletions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInventoryDeletionsPaginatorOptions is the paginator options for +// DescribeInventoryDeletions +type DescribeInventoryDeletionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInventoryDeletionsPaginator is a paginator for +// DescribeInventoryDeletions +type DescribeInventoryDeletionsPaginator struct { + options DescribeInventoryDeletionsPaginatorOptions + client DescribeInventoryDeletionsAPIClient + params *DescribeInventoryDeletionsInput + nextToken *string + firstPage bool +} + +// NewDescribeInventoryDeletionsPaginator returns a new +// DescribeInventoryDeletionsPaginator +func NewDescribeInventoryDeletionsPaginator(client DescribeInventoryDeletionsAPIClient, params *DescribeInventoryDeletionsInput, optFns ...func(*DescribeInventoryDeletionsPaginatorOptions)) *DescribeInventoryDeletionsPaginator { + if params == nil { + params = &DescribeInventoryDeletionsInput{} + } + + options := DescribeInventoryDeletionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInventoryDeletionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInventoryDeletionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInventoryDeletions page. +func (p *DescribeInventoryDeletionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInventoryDeletions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInventoryDeletionsAPIClient is a client that implements the +// DescribeInventoryDeletions operation. +type DescribeInventoryDeletionsAPIClient interface { + DescribeInventoryDeletions(context.Context, *DescribeInventoryDeletionsInput, ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) +} + +var _ DescribeInventoryDeletionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeInventoryDeletions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInventoryDeletions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go new file mode 100644 index 00000000000..319fa303548 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the individual task executions (one per target) for a particular task +// run as part of a maintenance window execution. +func (c *Client) DescribeMaintenanceWindowExecutionTaskInvocations(ctx context.Context, params *DescribeMaintenanceWindowExecutionTaskInvocationsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowExecutionTaskInvocationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowExecutionTaskInvocations", params, optFns, c.addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowExecutionTaskInvocationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct { + + // The ID of the specific task in the maintenance window task that should be + // retrieved. + // + // This member is required. + TaskId *string + + // The ID of the maintenance window execution the task is part of. + // + // This member is required. + WindowExecutionId *string + + // Optional filters used to scope down the returned task invocations. The + // supported filter key is STATUS with the corresponding values PENDING , + // IN_PROGRESS , SUCCESS , FAILED , TIMED_OUT , CANCELLING , and CANCELLED . + Filters []types.MaintenanceWindowFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowExecutionTaskInvocationsOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Information about the task invocation results per invocation. + WindowExecutionTaskInvocationIdentities []types.MaintenanceWindowExecutionTaskInvocationIdentity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowExecutionTaskInvocations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMaintenanceWindowExecutionTaskInvocationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTaskInvocations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions is the +// paginator options for DescribeMaintenanceWindowExecutionTaskInvocations +type DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowExecutionTaskInvocationsPaginator is a paginator for +// DescribeMaintenanceWindowExecutionTaskInvocations +type DescribeMaintenanceWindowExecutionTaskInvocationsPaginator struct { + options DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions + client DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient + params *DescribeMaintenanceWindowExecutionTaskInvocationsInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowExecutionTaskInvocationsPaginator returns a new +// DescribeMaintenanceWindowExecutionTaskInvocationsPaginator +func NewDescribeMaintenanceWindowExecutionTaskInvocationsPaginator(client DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient, params *DescribeMaintenanceWindowExecutionTaskInvocationsInput, optFns ...func(*DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions)) *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator { + if params == nil { + params = &DescribeMaintenanceWindowExecutionTaskInvocationsInput{} + } + + options := DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowExecutionTaskInvocationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowExecutionTaskInvocations +// page. +func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowExecutionTaskInvocations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient is a client that +// implements the DescribeMaintenanceWindowExecutionTaskInvocations operation. +type DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient interface { + DescribeMaintenanceWindowExecutionTaskInvocations(context.Context, *DescribeMaintenanceWindowExecutionTaskInvocationsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) +} + +var _ DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTaskInvocations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowExecutionTaskInvocations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go new file mode 100644 index 00000000000..d4a862e572d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go @@ -0,0 +1,272 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// For a given maintenance window execution, lists the tasks that were run. +func (c *Client) DescribeMaintenanceWindowExecutionTasks(ctx context.Context, params *DescribeMaintenanceWindowExecutionTasksInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowExecutionTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowExecutionTasks", params, optFns, c.addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowExecutionTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowExecutionTasksInput struct { + + // The ID of the maintenance window execution whose task executions should be + // retrieved. + // + // This member is required. + WindowExecutionId *string + + // Optional filters used to scope down the returned tasks. The supported filter + // key is STATUS with the corresponding values PENDING , IN_PROGRESS , SUCCESS , + // FAILED , TIMED_OUT , CANCELLING , and CANCELLED . + Filters []types.MaintenanceWindowFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowExecutionTasksOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Information about the task executions. + WindowExecutionTaskIdentities []types.MaintenanceWindowExecutionTaskIdentity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowExecutionTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMaintenanceWindowExecutionTasksValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowExecutionTasksPaginatorOptions is the paginator +// options for DescribeMaintenanceWindowExecutionTasks +type DescribeMaintenanceWindowExecutionTasksPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowExecutionTasksPaginator is a paginator for +// DescribeMaintenanceWindowExecutionTasks +type DescribeMaintenanceWindowExecutionTasksPaginator struct { + options DescribeMaintenanceWindowExecutionTasksPaginatorOptions + client DescribeMaintenanceWindowExecutionTasksAPIClient + params *DescribeMaintenanceWindowExecutionTasksInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowExecutionTasksPaginator returns a new +// DescribeMaintenanceWindowExecutionTasksPaginator +func NewDescribeMaintenanceWindowExecutionTasksPaginator(client DescribeMaintenanceWindowExecutionTasksAPIClient, params *DescribeMaintenanceWindowExecutionTasksInput, optFns ...func(*DescribeMaintenanceWindowExecutionTasksPaginatorOptions)) *DescribeMaintenanceWindowExecutionTasksPaginator { + if params == nil { + params = &DescribeMaintenanceWindowExecutionTasksInput{} + } + + options := DescribeMaintenanceWindowExecutionTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowExecutionTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowExecutionTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowExecutionTasks page. +func (p *DescribeMaintenanceWindowExecutionTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowExecutionTasks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowExecutionTasksAPIClient is a client that implements +// the DescribeMaintenanceWindowExecutionTasks operation. +type DescribeMaintenanceWindowExecutionTasksAPIClient interface { + DescribeMaintenanceWindowExecutionTasks(context.Context, *DescribeMaintenanceWindowExecutionTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) +} + +var _ DescribeMaintenanceWindowExecutionTasksAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowExecutionTasks", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go new file mode 100644 index 00000000000..c7357e77e05 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go @@ -0,0 +1,278 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the executions of a maintenance window. This includes information about +// when the maintenance window was scheduled to be active, and information about +// tasks registered and run with the maintenance window. +func (c *Client) DescribeMaintenanceWindowExecutions(ctx context.Context, params *DescribeMaintenanceWindowExecutionsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowExecutions", params, optFns, c.addOperationDescribeMaintenanceWindowExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowExecutionsInput struct { + + // The ID of the maintenance window whose executions should be retrieved. + // + // This member is required. + WindowId *string + + // Each entry in the array is a structure containing: + // + // - Key. A string between 1 and 128 characters. Supported keys include + // ExecutedBefore and ExecutedAfter . + // + // - Values. An array of strings, each between 1 and 256 characters. Supported + // values are date/time strings in a valid ISO 8601 date/time format, such as + // 2024-11-04T05:00:00Z . + Filters []types.MaintenanceWindowFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowExecutionsOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Information about the maintenance window executions. + WindowExecutions []types.MaintenanceWindowExecution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowExecutions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMaintenanceWindowExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowExecutionsPaginatorOptions is the paginator options +// for DescribeMaintenanceWindowExecutions +type DescribeMaintenanceWindowExecutionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowExecutionsPaginator is a paginator for +// DescribeMaintenanceWindowExecutions +type DescribeMaintenanceWindowExecutionsPaginator struct { + options DescribeMaintenanceWindowExecutionsPaginatorOptions + client DescribeMaintenanceWindowExecutionsAPIClient + params *DescribeMaintenanceWindowExecutionsInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowExecutionsPaginator returns a new +// DescribeMaintenanceWindowExecutionsPaginator +func NewDescribeMaintenanceWindowExecutionsPaginator(client DescribeMaintenanceWindowExecutionsAPIClient, params *DescribeMaintenanceWindowExecutionsInput, optFns ...func(*DescribeMaintenanceWindowExecutionsPaginatorOptions)) *DescribeMaintenanceWindowExecutionsPaginator { + if params == nil { + params = &DescribeMaintenanceWindowExecutionsInput{} + } + + options := DescribeMaintenanceWindowExecutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowExecutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowExecutionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowExecutions page. +func (p *DescribeMaintenanceWindowExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowExecutions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowExecutionsAPIClient is a client that implements the +// DescribeMaintenanceWindowExecutions operation. +type DescribeMaintenanceWindowExecutionsAPIClient interface { + DescribeMaintenanceWindowExecutions(context.Context, *DescribeMaintenanceWindowExecutionsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) +} + +var _ DescribeMaintenanceWindowExecutionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowExecutions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go new file mode 100644 index 00000000000..1621f598f6b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about upcoming executions of a maintenance window. +func (c *Client) DescribeMaintenanceWindowSchedule(ctx context.Context, params *DescribeMaintenanceWindowScheduleInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowScheduleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowSchedule", params, optFns, c.addOperationDescribeMaintenanceWindowScheduleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowScheduleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowScheduleInput struct { + + // Filters used to limit the range of results. For example, you can limit + // maintenance window executions to only those scheduled before or after a certain + // date and time. + Filters []types.PatchOrchestratorFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The type of resource you want to retrieve information about. For example, + // INSTANCE . + ResourceType types.MaintenanceWindowResourceType + + // The managed node ID or key-value pair to retrieve information about. + Targets []types.Target + + // The ID of the maintenance window to retrieve information about. + WindowId *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowScheduleOutput struct { + + // The token for the next set of items to return. (You use this token in the next + // call.) + NextToken *string + + // Information about maintenance window executions scheduled for the specified + // time range. + ScheduledWindowExecutions []types.ScheduledWindowExecution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowSchedule"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowSchedule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowSchedulePaginatorOptions is the paginator options for +// DescribeMaintenanceWindowSchedule +type DescribeMaintenanceWindowSchedulePaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowSchedulePaginator is a paginator for +// DescribeMaintenanceWindowSchedule +type DescribeMaintenanceWindowSchedulePaginator struct { + options DescribeMaintenanceWindowSchedulePaginatorOptions + client DescribeMaintenanceWindowScheduleAPIClient + params *DescribeMaintenanceWindowScheduleInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowSchedulePaginator returns a new +// DescribeMaintenanceWindowSchedulePaginator +func NewDescribeMaintenanceWindowSchedulePaginator(client DescribeMaintenanceWindowScheduleAPIClient, params *DescribeMaintenanceWindowScheduleInput, optFns ...func(*DescribeMaintenanceWindowSchedulePaginatorOptions)) *DescribeMaintenanceWindowSchedulePaginator { + if params == nil { + params = &DescribeMaintenanceWindowScheduleInput{} + } + + options := DescribeMaintenanceWindowSchedulePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowSchedulePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowSchedulePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowSchedule page. +func (p *DescribeMaintenanceWindowSchedulePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowSchedule(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowScheduleAPIClient is a client that implements the +// DescribeMaintenanceWindowSchedule operation. +type DescribeMaintenanceWindowScheduleAPIClient interface { + DescribeMaintenanceWindowSchedule(context.Context, *DescribeMaintenanceWindowScheduleInput, ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) +} + +var _ DescribeMaintenanceWindowScheduleAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowSchedule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowSchedule", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go new file mode 100644 index 00000000000..31bd0eea548 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the targets registered with the maintenance window. +func (c *Client) DescribeMaintenanceWindowTargets(ctx context.Context, params *DescribeMaintenanceWindowTargetsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowTargetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowTargets", params, optFns, c.addOperationDescribeMaintenanceWindowTargetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowTargetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowTargetsInput struct { + + // The ID of the maintenance window whose targets should be retrieved. + // + // This member is required. + WindowId *string + + // Optional filters that can be used to narrow down the scope of the returned + // window targets. The supported filter keys are Type , WindowTargetId , and + // OwnerInformation . + Filters []types.MaintenanceWindowFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowTargetsOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Information about the targets in the maintenance window. + Targets []types.MaintenanceWindowTarget + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowTargets"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMaintenanceWindowTargetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowTargets(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowTargetsPaginatorOptions is the paginator options for +// DescribeMaintenanceWindowTargets +type DescribeMaintenanceWindowTargetsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowTargetsPaginator is a paginator for +// DescribeMaintenanceWindowTargets +type DescribeMaintenanceWindowTargetsPaginator struct { + options DescribeMaintenanceWindowTargetsPaginatorOptions + client DescribeMaintenanceWindowTargetsAPIClient + params *DescribeMaintenanceWindowTargetsInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowTargetsPaginator returns a new +// DescribeMaintenanceWindowTargetsPaginator +func NewDescribeMaintenanceWindowTargetsPaginator(client DescribeMaintenanceWindowTargetsAPIClient, params *DescribeMaintenanceWindowTargetsInput, optFns ...func(*DescribeMaintenanceWindowTargetsPaginatorOptions)) *DescribeMaintenanceWindowTargetsPaginator { + if params == nil { + params = &DescribeMaintenanceWindowTargetsInput{} + } + + options := DescribeMaintenanceWindowTargetsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowTargetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowTargetsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowTargets page. +func (p *DescribeMaintenanceWindowTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowTargets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowTargetsAPIClient is a client that implements the +// DescribeMaintenanceWindowTargets operation. +type DescribeMaintenanceWindowTargetsAPIClient interface { + DescribeMaintenanceWindowTargets(context.Context, *DescribeMaintenanceWindowTargetsInput, ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) +} + +var _ DescribeMaintenanceWindowTargetsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowTargets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowTargets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go new file mode 100644 index 00000000000..c1649d5723b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tasks in a maintenance window. +// +// For maintenance window tasks without a specified target, you can't supply +// values for --max-errors and --max-concurrency . Instead, the system inserts a +// placeholder value of 1 , which may be reported in the response to this command. +// These values don't affect the running of your task and can be ignored. +func (c *Client) DescribeMaintenanceWindowTasks(ctx context.Context, params *DescribeMaintenanceWindowTasksInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowTasks", params, optFns, c.addOperationDescribeMaintenanceWindowTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowTasksInput struct { + + // The ID of the maintenance window whose tasks should be retrieved. + // + // This member is required. + WindowId *string + + // Optional filters used to narrow down the scope of the returned tasks. The + // supported filter keys are WindowTaskId , TaskArn , Priority , and TaskType . + Filters []types.MaintenanceWindowFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowTasksOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Information about the tasks in the maintenance window. + Tasks []types.MaintenanceWindowTask + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMaintenanceWindowTasksValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowTasksPaginatorOptions is the paginator options for +// DescribeMaintenanceWindowTasks +type DescribeMaintenanceWindowTasksPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowTasksPaginator is a paginator for +// DescribeMaintenanceWindowTasks +type DescribeMaintenanceWindowTasksPaginator struct { + options DescribeMaintenanceWindowTasksPaginatorOptions + client DescribeMaintenanceWindowTasksAPIClient + params *DescribeMaintenanceWindowTasksInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowTasksPaginator returns a new +// DescribeMaintenanceWindowTasksPaginator +func NewDescribeMaintenanceWindowTasksPaginator(client DescribeMaintenanceWindowTasksAPIClient, params *DescribeMaintenanceWindowTasksInput, optFns ...func(*DescribeMaintenanceWindowTasksPaginatorOptions)) *DescribeMaintenanceWindowTasksPaginator { + if params == nil { + params = &DescribeMaintenanceWindowTasksInput{} + } + + options := DescribeMaintenanceWindowTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowTasks page. +func (p *DescribeMaintenanceWindowTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowTasks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowTasksAPIClient is a client that implements the +// DescribeMaintenanceWindowTasks operation. +type DescribeMaintenanceWindowTasksAPIClient interface { + DescribeMaintenanceWindowTasks(context.Context, *DescribeMaintenanceWindowTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) +} + +var _ DescribeMaintenanceWindowTasksAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowTasks", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go new file mode 100644 index 00000000000..1caef35ee45 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the maintenance windows in an Amazon Web Services account. +func (c *Client) DescribeMaintenanceWindows(ctx context.Context, params *DescribeMaintenanceWindowsInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindows", params, optFns, c.addOperationDescribeMaintenanceWindowsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowsInput struct { + + // Optional filters used to narrow down the scope of the returned maintenance + // windows. Supported filter keys are Name and Enabled . For example, + // Name=MyMaintenanceWindow and Enabled=True . + Filters []types.MaintenanceWindowFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowsOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Information about the maintenance windows. + WindowIdentities []types.MaintenanceWindowIdentity + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindows{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindows{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindows"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindows(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowsPaginatorOptions is the paginator options for +// DescribeMaintenanceWindows +type DescribeMaintenanceWindowsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowsPaginator is a paginator for +// DescribeMaintenanceWindows +type DescribeMaintenanceWindowsPaginator struct { + options DescribeMaintenanceWindowsPaginatorOptions + client DescribeMaintenanceWindowsAPIClient + params *DescribeMaintenanceWindowsInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowsPaginator returns a new +// DescribeMaintenanceWindowsPaginator +func NewDescribeMaintenanceWindowsPaginator(client DescribeMaintenanceWindowsAPIClient, params *DescribeMaintenanceWindowsInput, optFns ...func(*DescribeMaintenanceWindowsPaginatorOptions)) *DescribeMaintenanceWindowsPaginator { + if params == nil { + params = &DescribeMaintenanceWindowsInput{} + } + + options := DescribeMaintenanceWindowsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindows page. +func (p *DescribeMaintenanceWindowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindows(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowsAPIClient is a client that implements the +// DescribeMaintenanceWindows operation. +type DescribeMaintenanceWindowsAPIClient interface { + DescribeMaintenanceWindows(context.Context, *DescribeMaintenanceWindowsInput, ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) +} + +var _ DescribeMaintenanceWindowsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindows(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindows", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go new file mode 100644 index 00000000000..6fc5781eb78 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the maintenance window targets or tasks that a +// managed node is associated with. +func (c *Client) DescribeMaintenanceWindowsForTarget(ctx context.Context, params *DescribeMaintenanceWindowsForTargetInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) { + if params == nil { + params = &DescribeMaintenanceWindowsForTargetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMaintenanceWindowsForTarget", params, optFns, c.addOperationDescribeMaintenanceWindowsForTargetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMaintenanceWindowsForTargetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMaintenanceWindowsForTargetInput struct { + + // The type of resource you want to retrieve information about. For example, + // INSTANCE . + // + // This member is required. + ResourceType types.MaintenanceWindowResourceType + + // The managed node ID or key-value pair to retrieve information about. + // + // This member is required. + Targets []types.Target + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMaintenanceWindowsForTargetOutput struct { + + // The token for the next set of items to return. (You use this token in the next + // call.) + NextToken *string + + // Information about the maintenance window targets and tasks a managed node is + // associated with. + WindowIdentities []types.MaintenanceWindowIdentityForTarget + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMaintenanceWindowsForTarget"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMaintenanceWindowsForTargetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowsForTarget(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMaintenanceWindowsForTargetPaginatorOptions is the paginator options +// for DescribeMaintenanceWindowsForTarget +type DescribeMaintenanceWindowsForTargetPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMaintenanceWindowsForTargetPaginator is a paginator for +// DescribeMaintenanceWindowsForTarget +type DescribeMaintenanceWindowsForTargetPaginator struct { + options DescribeMaintenanceWindowsForTargetPaginatorOptions + client DescribeMaintenanceWindowsForTargetAPIClient + params *DescribeMaintenanceWindowsForTargetInput + nextToken *string + firstPage bool +} + +// NewDescribeMaintenanceWindowsForTargetPaginator returns a new +// DescribeMaintenanceWindowsForTargetPaginator +func NewDescribeMaintenanceWindowsForTargetPaginator(client DescribeMaintenanceWindowsForTargetAPIClient, params *DescribeMaintenanceWindowsForTargetInput, optFns ...func(*DescribeMaintenanceWindowsForTargetPaginatorOptions)) *DescribeMaintenanceWindowsForTargetPaginator { + if params == nil { + params = &DescribeMaintenanceWindowsForTargetInput{} + } + + options := DescribeMaintenanceWindowsForTargetPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMaintenanceWindowsForTargetPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMaintenanceWindowsForTargetPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMaintenanceWindowsForTarget page. +func (p *DescribeMaintenanceWindowsForTargetPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMaintenanceWindowsForTarget(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMaintenanceWindowsForTargetAPIClient is a client that implements the +// DescribeMaintenanceWindowsForTarget operation. +type DescribeMaintenanceWindowsForTargetAPIClient interface { + DescribeMaintenanceWindowsForTarget(context.Context, *DescribeMaintenanceWindowsForTargetInput, ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) +} + +var _ DescribeMaintenanceWindowsForTargetAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMaintenanceWindowsForTarget(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMaintenanceWindowsForTarget", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go new file mode 100644 index 00000000000..737debcc5dd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go @@ -0,0 +1,334 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Query a set of OpsItems. You must have permission in Identity and Access +// Management (IAM) to query a list of OpsItems. For more information, see [Set up OpsCenter]in the +// Amazon Web Services Systems Manager User Guide. +// +// Operations engineers and IT professionals use Amazon Web Services Systems +// Manager OpsCenter to view, investigate, and remediate operational issues +// impacting the performance and health of their Amazon Web Services resources. For +// more information, see [Amazon Web Services Systems Manager OpsCenter]in the Amazon Web Services Systems Manager User Guide. +// +// [Amazon Web Services Systems Manager OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html +// [Set up OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html +func (c *Client) DescribeOpsItems(ctx context.Context, params *DescribeOpsItemsInput, optFns ...func(*Options)) (*DescribeOpsItemsOutput, error) { + if params == nil { + params = &DescribeOpsItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeOpsItems", params, optFns, c.addOperationDescribeOpsItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeOpsItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeOpsItemsInput struct { + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + // One or more filters to limit the response. + // + // - Key: CreatedTime + // + // Operations: GreaterThan, LessThan + // + // - Key: LastModifiedBy + // + // Operations: Contains, Equals + // + // - Key: LastModifiedTime + // + // Operations: GreaterThan, LessThan + // + // - Key: Priority + // + // Operations: Equals + // + // - Key: Source + // + // Operations: Contains, Equals + // + // - Key: Status + // + // Operations: Equals + // + // - Key: Title* + // + // Operations: Equals,Contains + // + // - Key: OperationalData** + // + // Operations: Equals + // + // - Key: OperationalDataKey + // + // Operations: Equals + // + // - Key: OperationalDataValue + // + // Operations: Equals, Contains + // + // - Key: OpsItemId + // + // Operations: Equals + // + // - Key: ResourceId + // + // Operations: Contains + // + // - Key: AutomationId + // + // Operations: Equals + // + // - Key: AccountId + // + // Operations: Equals + // + // *The Equals operator for Title matches the first 100 characters. If you specify + // more than 100 characters, they system returns an error that the filter value + // exceeds the length limit. + // + // **If you filter the response by using the OperationalData operator, specify a + // key-value pair by using the following JSON format: + // {"key":"key_name","value":"a_value"} + OpsItemFilters []types.OpsItemFilter + + noSmithyDocumentSerde +} + +type DescribeOpsItemsOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A list of OpsItems. + OpsItemSummaries []types.OpsItemSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOpsItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOpsItems{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeOpsItems"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeOpsItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOpsItems(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeOpsItemsPaginatorOptions is the paginator options for DescribeOpsItems +type DescribeOpsItemsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeOpsItemsPaginator is a paginator for DescribeOpsItems +type DescribeOpsItemsPaginator struct { + options DescribeOpsItemsPaginatorOptions + client DescribeOpsItemsAPIClient + params *DescribeOpsItemsInput + nextToken *string + firstPage bool +} + +// NewDescribeOpsItemsPaginator returns a new DescribeOpsItemsPaginator +func NewDescribeOpsItemsPaginator(client DescribeOpsItemsAPIClient, params *DescribeOpsItemsInput, optFns ...func(*DescribeOpsItemsPaginatorOptions)) *DescribeOpsItemsPaginator { + if params == nil { + params = &DescribeOpsItemsInput{} + } + + options := DescribeOpsItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeOpsItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeOpsItemsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeOpsItems page. +func (p *DescribeOpsItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOpsItemsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeOpsItems(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeOpsItemsAPIClient is a client that implements the DescribeOpsItems +// operation. +type DescribeOpsItemsAPIClient interface { + DescribeOpsItems(context.Context, *DescribeOpsItemsInput, ...func(*Options)) (*DescribeOpsItemsOutput, error) +} + +var _ DescribeOpsItemsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeOpsItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeOpsItems", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go new file mode 100644 index 00000000000..9b57909eae1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go @@ -0,0 +1,300 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the parameters in your Amazon Web Services account or the parameters +// shared with you when you enable the [Shared]option. +// +// Request results are returned on a best-effort basis. If you specify MaxResults +// in the request, the response includes information up to the limit specified. The +// number of items returned, however, can be between zero and the value of +// MaxResults . If the service reaches an internal limit while processing the +// results, it stops the operation and returns the matching values up to that point +// and a NextToken . You can specify the NextToken in a subsequent call to get the +// next set of results. +// +// Parameter names can't contain spaces. The service removes any spaces specified +// for the beginning or end of a parameter name. If the specified name for a +// parameter contains spaces between characters, the request fails with a +// ValidationException error. +// +// If you change the KMS key alias for the KMS key used to encrypt a parameter, +// then you must also update the key alias the parameter uses to reference KMS. +// Otherwise, DescribeParameters retrieves whatever the original key alias was +// referencing. +// +// [Shared]: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html#systemsmanager-DescribeParameters-request-Shared +func (c *Client) DescribeParameters(ctx context.Context, params *DescribeParametersInput, optFns ...func(*Options)) (*DescribeParametersOutput, error) { + if params == nil { + params = &DescribeParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeParameters", params, optFns, c.addOperationDescribeParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeParametersInput struct { + + // This data type is deprecated. Instead, use ParameterFilters . + Filters []types.ParametersFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // Filters to limit the request results. + ParameterFilters []types.ParameterStringFilter + + // Lists parameters that are shared with you. + // + // By default when using this option, the command returns parameters that have + // been shared using a standard Resource Access Manager Resource Share. In order + // for a parameter that was shared using the PutResourcePolicycommand to be returned, the + // associated RAM Resource Share Created From Policy must have been promoted to a + // standard Resource Share using the RAM [PromoteResourceShareCreatedFromPolicy]API operation. + // + // For more information about sharing parameters, see [Working with shared parameters] in the Amazon Web Services + // Systems Manager User Guide. + // + // [PromoteResourceShareCreatedFromPolicy]: https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html + // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html + Shared *bool + + noSmithyDocumentSerde +} + +type DescribeParametersOutput struct { + + // The token to use when requesting the next set of items. + NextToken *string + + // Parameters returned by the request. + Parameters []types.ParameterMetadata + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeParametersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeParametersPaginatorOptions is the paginator options for +// DescribeParameters +type DescribeParametersPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeParametersPaginator is a paginator for DescribeParameters +type DescribeParametersPaginator struct { + options DescribeParametersPaginatorOptions + client DescribeParametersAPIClient + params *DescribeParametersInput + nextToken *string + firstPage bool +} + +// NewDescribeParametersPaginator returns a new DescribeParametersPaginator +func NewDescribeParametersPaginator(client DescribeParametersAPIClient, params *DescribeParametersInput, optFns ...func(*DescribeParametersPaginatorOptions)) *DescribeParametersPaginator { + if params == nil { + params = &DescribeParametersInput{} + } + + options := DescribeParametersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeParametersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeParametersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeParameters page. +func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeParametersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeParameters(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeParametersAPIClient is a client that implements the DescribeParameters +// operation. +type DescribeParametersAPIClient interface { + DescribeParameters(context.Context, *DescribeParametersInput, ...func(*Options)) (*DescribeParametersOutput, error) +} + +var _ DescribeParametersAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeParameters", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go new file mode 100644 index 00000000000..6ff446aa6ef --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the patch baselines in your Amazon Web Services account. +func (c *Client) DescribePatchBaselines(ctx context.Context, params *DescribePatchBaselinesInput, optFns ...func(*Options)) (*DescribePatchBaselinesOutput, error) { + if params == nil { + params = &DescribePatchBaselinesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePatchBaselines", params, optFns, c.addOperationDescribePatchBaselinesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePatchBaselinesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribePatchBaselinesInput struct { + + // Each element in the array is a structure containing a key-value pair. + // + // Supported keys for DescribePatchBaselines include the following: + // + // - NAME_PREFIX + // + // Sample values: AWS- | My- + // + // - OWNER + // + // Sample values: AWS | Self + // + // - OPERATING_SYSTEM + // + // Sample values: AMAZON_LINUX | SUSE | WINDOWS + Filters []types.PatchOrchestratorFilter + + // The maximum number of patch baselines to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribePatchBaselinesOutput struct { + + // An array of PatchBaselineIdentity elements. + BaselineIdentities []types.PatchBaselineIdentity + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchBaselines{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchBaselines{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchBaselines"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchBaselines(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribePatchBaselinesPaginatorOptions is the paginator options for +// DescribePatchBaselines +type DescribePatchBaselinesPaginatorOptions struct { + // The maximum number of patch baselines to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribePatchBaselinesPaginator is a paginator for DescribePatchBaselines +type DescribePatchBaselinesPaginator struct { + options DescribePatchBaselinesPaginatorOptions + client DescribePatchBaselinesAPIClient + params *DescribePatchBaselinesInput + nextToken *string + firstPage bool +} + +// NewDescribePatchBaselinesPaginator returns a new DescribePatchBaselinesPaginator +func NewDescribePatchBaselinesPaginator(client DescribePatchBaselinesAPIClient, params *DescribePatchBaselinesInput, optFns ...func(*DescribePatchBaselinesPaginatorOptions)) *DescribePatchBaselinesPaginator { + if params == nil { + params = &DescribePatchBaselinesInput{} + } + + options := DescribePatchBaselinesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribePatchBaselinesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribePatchBaselinesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribePatchBaselines page. +func (p *DescribePatchBaselinesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePatchBaselinesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribePatchBaselines(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribePatchBaselinesAPIClient is a client that implements the +// DescribePatchBaselines operation. +type DescribePatchBaselinesAPIClient interface { + DescribePatchBaselines(context.Context, *DescribePatchBaselinesInput, ...func(*Options)) (*DescribePatchBaselinesOutput, error) +} + +var _ DescribePatchBaselinesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribePatchBaselines(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribePatchBaselines", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go new file mode 100644 index 00000000000..820b3e47797 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns high-level aggregated patch compliance state information for a patch +// group. +func (c *Client) DescribePatchGroupState(ctx context.Context, params *DescribePatchGroupStateInput, optFns ...func(*Options)) (*DescribePatchGroupStateOutput, error) { + if params == nil { + params = &DescribePatchGroupStateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePatchGroupState", params, optFns, c.addOperationDescribePatchGroupStateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePatchGroupStateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribePatchGroupStateInput struct { + + // The name of the patch group whose patch snapshot should be retrieved. + // + // This member is required. + PatchGroup *string + + noSmithyDocumentSerde +} + +type DescribePatchGroupStateOutput struct { + + // The number of managed nodes in the patch group. + Instances int32 + + // The number of managed nodes for which security-related patches are available + // but not approved because because they didn't meet the patch baseline + // requirements. For example, an updated version of a patch might have been + // released before the specified auto-approval period was over. + // + // Applies to Windows Server managed nodes only. + InstancesWithAvailableSecurityUpdates *int32 + + // The number of managed nodes where patches that are specified as Critical for + // compliance reporting in the patch baseline aren't installed. These patches might + // be missing, have failed installation, were rejected, or were installed but + // awaiting a required managed node reboot. The status of these managed nodes is + // NON_COMPLIANT . + InstancesWithCriticalNonCompliantPatches *int32 + + // The number of managed nodes with patches from the patch baseline that failed to + // install. + InstancesWithFailedPatches int32 + + // The number of managed nodes with patches installed that aren't defined in the + // patch baseline. + InstancesWithInstalledOtherPatches int32 + + // The number of managed nodes with installed patches. + InstancesWithInstalledPatches int32 + + // The number of managed nodes with patches installed by Patch Manager that + // haven't been rebooted after the patch installation. The status of these managed + // nodes is NON_COMPLIANT . + InstancesWithInstalledPendingRebootPatches *int32 + + // The number of managed nodes with patches installed that are specified in a + // RejectedPatches list. Patches with a status of INSTALLED_REJECTED were + // typically installed before they were added to a RejectedPatches list. + // + // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction , the + // value of InstancesWithInstalledRejectedPatches will always be 0 (zero). + InstancesWithInstalledRejectedPatches *int32 + + // The number of managed nodes with missing patches from the patch baseline. + InstancesWithMissingPatches int32 + + // The number of managed nodes with patches that aren't applicable. + InstancesWithNotApplicablePatches int32 + + // The number of managed nodes with patches installed that are specified as other + // than Critical or Security but aren't compliant with the patch baseline. The + // status of these managed nodes is NON_COMPLIANT . + InstancesWithOtherNonCompliantPatches *int32 + + // The number of managed nodes where patches that are specified as Security in a + // patch advisory aren't installed. These patches might be missing, have failed + // installation, were rejected, or were installed but awaiting a required managed + // node reboot. The status of these managed nodes is NON_COMPLIANT . + InstancesWithSecurityNonCompliantPatches *int32 + + // The number of managed nodes with NotApplicable patches beyond the supported + // limit, which aren't reported by name to Inventory. Inventory is a tool in Amazon + // Web Services Systems Manager. + InstancesWithUnreportedNotApplicablePatches *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchGroupState{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchGroupState{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchGroupState"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribePatchGroupStateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchGroupState(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribePatchGroupState(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribePatchGroupState", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go new file mode 100644 index 00000000000..1daad7dede2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go @@ -0,0 +1,272 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all patch groups that have been registered with patch baselines. +func (c *Client) DescribePatchGroups(ctx context.Context, params *DescribePatchGroupsInput, optFns ...func(*Options)) (*DescribePatchGroupsOutput, error) { + if params == nil { + params = &DescribePatchGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePatchGroups", params, optFns, c.addOperationDescribePatchGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePatchGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribePatchGroupsInput struct { + + // Each element in the array is a structure containing a key-value pair. + // + // Supported keys for DescribePatchGroups include the following: + // + // - NAME_PREFIX + // + // Sample values: AWS- | My- . + // + // - OPERATING_SYSTEM + // + // Sample values: AMAZON_LINUX | SUSE | WINDOWS + Filters []types.PatchOrchestratorFilter + + // The maximum number of patch groups to return (per page). + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribePatchGroupsOutput struct { + + // Each entry in the array contains: + // + // - PatchGroup : string (between 1 and 256 characters. Regex: + // ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$) + // + // - PatchBaselineIdentity : A PatchBaselineIdentity element. + Mappings []types.PatchGroupPatchBaselineMapping + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribePatchGroupsPaginatorOptions is the paginator options for +// DescribePatchGroups +type DescribePatchGroupsPaginatorOptions struct { + // The maximum number of patch groups to return (per page). + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribePatchGroupsPaginator is a paginator for DescribePatchGroups +type DescribePatchGroupsPaginator struct { + options DescribePatchGroupsPaginatorOptions + client DescribePatchGroupsAPIClient + params *DescribePatchGroupsInput + nextToken *string + firstPage bool +} + +// NewDescribePatchGroupsPaginator returns a new DescribePatchGroupsPaginator +func NewDescribePatchGroupsPaginator(client DescribePatchGroupsAPIClient, params *DescribePatchGroupsInput, optFns ...func(*DescribePatchGroupsPaginatorOptions)) *DescribePatchGroupsPaginator { + if params == nil { + params = &DescribePatchGroupsInput{} + } + + options := DescribePatchGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribePatchGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribePatchGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribePatchGroups page. +func (p *DescribePatchGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePatchGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribePatchGroups(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribePatchGroupsAPIClient is a client that implements the +// DescribePatchGroups operation. +type DescribePatchGroupsAPIClient interface { + DescribePatchGroups(context.Context, *DescribePatchGroupsInput, ...func(*Options)) (*DescribePatchGroupsOutput, error) +} + +var _ DescribePatchGroupsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribePatchGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribePatchGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go new file mode 100644 index 00000000000..86cf5e859e8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go @@ -0,0 +1,304 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the properties of available patches organized by product, product family, +// classification, severity, and other properties of available patches. You can use +// the reported properties in the filters you specify in requests for operations +// such as CreatePatchBaseline, UpdatePatchBaseline, DescribeAvailablePatches, and DescribePatchBaselines. +// +// The following section lists the properties that can be used in filters for each +// major operating system type: +// +// AMAZON_LINUX Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// AMAZON_LINUX_2 Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// AMAZON_LINUX_2023 Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// CENTOS Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// DEBIAN Valid properties: PRODUCT | PRIORITY +// +// MACOS Valid properties: PRODUCT | CLASSIFICATION +// +// ORACLE_LINUX Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// REDHAT_ENTERPRISE_LINUX Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// SUSE Valid properties: PRODUCT | CLASSIFICATION | SEVERITY +// +// UBUNTU Valid properties: PRODUCT | PRIORITY +// +// WINDOWS Valid properties: PRODUCT | PRODUCT_FAMILY | CLASSIFICATION | +// MSRC_SEVERITY +func (c *Client) DescribePatchProperties(ctx context.Context, params *DescribePatchPropertiesInput, optFns ...func(*Options)) (*DescribePatchPropertiesOutput, error) { + if params == nil { + params = &DescribePatchPropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePatchProperties", params, optFns, c.addOperationDescribePatchPropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePatchPropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribePatchPropertiesInput struct { + + // The operating system type for which to list patches. + // + // This member is required. + OperatingSystem types.OperatingSystem + + // The patch property for which you want to view patch details. + // + // This member is required. + Property types.PatchProperty + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // Indicates whether to list patches for the Windows operating system or for + // applications released by Microsoft. Not applicable for the Linux or macOS + // operating systems. + PatchSet types.PatchSet + + noSmithyDocumentSerde +} + +type DescribePatchPropertiesOutput struct { + + // The token for the next set of items to return. (You use this token in the next + // call.) + NextToken *string + + // A list of the properties for patches matching the filter request parameters. + Properties []map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePatchProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePatchProperties{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePatchProperties"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribePatchPropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribePatchPropertiesPaginatorOptions is the paginator options for +// DescribePatchProperties +type DescribePatchPropertiesPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribePatchPropertiesPaginator is a paginator for DescribePatchProperties +type DescribePatchPropertiesPaginator struct { + options DescribePatchPropertiesPaginatorOptions + client DescribePatchPropertiesAPIClient + params *DescribePatchPropertiesInput + nextToken *string + firstPage bool +} + +// NewDescribePatchPropertiesPaginator returns a new +// DescribePatchPropertiesPaginator +func NewDescribePatchPropertiesPaginator(client DescribePatchPropertiesAPIClient, params *DescribePatchPropertiesInput, optFns ...func(*DescribePatchPropertiesPaginatorOptions)) *DescribePatchPropertiesPaginator { + if params == nil { + params = &DescribePatchPropertiesInput{} + } + + options := DescribePatchPropertiesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribePatchPropertiesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribePatchPropertiesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribePatchProperties page. +func (p *DescribePatchPropertiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePatchPropertiesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribePatchProperties(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribePatchPropertiesAPIClient is a client that implements the +// DescribePatchProperties operation. +type DescribePatchPropertiesAPIClient interface { + DescribePatchProperties(context.Context, *DescribePatchPropertiesInput, ...func(*Options)) (*DescribePatchPropertiesOutput, error) +} + +var _ DescribePatchPropertiesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribePatchProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribePatchProperties", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go new file mode 100644 index 00000000000..83c9b5f2b00 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of all active sessions (both connected and disconnected) or +// terminated sessions from the past 30 days. +func (c *Client) DescribeSessions(ctx context.Context, params *DescribeSessionsInput, optFns ...func(*Options)) (*DescribeSessionsOutput, error) { + if params == nil { + params = &DescribeSessionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeSessions", params, optFns, c.addOperationDescribeSessionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeSessionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeSessionsInput struct { + + // The session status to retrieve a list of sessions for. For example, "Active". + // + // This member is required. + State types.SessionState + + // One or more filters to limit the type of sessions returned by the request. + Filters []types.SessionFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeSessionsOutput struct { + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // A list of sessions meeting the request parameters. + Sessions []types.Session + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeSessions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeSessions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSessions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeSessionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSessions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeSessionsPaginatorOptions is the paginator options for DescribeSessions +type DescribeSessionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSessionsPaginator is a paginator for DescribeSessions +type DescribeSessionsPaginator struct { + options DescribeSessionsPaginatorOptions + client DescribeSessionsAPIClient + params *DescribeSessionsInput + nextToken *string + firstPage bool +} + +// NewDescribeSessionsPaginator returns a new DescribeSessionsPaginator +func NewDescribeSessionsPaginator(client DescribeSessionsAPIClient, params *DescribeSessionsInput, optFns ...func(*DescribeSessionsPaginatorOptions)) *DescribeSessionsPaginator { + if params == nil { + params = &DescribeSessionsInput{} + } + + options := DescribeSessionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSessionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSessionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSessions page. +func (p *DescribeSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSessionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSessions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeSessionsAPIClient is a client that implements the DescribeSessions +// operation. +type DescribeSessionsAPIClient interface { + DescribeSessions(context.Context, *DescribeSessionsInput, ...func(*Options)) (*DescribeSessionsOutput, error) +} + +var _ DescribeSessionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeSessions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeSessions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go new file mode 100644 index 00000000000..f912b125a36 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the association between an OpsItem and a related item. For example, +// this API operation can delete an Incident Manager incident from an OpsItem. +// Incident Manager is a tool in Amazon Web Services Systems Manager. +func (c *Client) DisassociateOpsItemRelatedItem(ctx context.Context, params *DisassociateOpsItemRelatedItemInput, optFns ...func(*Options)) (*DisassociateOpsItemRelatedItemOutput, error) { + if params == nil { + params = &DisassociateOpsItemRelatedItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateOpsItemRelatedItem", params, optFns, c.addOperationDisassociateOpsItemRelatedItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateOpsItemRelatedItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateOpsItemRelatedItemInput struct { + + // The ID of the association for which you want to delete an association between + // the OpsItem and a related item. + // + // This member is required. + AssociationId *string + + // The ID of the OpsItem for which you want to delete an association between the + // OpsItem and a related item. + // + // This member is required. + OpsItemId *string + + noSmithyDocumentSerde +} + +type DisassociateOpsItemRelatedItemOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateOpsItemRelatedItem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDisassociateOpsItemRelatedItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateOpsItemRelatedItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateOpsItemRelatedItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateOpsItemRelatedItem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAccessToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAccessToken.go new file mode 100644 index 00000000000..4f461311237 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAccessToken.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a credentials set to be used with just-in-time node access. +func (c *Client) GetAccessToken(ctx context.Context, params *GetAccessTokenInput, optFns ...func(*Options)) (*GetAccessTokenOutput, error) { + if params == nil { + params = &GetAccessTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccessToken", params, optFns, c.addOperationGetAccessTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccessTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccessTokenInput struct { + + // The ID of a just-in-time node access request. + // + // This member is required. + AccessRequestId *string + + noSmithyDocumentSerde +} + +type GetAccessTokenOutput struct { + + // The status of the access request. + AccessRequestStatus types.AccessRequestStatus + + // The temporary security credentials which can be used to start just-in-time node + // access sessions. + Credentials *types.Credentials + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccessTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetAccessToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetAccessToken{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccessToken"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetAccessTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessToken(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccessToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAccessToken", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go new file mode 100644 index 00000000000..a6126719ccc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get detailed information about a particular Automation execution. +func (c *Client) GetAutomationExecution(ctx context.Context, params *GetAutomationExecutionInput, optFns ...func(*Options)) (*GetAutomationExecutionOutput, error) { + if params == nil { + params = &GetAutomationExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAutomationExecution", params, optFns, c.addOperationGetAutomationExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAutomationExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAutomationExecutionInput struct { + + // The unique identifier for an existing automation execution to examine. The + // execution ID is returned by StartAutomationExecution when the execution of an + // Automation runbook is initiated. + // + // This member is required. + AutomationExecutionId *string + + noSmithyDocumentSerde +} + +type GetAutomationExecutionOutput struct { + + // Detailed information about the current state of an automation execution. + AutomationExecution *types.AutomationExecution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetAutomationExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetAutomationExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAutomationExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetAutomationExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAutomationExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAutomationExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAutomationExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go new file mode 100644 index 00000000000..11ef7e3e48c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the state of a Amazon Web Services Systems Manager change calendar at the +// current time or a specified time. If you specify a time, GetCalendarState +// returns the state of the calendar at that specific time, and returns the next +// time that the change calendar state will transition. If you don't specify a +// time, GetCalendarState uses the current time. Change Calendar entries have two +// possible states: OPEN or CLOSED . +// +// If you specify more than one calendar in a request, the command returns the +// status of OPEN only if all calendars in the request are open. If one or more +// calendars in the request are closed, the status returned is CLOSED . +// +// For more information about Change Calendar, a tool in Amazon Web Services +// Systems Manager, see [Amazon Web Services Systems Manager Change Calendar]in the Amazon Web Services Systems Manager User Guide. +// +// [Amazon Web Services Systems Manager Change Calendar]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html +func (c *Client) GetCalendarState(ctx context.Context, params *GetCalendarStateInput, optFns ...func(*Options)) (*GetCalendarStateOutput, error) { + if params == nil { + params = &GetCalendarStateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCalendarState", params, optFns, c.addOperationGetCalendarStateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCalendarStateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCalendarStateInput struct { + + // The names of Amazon Resource Names (ARNs) of the Systems Manager documents (SSM + // documents) that represent the calendar entries for which you want to get the + // state. + // + // This member is required. + CalendarNames []string + + // (Optional) The specific time for which you want to get calendar state + // information, in [ISO 8601]format. If you don't specify a value or AtTime , the current + // time is used. + // + // [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601 + AtTime *string + + noSmithyDocumentSerde +} + +type GetCalendarStateOutput struct { + + // The time, as an [ISO 8601] string, that you specified in your command. If you don't + // specify a time, GetCalendarState uses the current time. + // + // [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601 + AtTime *string + + // The time, as an [ISO 8601] string, that the calendar state will change. If the current + // calendar state is OPEN , NextTransitionTime indicates when the calendar state + // changes to CLOSED , and vice-versa. + // + // [ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601 + NextTransitionTime *string + + // The state of the calendar. An OPEN calendar indicates that actions are allowed + // to proceed, and a CLOSED calendar indicates that actions aren't allowed to + // proceed. + State types.CalendarState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetCalendarState{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetCalendarState{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCalendarState"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetCalendarStateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCalendarState(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCalendarState(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCalendarState", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go new file mode 100644 index 00000000000..2afe08f1ad1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go @@ -0,0 +1,571 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "errors" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Returns detailed information about command execution for an invocation or +// plugin. The Run Command API follows an eventual consistency model, due to the +// distributed nature of the system supporting the API. This means that the result +// of an API command you run that affects your resources might not be immediately +// visible to all subsequent commands you run. You should keep this in mind when +// you carry out an API command that immediately follows a previous API command. +// +// GetCommandInvocation only gives the execution status of a plugin in a document. +// To get the command execution status on a specific managed node, use ListCommandInvocations. To get +// the command execution status across managed nodes, use ListCommands. +func (c *Client) GetCommandInvocation(ctx context.Context, params *GetCommandInvocationInput, optFns ...func(*Options)) (*GetCommandInvocationOutput, error) { + if params == nil { + params = &GetCommandInvocationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCommandInvocation", params, optFns, c.addOperationGetCommandInvocationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCommandInvocationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCommandInvocationInput struct { + + // (Required) The parent command ID of the invocation plugin. + // + // This member is required. + CommandId *string + + // (Required) The ID of the managed node targeted by the command. A managed node + // can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and + // on-premises server or VM in your hybrid environment that is configured for + // Amazon Web Services Systems Manager. + // + // This member is required. + InstanceId *string + + // The name of the step for which you want detailed results. If the document + // contains only one step, you can omit the name and details for that step. If the + // document contains more than one step, you must specify the name of the step for + // which you want to view details. Be sure to specify the name of the step, not the + // name of a plugin like aws:RunShellScript . + // + // To find the PluginName , check the document content and find the name of the + // step you want details for. Alternatively, use ListCommandInvocationswith the CommandId and Details + // parameters. The PluginName is the Name attribute of the CommandPlugin object in + // the CommandPlugins list. + PluginName *string + + noSmithyDocumentSerde +} + +type GetCommandInvocationOutput struct { + + // Amazon CloudWatch Logs information where Systems Manager sent the command + // output. + CloudWatchOutputConfig *types.CloudWatchOutputConfig + + // The parent command ID of the invocation plugin. + CommandId *string + + // The comment text for the command. + Comment *string + + // The name of the document that was run. For example, AWS-RunShellScript . + DocumentName *string + + // The Systems Manager document (SSM document) version used in the request. + DocumentVersion *string + + // Duration since ExecutionStartDateTime . + ExecutionElapsedTime *string + + // The date and time the plugin finished running. Date and time are written in ISO + // 8601 format. For example, June 7, 2017 is represented as 2017-06-7. The + // following sample Amazon Web Services CLI command uses the InvokedAfter filter. + // + // aws ssm list-commands --filters key=InvokedAfter,value=2017-06-07T00:00:00Z + // + // If the plugin hasn't started to run, the string is empty. + ExecutionEndDateTime *string + + // The date and time the plugin started running. Date and time are written in ISO + // 8601 format. For example, June 7, 2017 is represented as 2017-06-7. The + // following sample Amazon Web Services CLI command uses the InvokedBefore filter. + // + // aws ssm list-commands --filters key=InvokedBefore,value=2017-06-07T00:00:00Z + // + // If the plugin hasn't started to run, the string is empty. + ExecutionStartDateTime *string + + // The ID of the managed node targeted by the command. A managed node can be an + // Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, or on-premises + // server or VM in your hybrid environment that is configured for Amazon Web + // Services Systems Manager. + InstanceId *string + + // The name of the plugin, or step name, for which details are reported. For + // example, aws:RunShellScript is a plugin. + PluginName *string + + // The error level response code for the plugin script. If the response code is -1 + // , then the command hasn't started running on the managed node, or it wasn't + // received by the node. + ResponseCode int32 + + // The first 8,000 characters written by the plugin to stderr . If the command + // hasn't finished running, then this string is empty. + StandardErrorContent *string + + // The URL for the complete text written by the plugin to stderr . If the command + // hasn't finished running, then this string is empty. + StandardErrorUrl *string + + // The first 24,000 characters written by the plugin to stdout . If the command + // hasn't finished running, if ExecutionStatus is neither Succeeded nor Failed, + // then this string is empty. + StandardOutputContent *string + + // The URL for the complete text written by the plugin to stdout in Amazon Simple + // Storage Service (Amazon S3). If an S3 bucket wasn't specified, then this string + // is empty. + StandardOutputUrl *string + + // The status of this invocation plugin. This status can be different than + // StatusDetails . + Status types.CommandInvocationStatus + + // A detailed status of the command execution for an invocation. StatusDetails + // includes more information than Status because it includes states resulting from + // error and concurrency control parameters. StatusDetails can show different + // results than Status . For more information about these statuses, see [Understanding command statuses] in the + // Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the + // following values: + // + // - Pending: The command hasn't been sent to the managed node. + // + // - In Progress: The command has been sent to the managed node but hasn't + // reached a terminal state. + // + // - Delayed: The system attempted to send the command to the target, but the + // target wasn't available. The managed node might not be available because of + // network issues, because the node was stopped, or for similar reasons. The system + // will try to send the command again. + // + // - Success: The command or plugin ran successfully. This is a terminal state. + // + // - Delivery Timed Out: The command wasn't delivered to the managed node before + // the delivery timeout expired. Delivery timeouts don't count against the parent + // command's MaxErrors limit, but they do contribute to whether the parent + // command status is Success or Incomplete. This is a terminal state. + // + // - Execution Timed Out: The command started to run on the managed node, but + // the execution wasn't complete before the timeout expired. Execution timeouts + // count against the MaxErrors limit of the parent command. This is a terminal + // state. + // + // - Failed: The command wasn't run successfully on the managed node. For a + // plugin, this indicates that the result code wasn't zero. For a command + // invocation, this indicates that the result code for one or more plugins wasn't + // zero. Invocation failures count against the MaxErrors limit of the parent + // command. This is a terminal state. + // + // - Cancelled: The command was terminated before it was completed. This is a + // terminal state. + // + // - Undeliverable: The command can't be delivered to the managed node. The node + // might not exist or might not be responding. Undeliverable invocations don't + // count against the parent command's MaxErrors limit and don't contribute to + // whether the parent command status is Success or Incomplete. This is a terminal + // state. + // + // - Terminated: The parent command exceeded its MaxErrors limit and subsequent + // command invocations were canceled by the system. This is a terminal state. + // + // [Understanding command statuses]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html + StatusDetails *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetCommandInvocation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetCommandInvocation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCommandInvocation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetCommandInvocationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCommandInvocation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// CommandExecutedWaiterOptions are waiter options for CommandExecutedWaiter +type CommandExecutedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // CommandExecutedWaiter will use default minimum delay of 5 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, CommandExecutedWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetCommandInvocationInput, *GetCommandInvocationOutput, error) (bool, error) +} + +// CommandExecutedWaiter defines the waiters for CommandExecuted +type CommandExecutedWaiter struct { + client GetCommandInvocationAPIClient + + options CommandExecutedWaiterOptions +} + +// NewCommandExecutedWaiter constructs a CommandExecutedWaiter. +func NewCommandExecutedWaiter(client GetCommandInvocationAPIClient, optFns ...func(*CommandExecutedWaiterOptions)) *CommandExecutedWaiter { + options := CommandExecutedWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = commandExecutedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &CommandExecutedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for CommandExecuted waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *CommandExecutedWaiter) Wait(ctx context.Context, params *GetCommandInvocationInput, maxWaitDur time.Duration, optFns ...func(*CommandExecutedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for CommandExecuted waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *CommandExecutedWaiter) WaitForOutput(ctx context.Context, params *GetCommandInvocationInput, maxWaitDur time.Duration, optFns ...func(*CommandExecutedWaiterOptions)) (*GetCommandInvocationOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetCommandInvocation(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for CommandExecuted waiter") +} + +func commandExecutedStateRetryable(ctx context.Context, input *GetCommandInvocationInput, output *GetCommandInvocationOutput, err error) (bool, error) { + + if err == nil { + v1 := output.Status + expectedValue := "Pending" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return true, nil + } + } + + if err == nil { + v1 := output.Status + expectedValue := "InProgress" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return true, nil + } + } + + if err == nil { + v1 := output.Status + expectedValue := "Delayed" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return true, nil + } + } + + if err == nil { + v1 := output.Status + expectedValue := "Success" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, nil + } + } + + if err == nil { + v1 := output.Status + expectedValue := "Cancelled" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.Status + expectedValue := "TimedOut" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.Status + expectedValue := "Failed" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.Status + expectedValue := "Cancelling" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err != nil { + var errorType *types.InvocationDoesNotExist + if errors.As(err, &errorType) { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// GetCommandInvocationAPIClient is a client that implements the +// GetCommandInvocation operation. +type GetCommandInvocationAPIClient interface { + GetCommandInvocation(context.Context, *GetCommandInvocationInput, ...func(*Options)) (*GetCommandInvocationOutput, error) +} + +var _ GetCommandInvocationAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetCommandInvocation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCommandInvocation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go new file mode 100644 index 00000000000..b6e0cd52ab1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the Session Manager connection status for a managed node to determine +// whether it is running and ready to receive Session Manager connections. +func (c *Client) GetConnectionStatus(ctx context.Context, params *GetConnectionStatusInput, optFns ...func(*Options)) (*GetConnectionStatusOutput, error) { + if params == nil { + params = &GetConnectionStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetConnectionStatus", params, optFns, c.addOperationGetConnectionStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetConnectionStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetConnectionStatusInput struct { + + // The managed node ID. + // + // This member is required. + Target *string + + noSmithyDocumentSerde +} + +type GetConnectionStatusOutput struct { + + // The status of the connection to the managed node. + Status types.ConnectionStatus + + // The ID of the managed node to check connection status. + Target *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetConnectionStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetConnectionStatus{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetConnectionStatus"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetConnectionStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnectionStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetConnectionStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetConnectionStatus", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go new file mode 100644 index 00000000000..6c9a8efa458 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the default patch baseline. Amazon Web Services Systems Manager +// supports creating multiple default patch baselines. For example, you can create +// a default patch baseline for each operating system. +// +// If you don't specify an operating system value, the default patch baseline for +// Windows is returned. +func (c *Client) GetDefaultPatchBaseline(ctx context.Context, params *GetDefaultPatchBaselineInput, optFns ...func(*Options)) (*GetDefaultPatchBaselineOutput, error) { + if params == nil { + params = &GetDefaultPatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDefaultPatchBaseline", params, optFns, c.addOperationGetDefaultPatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDefaultPatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDefaultPatchBaselineInput struct { + + // Returns the default patch baseline for the specified operating system. + OperatingSystem types.OperatingSystem + + noSmithyDocumentSerde +} + +type GetDefaultPatchBaselineOutput struct { + + // The ID of the default patch baseline. + BaselineId *string + + // The operating system for the returned patch baseline. + OperatingSystem types.OperatingSystem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDefaultPatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDefaultPatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDefaultPatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultPatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDefaultPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDefaultPatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go new file mode 100644 index 00000000000..1d9ca6b38a9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the current snapshot for the patch baseline the managed node uses. +// This API is primarily used by the AWS-RunPatchBaseline Systems Manager document +// (SSM document). +// +// If you run the command locally, such as with the Command Line Interface (CLI), +// the system attempts to use your local Amazon Web Services credentials and the +// operation fails. To avoid this, you can run the command in the Amazon Web +// Services Systems Manager console. Use Run Command, a tool in Amazon Web Services +// Systems Manager, with an SSM document that enables you to target a managed node +// with a script or command. For example, run the command using the +// AWS-RunShellScript document or the AWS-RunPowerShellScript document. +func (c *Client) GetDeployablePatchSnapshotForInstance(ctx context.Context, params *GetDeployablePatchSnapshotForInstanceInput, optFns ...func(*Options)) (*GetDeployablePatchSnapshotForInstanceOutput, error) { + if params == nil { + params = &GetDeployablePatchSnapshotForInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDeployablePatchSnapshotForInstance", params, optFns, c.addOperationGetDeployablePatchSnapshotForInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDeployablePatchSnapshotForInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDeployablePatchSnapshotForInstanceInput struct { + + // The ID of the managed node for which the appropriate patch snapshot should be + // retrieved. + // + // This member is required. + InstanceId *string + + // The snapshot ID provided by the user when running AWS-RunPatchBaseline . + // + // This member is required. + SnapshotId *string + + // Defines the basic information about a patch baseline override. + BaselineOverride *types.BaselineOverride + + // Specifies whether to use S3 dualstack endpoints for the patch snapshot download + // URL. Set to true to receive a presigned URL that supports both IPv4 and IPv6 + // connectivity. Set to false to use standard IPv4-only endpoints. Default is false + // . This parameter is required for managed nodes in IPv6-only environments. + UseS3DualStackEndpoint bool + + noSmithyDocumentSerde +} + +type GetDeployablePatchSnapshotForInstanceOutput struct { + + // The managed node ID. + InstanceId *string + + // Returns the specific operating system (for example Windows Server 2012 or + // Amazon Linux 2015.09) on the managed node for the specified patch snapshot. + Product *string + + // A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to + // download the patch snapshot. + SnapshotDownloadUrl *string + + // The user-defined snapshot ID. + SnapshotId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDeployablePatchSnapshotForInstance"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDeployablePatchSnapshotForInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeployablePatchSnapshotForInstance(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDeployablePatchSnapshotForInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDeployablePatchSnapshotForInstance", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go new file mode 100644 index 00000000000..8615fec51ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets the contents of the specified Amazon Web Services Systems Manager document +// (SSM document). +func (c *Client) GetDocument(ctx context.Context, params *GetDocumentInput, optFns ...func(*Options)) (*GetDocumentOutput, error) { + if params == nil { + params = &GetDocumentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDocument", params, optFns, c.addOperationGetDocumentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDocumentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDocumentInput struct { + + // The name of the SSM document. + // + // This member is required. + Name *string + + // Returns the document in the specified format. The document format can be either + // JSON or YAML. JSON is the default format. + DocumentFormat types.DocumentFormat + + // The document version for which you want information. + DocumentVersion *string + + // An optional field specifying the version of the artifact associated with the + // document. For example, 12.6. This value is unique across all versions of a + // document and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +type GetDocumentOutput struct { + + // A description of the document attachments, including names, locations, sizes, + // and so on. + AttachmentsContent []types.AttachmentContent + + // The contents of the SSM document. + Content *string + + // The date the SSM document was created. + CreatedDate *time.Time + + // The friendly name of the SSM document. This value can differ for each version + // of the document. If you want to update this value, see UpdateDocument. + DisplayName *string + + // The document format, either JSON or YAML. + DocumentFormat types.DocumentFormat + + // The document type. + DocumentType types.DocumentType + + // The document version. + DocumentVersion *string + + // The name of the SSM document. + Name *string + + // A list of SSM documents required by a document. For example, an + // ApplicationConfiguration document requires an ApplicationConfigurationSchema + // document. + Requires []types.DocumentRequires + + // The current review status of a new custom Systems Manager document (SSM + // document) created by a member of your organization, or of the latest version of + // an existing SSM document. + // + // Only one version of an SSM document can be in the APPROVED state at a time. + // When a new version is approved, the status of the previous version changes to + // REJECTED. + // + // Only one version of an SSM document can be in review, or PENDING, at a time. + ReviewStatus types.ReviewStatus + + // The status of the SSM document, such as Creating , Active , Updating , Failed , + // and Deleting . + Status types.DocumentStatus + + // A message returned by Amazon Web Services Systems Manager that explains the + // Status value. For example, a Failed status might be explained by the + // StatusInformation message, "The specified S3 bucket doesn't exist. Verify that + // the URL of the S3 bucket is correct." + StatusInformation *string + + // The version of the artifact associated with the document. For example, 12.6. + // This value is unique across all versions of a document, and can't be changed. + VersionName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDocument{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDocument{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDocument"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDocumentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDocument(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDocument(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDocument", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go new file mode 100644 index 00000000000..e1c8677faee --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Initiates the process of retrieving an existing preview that shows the effects +// that running a specified Automation runbook would have on the targeted +// resources. +func (c *Client) GetExecutionPreview(ctx context.Context, params *GetExecutionPreviewInput, optFns ...func(*Options)) (*GetExecutionPreviewOutput, error) { + if params == nil { + params = &GetExecutionPreviewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExecutionPreview", params, optFns, c.addOperationGetExecutionPreviewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExecutionPreviewOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetExecutionPreviewInput struct { + + // The ID of the existing execution preview. + // + // This member is required. + ExecutionPreviewId *string + + noSmithyDocumentSerde +} + +type GetExecutionPreviewOutput struct { + + // A UTC timestamp indicating when the execution preview operation ended. + EndedAt *time.Time + + // Information about the changes that would be made if an execution were run. + ExecutionPreview types.ExecutionPreview + + // The generated ID for the existing execution preview. + ExecutionPreviewId *string + + // The current status of the execution preview operation. + Status types.ExecutionPreviewStatus + + // Supplemental information about the current status of the execution preview. + StatusMessage *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExecutionPreviewMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetExecutionPreview{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetExecutionPreview{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetExecutionPreview"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetExecutionPreviewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExecutionPreview(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetExecutionPreview(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetExecutionPreview", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go new file mode 100644 index 00000000000..899b980de62 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Query inventory information. This includes managed node status, such as Stopped +// or Terminated . +func (c *Client) GetInventory(ctx context.Context, params *GetInventoryInput, optFns ...func(*Options)) (*GetInventoryOutput, error) { + if params == nil { + params = &GetInventoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetInventory", params, optFns, c.addOperationGetInventoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetInventoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetInventoryInput struct { + + // Returns counts of inventory types based on one or more expressions. For + // example, if you aggregate by using an expression that uses the + // AWS:InstanceInformation.PlatformType type, you can see a count of how many + // Windows and Linux managed nodes exist in your inventoried fleet. + Aggregators []types.InventoryAggregator + + // One or more filters. Use a filter to return a more specific list of results. + Filters []types.InventoryFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The list of inventory item types to return. + ResultAttributes []types.ResultAttribute + + noSmithyDocumentSerde +} + +type GetInventoryOutput struct { + + // Collection of inventory entities such as a collection of managed node + // inventory. + Entities []types.InventoryResultEntity + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetInventory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetInventory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetInventory"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetInventoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInventory(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetInventoryPaginatorOptions is the paginator options for GetInventory +type GetInventoryPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetInventoryPaginator is a paginator for GetInventory +type GetInventoryPaginator struct { + options GetInventoryPaginatorOptions + client GetInventoryAPIClient + params *GetInventoryInput + nextToken *string + firstPage bool +} + +// NewGetInventoryPaginator returns a new GetInventoryPaginator +func NewGetInventoryPaginator(client GetInventoryAPIClient, params *GetInventoryInput, optFns ...func(*GetInventoryPaginatorOptions)) *GetInventoryPaginator { + if params == nil { + params = &GetInventoryInput{} + } + + options := GetInventoryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetInventoryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetInventoryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetInventory page. +func (p *GetInventoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetInventoryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetInventory(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetInventoryAPIClient is a client that implements the GetInventory operation. +type GetInventoryAPIClient interface { + GetInventory(context.Context, *GetInventoryInput, ...func(*Options)) (*GetInventoryOutput, error) +} + +var _ GetInventoryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetInventory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetInventory", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go new file mode 100644 index 00000000000..44da3ac74f2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Return a list of inventory type names for the account, or return a list of +// attribute names for a specific Inventory item type. +func (c *Client) GetInventorySchema(ctx context.Context, params *GetInventorySchemaInput, optFns ...func(*Options)) (*GetInventorySchemaOutput, error) { + if params == nil { + params = &GetInventorySchemaInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetInventorySchema", params, optFns, c.addOperationGetInventorySchemaMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetInventorySchemaOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetInventorySchemaInput struct { + + // Returns inventory schemas that support aggregation. For example, this call + // returns the AWS:InstanceInformation type, because it supports aggregation based + // on the PlatformName , PlatformType , and PlatformVersion attributes. + Aggregator bool + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // Returns the sub-type schema for a specified inventory type. + SubType *bool + + // The type of inventory item to return. + TypeName *string + + noSmithyDocumentSerde +} + +type GetInventorySchemaOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Inventory schemas returned by the request. + Schemas []types.InventoryItemSchema + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetInventorySchema{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetInventorySchema{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetInventorySchema"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInventorySchema(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetInventorySchemaPaginatorOptions is the paginator options for +// GetInventorySchema +type GetInventorySchemaPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetInventorySchemaPaginator is a paginator for GetInventorySchema +type GetInventorySchemaPaginator struct { + options GetInventorySchemaPaginatorOptions + client GetInventorySchemaAPIClient + params *GetInventorySchemaInput + nextToken *string + firstPage bool +} + +// NewGetInventorySchemaPaginator returns a new GetInventorySchemaPaginator +func NewGetInventorySchemaPaginator(client GetInventorySchemaAPIClient, params *GetInventorySchemaInput, optFns ...func(*GetInventorySchemaPaginatorOptions)) *GetInventorySchemaPaginator { + if params == nil { + params = &GetInventorySchemaInput{} + } + + options := GetInventorySchemaPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetInventorySchemaPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetInventorySchemaPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetInventorySchema page. +func (p *GetInventorySchemaPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetInventorySchemaOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetInventorySchema(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetInventorySchemaAPIClient is a client that implements the GetInventorySchema +// operation. +type GetInventorySchemaAPIClient interface { + GetInventorySchema(context.Context, *GetInventorySchemaInput, ...func(*Options)) (*GetInventorySchemaOutput, error) +} + +var _ GetInventorySchemaAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetInventorySchema(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetInventorySchema", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go new file mode 100644 index 00000000000..282be697773 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves a maintenance window. +func (c *Client) GetMaintenanceWindow(ctx context.Context, params *GetMaintenanceWindowInput, optFns ...func(*Options)) (*GetMaintenanceWindowOutput, error) { + if params == nil { + params = &GetMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindow", params, optFns, c.addOperationGetMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMaintenanceWindowInput struct { + + // The ID of the maintenance window for which you want to retrieve information. + // + // This member is required. + WindowId *string + + noSmithyDocumentSerde +} + +type GetMaintenanceWindowOutput struct { + + // Whether targets must be registered with the maintenance window before tasks can + // be defined for those targets. + AllowUnassociatedTargets bool + + // The date the maintenance window was created. + CreatedDate *time.Time + + // The number of hours before the end of the maintenance window that Amazon Web + // Services Systems Manager stops scheduling new tasks for execution. + Cutoff int32 + + // The description of the maintenance window. + Description *string + + // The duration of the maintenance window in hours. + Duration *int32 + + // Indicates whether the maintenance window is enabled. + Enabled bool + + // The date and time, in ISO-8601 Extended format, for when the maintenance window + // is scheduled to become inactive. The maintenance window won't run after this + // specified time. + EndDate *string + + // The date the maintenance window was last modified. + ModifiedDate *time.Time + + // The name of the maintenance window. + Name *string + + // The next time the maintenance window will actually run, taking into account any + // specified times for the maintenance window to become active or inactive. + NextExecutionTime *string + + // The schedule of the maintenance window in the form of a cron or rate expression. + Schedule *string + + // The number of days to wait to run a maintenance window after the scheduled cron + // expression date and time. + ScheduleOffset *int32 + + // The time zone that the scheduled maintenance window executions are based on, in + // Internet Assigned Numbers Authority (IANA) format. For example: + // "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the [Time Zone Database]on + // the IANA website. + // + // [Time Zone Database]: https://www.iana.org/time-zones + ScheduleTimezone *string + + // The date and time, in ISO-8601 Extended format, for when the maintenance window + // is scheduled to become active. The maintenance window won't run before this + // specified time. + StartDate *string + + // The ID of the created maintenance window. + WindowId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go new file mode 100644 index 00000000000..8f93f622402 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves details about a specific a maintenance window execution. +func (c *Client) GetMaintenanceWindowExecution(ctx context.Context, params *GetMaintenanceWindowExecutionInput, optFns ...func(*Options)) (*GetMaintenanceWindowExecutionOutput, error) { + if params == nil { + params = &GetMaintenanceWindowExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowExecution", params, optFns, c.addOperationGetMaintenanceWindowExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMaintenanceWindowExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMaintenanceWindowExecutionInput struct { + + // The ID of the maintenance window execution that includes the task. + // + // This member is required. + WindowExecutionId *string + + noSmithyDocumentSerde +} + +type GetMaintenanceWindowExecutionOutput struct { + + // The time the maintenance window finished running. + EndTime *time.Time + + // The time the maintenance window started running. + StartTime *time.Time + + // The status of the maintenance window execution. + Status types.MaintenanceWindowExecutionStatus + + // The details explaining the status. Not available for all status values. + StatusDetails *string + + // The ID of the task executions from the maintenance window execution. + TaskIds []string + + // The ID of the maintenance window execution. + WindowExecutionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetMaintenanceWindowExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMaintenanceWindowExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMaintenanceWindowExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go new file mode 100644 index 00000000000..dd4f5127c2a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the details about a specific task run as part of a maintenance window +// execution. +func (c *Client) GetMaintenanceWindowExecutionTask(ctx context.Context, params *GetMaintenanceWindowExecutionTaskInput, optFns ...func(*Options)) (*GetMaintenanceWindowExecutionTaskOutput, error) { + if params == nil { + params = &GetMaintenanceWindowExecutionTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowExecutionTask", params, optFns, c.addOperationGetMaintenanceWindowExecutionTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMaintenanceWindowExecutionTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMaintenanceWindowExecutionTaskInput struct { + + // The ID of the specific task execution in the maintenance window task that + // should be retrieved. + // + // This member is required. + TaskId *string + + // The ID of the maintenance window execution that includes the task. + // + // This member is required. + WindowExecutionId *string + + noSmithyDocumentSerde +} + +type GetMaintenanceWindowExecutionTaskOutput struct { + + // The details for the CloudWatch alarm you applied to your maintenance window + // task. + AlarmConfiguration *types.AlarmConfiguration + + // The time the task execution completed. + EndTime *time.Time + + // The defined maximum number of task executions that could be run in parallel. + MaxConcurrency *string + + // The defined maximum number of task execution errors allowed before scheduling + // of the task execution would have been stopped. + MaxErrors *string + + // The priority of the task. + Priority int32 + + // The role that was assumed when running the task. + ServiceRole *string + + // The time the task execution started. + StartTime *time.Time + + // The status of the task. + Status types.MaintenanceWindowExecutionStatus + + // The details explaining the status. Not available for all status values. + StatusDetails *string + + // The Amazon Resource Name (ARN) of the task that ran. + TaskArn *string + + // The ID of the specific task execution in the maintenance window task that was + // retrieved. + TaskExecutionId *string + + // The parameters passed to the task when it was run. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + // + // The map has the following format: + // + // - Key : string, between 1 and 255 characters + // + // - Value : an array of strings, each between 1 and 255 characters + TaskParameters []map[string]types.MaintenanceWindowTaskParameterValueExpression + + // The CloudWatch alarms that were invoked by the maintenance window task. + TriggeredAlarms []types.AlarmStateInformation + + // The type of task that was run. + Type types.MaintenanceWindowTaskType + + // The ID of the maintenance window execution that includes the task. + WindowExecutionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowExecutionTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetMaintenanceWindowExecutionTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMaintenanceWindowExecutionTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go new file mode 100644 index 00000000000..fcda80e2ce8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go @@ -0,0 +1,205 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves information about a specific task running on a specific target. +func (c *Client) GetMaintenanceWindowExecutionTaskInvocation(ctx context.Context, params *GetMaintenanceWindowExecutionTaskInvocationInput, optFns ...func(*Options)) (*GetMaintenanceWindowExecutionTaskInvocationOutput, error) { + if params == nil { + params = &GetMaintenanceWindowExecutionTaskInvocationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowExecutionTaskInvocation", params, optFns, c.addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMaintenanceWindowExecutionTaskInvocationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMaintenanceWindowExecutionTaskInvocationInput struct { + + // The invocation ID to retrieve. + // + // This member is required. + InvocationId *string + + // The ID of the specific task in the maintenance window task that should be + // retrieved. + // + // This member is required. + TaskId *string + + // The ID of the maintenance window execution for which the task is a part. + // + // This member is required. + WindowExecutionId *string + + noSmithyDocumentSerde +} + +type GetMaintenanceWindowExecutionTaskInvocationOutput struct { + + // The time that the task finished running on the target. + EndTime *time.Time + + // The execution ID. + ExecutionId *string + + // The invocation ID. + InvocationId *string + + // User-provided value to be included in any Amazon CloudWatch Events or Amazon + // EventBridge events raised while running tasks for these targets in this + // maintenance window. + OwnerInformation *string + + // The parameters used at the time that the task ran. + Parameters *string + + // The time that the task started running on the target. + StartTime *time.Time + + // The task status for an invocation. + Status types.MaintenanceWindowExecutionStatus + + // The details explaining the status. Details are only available for certain + // status values. + StatusDetails *string + + // The task execution ID. + TaskExecutionId *string + + // Retrieves the task type for a maintenance window. + TaskType types.MaintenanceWindowTaskType + + // The maintenance window execution ID. + WindowExecutionId *string + + // The maintenance window target ID. + WindowTargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowExecutionTaskInvocation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetMaintenanceWindowExecutionTaskInvocationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTaskInvocation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMaintenanceWindowExecutionTaskInvocation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMaintenanceWindowExecutionTaskInvocation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go new file mode 100644 index 00000000000..65d41175fd8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go @@ -0,0 +1,258 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the details of a maintenance window task. +// +// For maintenance window tasks without a specified target, you can't supply +// values for --max-errors and --max-concurrency . Instead, the system inserts a +// placeholder value of 1 , which may be reported in the response to this command. +// These values don't affect the running of your task and can be ignored. +// +// To retrieve a list of tasks in a maintenance window, instead use the DescribeMaintenanceWindowTasks command. +func (c *Client) GetMaintenanceWindowTask(ctx context.Context, params *GetMaintenanceWindowTaskInput, optFns ...func(*Options)) (*GetMaintenanceWindowTaskOutput, error) { + if params == nil { + params = &GetMaintenanceWindowTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMaintenanceWindowTask", params, optFns, c.addOperationGetMaintenanceWindowTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMaintenanceWindowTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMaintenanceWindowTaskInput struct { + + // The maintenance window ID that includes the task to retrieve. + // + // This member is required. + WindowId *string + + // The maintenance window task ID to retrieve. + // + // This member is required. + WindowTaskId *string + + noSmithyDocumentSerde +} + +type GetMaintenanceWindowTaskOutput struct { + + // The details for the CloudWatch alarm you applied to your maintenance window + // task. + AlarmConfiguration *types.AlarmConfiguration + + // The action to take on tasks when the maintenance window cutoff time is reached. + // CONTINUE_TASK means that tasks continue to run. For Automation, Lambda, Step + // Functions tasks, CANCEL_TASK means that currently running task invocations + // continue, but no new task invocations are started. For Run Command tasks, + // CANCEL_TASK means the system attempts to stop the task by sending a + // CancelCommand operation. + CutoffBehavior types.MaintenanceWindowTaskCutoffBehavior + + // The retrieved task description. + Description *string + + // The location in Amazon Simple Storage Service (Amazon S3) where the task + // results are logged. + // + // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service + // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and + // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For + // information about how Amazon Web Services Systems Manager handles these options + // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + LoggingInfo *types.LoggingInfo + + // The maximum number of targets allowed to run this task in parallel. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 , + // which may be reported in the response to this command. This value doesn't affect + // the running of your task and can be ignored. + MaxConcurrency *string + + // The maximum number of errors allowed before the task stops being scheduled. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 , + // which may be reported in the response to this command. This value doesn't affect + // the running of your task and can be ignored. + MaxErrors *string + + // The retrieved task name. + Name *string + + // The priority of the task when it runs. The lower the number, the higher the + // priority. Tasks that have the same priority are scheduled in parallel. + Priority int32 + + // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services + // Systems Manager to assume when running a maintenance window task. If you do not + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the + // Amazon Web Services Systems Manager User Guide. + // + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + ServiceRoleArn *string + + // The targets where the task should run. + Targets []types.Target + + // The resource that the task used during execution. For RUN_COMMAND and AUTOMATION + // task types, the value of TaskArn is the SSM document name/ARN. For LAMBDA + // tasks, the value is the function name/ARN. For STEP_FUNCTIONS tasks, the value + // is the state machine ARN. + TaskArn *string + + // The parameters to pass to the task when it runs. + TaskInvocationParameters *types.MaintenanceWindowTaskInvocationParameters + + // The parameters to pass to the task when it runs. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + TaskParameters map[string]types.MaintenanceWindowTaskParameterValueExpression + + // The type of task to run. + TaskType types.MaintenanceWindowTaskType + + // The retrieved maintenance window ID. + WindowId *string + + // The retrieved maintenance window task ID. + WindowTaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetMaintenanceWindowTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetMaintenanceWindowTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMaintenanceWindowTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetMaintenanceWindowTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMaintenanceWindowTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMaintenanceWindowTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMaintenanceWindowTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go new file mode 100644 index 00000000000..b7e82130a35 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get information about an OpsItem by using the ID. You must have permission in +// Identity and Access Management (IAM) to view information about an OpsItem. For +// more information, see [Set up OpsCenter]in the Amazon Web Services Systems Manager User Guide. +// +// Operations engineers and IT professionals use Amazon Web Services Systems +// Manager OpsCenter to view, investigate, and remediate operational issues +// impacting the performance and health of their Amazon Web Services resources. For +// more information, see [Amazon Web Services Systems Manager OpsCenter]in the Amazon Web Services Systems Manager User Guide. +// +// [Amazon Web Services Systems Manager OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html +// [Set up OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html +func (c *Client) GetOpsItem(ctx context.Context, params *GetOpsItemInput, optFns ...func(*Options)) (*GetOpsItemOutput, error) { + if params == nil { + params = &GetOpsItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOpsItem", params, optFns, c.addOperationGetOpsItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOpsItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOpsItemInput struct { + + // The ID of the OpsItem that you want to get. + // + // This member is required. + OpsItemId *string + + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + + noSmithyDocumentSerde +} + +type GetOpsItemOutput struct { + + // The OpsItem. + OpsItem *types.OpsItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOpsItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOpsItem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpsItem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetOpsItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpsItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOpsItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOpsItem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go new file mode 100644 index 00000000000..d22725afc25 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// View operational metadata related to an application in Application Manager. +func (c *Client) GetOpsMetadata(ctx context.Context, params *GetOpsMetadataInput, optFns ...func(*Options)) (*GetOpsMetadataOutput, error) { + if params == nil { + params = &GetOpsMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOpsMetadata", params, optFns, c.addOperationGetOpsMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOpsMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOpsMetadataInput struct { + + // The Amazon Resource Name (ARN) of an OpsMetadata Object to view. + // + // This member is required. + OpsMetadataArn *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetOpsMetadataOutput struct { + + // OpsMetadata for an Application Manager application. + Metadata map[string]types.MetadataValue + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // The resource ID of the Application Manager application. + ResourceId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOpsMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOpsMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpsMetadata"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetOpsMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpsMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOpsMetadata", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go new file mode 100644 index 00000000000..13d14465962 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// View a summary of operations metadata (OpsData) based on specified filters and +// aggregators. OpsData can include information about Amazon Web Services Systems +// Manager OpsCenter operational workitems (OpsItems) as well as information about +// any Amazon Web Services resource or service configured to report OpsData to +// Amazon Web Services Systems Manager Explorer. +func (c *Client) GetOpsSummary(ctx context.Context, params *GetOpsSummaryInput, optFns ...func(*Options)) (*GetOpsSummaryOutput, error) { + if params == nil { + params = &GetOpsSummaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOpsSummary", params, optFns, c.addOperationGetOpsSummaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOpsSummaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOpsSummaryInput struct { + + // Optional aggregators that return counts of OpsData based on one or more + // expressions. + Aggregators []types.OpsAggregator + + // Optional filters used to scope down the returned OpsData. + Filters []types.OpsFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + // The OpsData data type to return. + ResultAttributes []types.OpsResultAttribute + + // Specify the name of a resource data sync to get. + SyncName *string + + noSmithyDocumentSerde +} + +type GetOpsSummaryOutput struct { + + // The list of aggregated details and filtered OpsData. + Entities []types.OpsEntity + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOpsSummary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOpsSummary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOpsSummary"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetOpsSummaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOpsSummary(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetOpsSummaryPaginatorOptions is the paginator options for GetOpsSummary +type GetOpsSummaryPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetOpsSummaryPaginator is a paginator for GetOpsSummary +type GetOpsSummaryPaginator struct { + options GetOpsSummaryPaginatorOptions + client GetOpsSummaryAPIClient + params *GetOpsSummaryInput + nextToken *string + firstPage bool +} + +// NewGetOpsSummaryPaginator returns a new GetOpsSummaryPaginator +func NewGetOpsSummaryPaginator(client GetOpsSummaryAPIClient, params *GetOpsSummaryInput, optFns ...func(*GetOpsSummaryPaginatorOptions)) *GetOpsSummaryPaginator { + if params == nil { + params = &GetOpsSummaryInput{} + } + + options := GetOpsSummaryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetOpsSummaryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetOpsSummaryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetOpsSummary page. +func (p *GetOpsSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetOpsSummaryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetOpsSummary(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetOpsSummaryAPIClient is a client that implements the GetOpsSummary operation. +type GetOpsSummaryAPIClient interface { + GetOpsSummary(context.Context, *GetOpsSummaryInput, ...func(*Options)) (*GetOpsSummaryOutput, error) +} + +var _ GetOpsSummaryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetOpsSummary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOpsSummary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go new file mode 100644 index 00000000000..056936e6fde --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get information about a single parameter by specifying the parameter name. +// +// Parameter names can't contain spaces. The service removes any spaces specified +// for the beginning or end of a parameter name. If the specified name for a +// parameter contains spaces between characters, the request fails with a +// ValidationException error. +// +// To get information about more than one parameter at a time, use the GetParameters operation. +func (c *Client) GetParameter(ctx context.Context, params *GetParameterInput, optFns ...func(*Options)) (*GetParameterOutput, error) { + if params == nil { + params = &GetParameterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetParameter", params, optFns, c.addOperationGetParameterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetParameterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetParameterInput struct { + + // The name or Amazon Resource Name (ARN) of the parameter that you want to query. + // For parameters shared with you from another account, you must use the full ARN. + // + // To query by parameter label, use "Name": "name:label" . To query by parameter + // version, use "Name": "name:version" . + // + // For more information about shared parameters, see [Working with shared parameters] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html + // + // This member is required. + Name *string + + // Return decrypted values for secure string parameters. This flag is ignored for + // String and StringList parameter types. + WithDecryption *bool + + noSmithyDocumentSerde +} + +type GetParameterOutput struct { + + // Information about a parameter. + Parameter *types.Parameter + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParameter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParameter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetParameter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetParameterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParameter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetParameter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetParameter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go new file mode 100644 index 00000000000..3c1728366f7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the history of all changes to a parameter. +// +// Parameter names can't contain spaces. The service removes any spaces specified +// for the beginning or end of a parameter name. If the specified name for a +// parameter contains spaces between characters, the request fails with a +// ValidationException error. +// +// If you change the KMS key alias for the KMS key used to encrypt a parameter, +// then you must also update the key alias the parameter uses to reference KMS. +// Otherwise, GetParameterHistory retrieves whatever the original key alias was +// referencing. +func (c *Client) GetParameterHistory(ctx context.Context, params *GetParameterHistoryInput, optFns ...func(*Options)) (*GetParameterHistoryOutput, error) { + if params == nil { + params = &GetParameterHistoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetParameterHistory", params, optFns, c.addOperationGetParameterHistoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetParameterHistoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetParameterHistoryInput struct { + + // The name or Amazon Resource Name (ARN) of the parameter for which you want to + // review history. For parameters shared with you from another account, you must + // use the full ARN. + // + // This member is required. + Name *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // Return decrypted values for secure string parameters. This flag is ignored for + // String and StringList parameter types. + WithDecryption *bool + + noSmithyDocumentSerde +} + +type GetParameterHistoryOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // A list of parameters returned by the request. + Parameters []types.ParameterHistory + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParameterHistory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParameterHistory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetParameterHistory"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetParameterHistoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParameterHistory(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetParameterHistoryPaginatorOptions is the paginator options for +// GetParameterHistory +type GetParameterHistoryPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetParameterHistoryPaginator is a paginator for GetParameterHistory +type GetParameterHistoryPaginator struct { + options GetParameterHistoryPaginatorOptions + client GetParameterHistoryAPIClient + params *GetParameterHistoryInput + nextToken *string + firstPage bool +} + +// NewGetParameterHistoryPaginator returns a new GetParameterHistoryPaginator +func NewGetParameterHistoryPaginator(client GetParameterHistoryAPIClient, params *GetParameterHistoryInput, optFns ...func(*GetParameterHistoryPaginatorOptions)) *GetParameterHistoryPaginator { + if params == nil { + params = &GetParameterHistoryInput{} + } + + options := GetParameterHistoryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetParameterHistoryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetParameterHistoryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetParameterHistory page. +func (p *GetParameterHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetParameterHistoryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetParameterHistory(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetParameterHistoryAPIClient is a client that implements the +// GetParameterHistory operation. +type GetParameterHistoryAPIClient interface { + GetParameterHistory(context.Context, *GetParameterHistoryInput, ...func(*Options)) (*GetParameterHistoryOutput, error) +} + +var _ GetParameterHistoryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetParameterHistory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetParameterHistory", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go new file mode 100644 index 00000000000..8ddea8d9d6b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go @@ -0,0 +1,186 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get information about one or more parameters by specifying multiple parameter +// names. +// +// To get information about a single parameter, you can use the GetParameter operation instead. +// +// Parameter names can't contain spaces. The service removes any spaces specified +// for the beginning or end of a parameter name. If the specified name for a +// parameter contains spaces between characters, the request fails with a +// ValidationException error. +func (c *Client) GetParameters(ctx context.Context, params *GetParametersInput, optFns ...func(*Options)) (*GetParametersOutput, error) { + if params == nil { + params = &GetParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetParameters", params, optFns, c.addOperationGetParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetParametersInput struct { + + // The names or Amazon Resource Names (ARNs) of the parameters that you want to + // query. For parameters shared with you from another account, you must use the + // full ARNs. + // + // To query by parameter label, use "Name": "name:label" . To query by parameter + // version, use "Name": "name:version" . + // + // The results for GetParameters requests are listed in alphabetical order in + // query responses. + // + // For information about shared parameters, see [Working with shared parameters] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html + // + // This member is required. + Names []string + + // Return decrypted secure string value. Return decrypted values for secure string + // parameters. This flag is ignored for String and StringList parameter types. + WithDecryption *bool + + noSmithyDocumentSerde +} + +type GetParametersOutput struct { + + // A list of parameters that aren't formatted correctly or don't run during an + // execution. + InvalidParameters []string + + // A list of details for a parameter. + Parameters []types.Parameter + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetParametersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetParameters", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go new file mode 100644 index 00000000000..f1652c1908a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go @@ -0,0 +1,302 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieve information about one or more parameters under a specified level in a +// hierarchy. +// +// Request results are returned on a best-effort basis. If you specify MaxResults +// in the request, the response includes information up to the limit specified. The +// number of items returned, however, can be between zero and the value of +// MaxResults . If the service reaches an internal limit while processing the +// results, it stops the operation and returns the matching values up to that point +// and a NextToken . You can specify the NextToken in a subsequent call to get the +// next set of results. +// +// Parameter names can't contain spaces. The service removes any spaces specified +// for the beginning or end of a parameter name. If the specified name for a +// parameter contains spaces between characters, the request fails with a +// ValidationException error. +func (c *Client) GetParametersByPath(ctx context.Context, params *GetParametersByPathInput, optFns ...func(*Options)) (*GetParametersByPathOutput, error) { + if params == nil { + params = &GetParametersByPathInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetParametersByPath", params, optFns, c.addOperationGetParametersByPathMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetParametersByPathOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetParametersByPathInput struct { + + // The hierarchy for the parameter. Hierarchies start with a forward slash (/). + // The hierarchy is the parameter name except the last part of the parameter. For + // the API call to succeed, the last part of the parameter name can't be in the + // path. A parameter name hierarchy can have a maximum of 15 levels. Here is an + // example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 + // + // This member is required. + Path *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + // Filters to limit the request results. + // + // The following Key values are supported for GetParametersByPath : Type , KeyId , + // and Label . + // + // The following Key values aren't supported for GetParametersByPath : tag , + // DataType , Name , Path , and Tier . + ParameterFilters []types.ParameterStringFilter + + // Retrieve all parameters within a hierarchy. + // + // If a user has access to a path, then the user can access all levels of that + // path. For example, if a user has permission to access path /a , then the user + // can also access /a/b . Even if a user has explicitly been denied access in IAM + // for parameter /a/b , they can still call the GetParametersByPath API operation + // recursively for /a and view /a/b . + Recursive *bool + + // Retrieve all parameters in a hierarchy with their value decrypted. + WithDecryption *bool + + noSmithyDocumentSerde +} + +type GetParametersByPathOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A list of parameters found in the specified hierarchy. + Parameters []types.Parameter + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParametersByPath{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParametersByPath{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetParametersByPath"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetParametersByPathValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParametersByPath(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetParametersByPathPaginatorOptions is the paginator options for +// GetParametersByPath +type GetParametersByPathPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetParametersByPathPaginator is a paginator for GetParametersByPath +type GetParametersByPathPaginator struct { + options GetParametersByPathPaginatorOptions + client GetParametersByPathAPIClient + params *GetParametersByPathInput + nextToken *string + firstPage bool +} + +// NewGetParametersByPathPaginator returns a new GetParametersByPathPaginator +func NewGetParametersByPathPaginator(client GetParametersByPathAPIClient, params *GetParametersByPathInput, optFns ...func(*GetParametersByPathPaginatorOptions)) *GetParametersByPathPaginator { + if params == nil { + params = &GetParametersByPathInput{} + } + + options := GetParametersByPathPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetParametersByPathPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetParametersByPathPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetParametersByPath page. +func (p *GetParametersByPathPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetParametersByPathOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetParametersByPath(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetParametersByPathAPIClient is a client that implements the +// GetParametersByPath operation. +type GetParametersByPathAPIClient interface { + GetParametersByPath(context.Context, *GetParametersByPathInput, ...func(*Options)) (*GetParametersByPathOutput, error) +} + +var _ GetParametersByPathAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetParametersByPath(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetParametersByPath", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go new file mode 100644 index 00000000000..d8aa560ff76 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves information about a patch baseline. +func (c *Client) GetPatchBaseline(ctx context.Context, params *GetPatchBaselineInput, optFns ...func(*Options)) (*GetPatchBaselineOutput, error) { + if params == nil { + params = &GetPatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPatchBaseline", params, optFns, c.addOperationGetPatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPatchBaselineInput struct { + + // The ID of the patch baseline to retrieve. + // + // To retrieve information about an Amazon Web Services managed patch baseline, + // specify the full Amazon Resource Name (ARN) of the baseline. For example, for + // the baseline AWS-AmazonLinuxDefaultPatchBaseline , specify + // arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0e392de35e7c563b7 instead of + // pb-0e392de35e7c563b7 . + // + // This member is required. + BaselineId *string + + noSmithyDocumentSerde +} + +type GetPatchBaselineOutput struct { + + // A set of rules used to include patches in the baseline. + ApprovalRules *types.PatchRuleGroup + + // A list of explicitly approved patches for the baseline. + ApprovedPatches []string + + // Returns the specified compliance severity level for approved patches in the + // patch baseline. + ApprovedPatchesComplianceLevel types.PatchComplianceLevel + + // Indicates whether the list of approved patches includes non-security updates + // that should be applied to the managed nodes. The default value is false . + // Applies to Linux managed nodes only. + ApprovedPatchesEnableNonSecurity *bool + + // Indicates the compliance status of managed nodes for which security-related + // patches are available but were not approved. This preference is specified when + // the CreatePatchBaseline or UpdatePatchBaseline commands are run. + // + // Applies to Windows Server managed nodes only. + AvailableSecurityUpdatesComplianceStatus types.PatchComplianceStatus + + // The ID of the retrieved patch baseline. + BaselineId *string + + // The date the patch baseline was created. + CreatedDate *time.Time + + // A description of the patch baseline. + Description *string + + // A set of global filters used to exclude patches from the baseline. + GlobalFilters *types.PatchFilterGroup + + // The date the patch baseline was last modified. + ModifiedDate *time.Time + + // The name of the patch baseline. + Name *string + + // Returns the operating system specified for the patch baseline. + OperatingSystem types.OperatingSystem + + // Patch groups included in the patch baseline. + PatchGroups []string + + // A list of explicitly rejected patches for the baseline. + RejectedPatches []string + + // The action specified to take on patches included in the RejectedPatches list. A + // patch can be allowed only if it is a dependency of another package, or blocked + // entirely along with packages that include it as a dependency. + RejectedPatchesAction types.PatchAction + + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. + Sources []types.PatchSource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetPatchBaselineValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go new file mode 100644 index 00000000000..abc6cc8991f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the patch baseline that should be used for the specified patch group. +func (c *Client) GetPatchBaselineForPatchGroup(ctx context.Context, params *GetPatchBaselineForPatchGroupInput, optFns ...func(*Options)) (*GetPatchBaselineForPatchGroupOutput, error) { + if params == nil { + params = &GetPatchBaselineForPatchGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPatchBaselineForPatchGroup", params, optFns, c.addOperationGetPatchBaselineForPatchGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPatchBaselineForPatchGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPatchBaselineForPatchGroupInput struct { + + // The name of the patch group whose patch baseline should be retrieved. + // + // This member is required. + PatchGroup *string + + // Returns the operating system rule specified for patch groups using the patch + // baseline. + OperatingSystem types.OperatingSystem + + noSmithyDocumentSerde +} + +type GetPatchBaselineForPatchGroupOutput struct { + + // The ID of the patch baseline that should be used for the patch group. + BaselineId *string + + // The operating system rule specified for patch groups using the patch baseline. + OperatingSystem types.OperatingSystem + + // The name of the patch group. + PatchGroup *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPatchBaselineForPatchGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPatchBaselineForPatchGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPatchBaselineForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPatchBaselineForPatchGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go new file mode 100644 index 00000000000..2d21e7eb610 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an array of the Policy object. +func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePoliciesInput, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) { + if params == nil { + params = &GetResourcePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicies", params, optFns, c.addOperationGetResourcePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePoliciesInput struct { + + // Amazon Resource Name (ARN) of the resource to which the policies are attached. + // + // This member is required. + ResourceArn *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetResourcePoliciesOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // An array of the Policy object. + Policies []types.GetResourcePoliciesResponseEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourcePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourcePolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetResourcePoliciesPaginatorOptions is the paginator options for +// GetResourcePolicies +type GetResourcePoliciesPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetResourcePoliciesPaginator is a paginator for GetResourcePolicies +type GetResourcePoliciesPaginator struct { + options GetResourcePoliciesPaginatorOptions + client GetResourcePoliciesAPIClient + params *GetResourcePoliciesInput + nextToken *string + firstPage bool +} + +// NewGetResourcePoliciesPaginator returns a new GetResourcePoliciesPaginator +func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params *GetResourcePoliciesInput, optFns ...func(*GetResourcePoliciesPaginatorOptions)) *GetResourcePoliciesPaginator { + if params == nil { + params = &GetResourcePoliciesInput{} + } + + options := GetResourcePoliciesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetResourcePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetResourcePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetResourcePolicies page. +func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetResourcePoliciesAPIClient is a client that implements the +// GetResourcePolicies operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResourcePolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go new file mode 100644 index 00000000000..a85ece8fd58 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// ServiceSetting is an account-level setting for an Amazon Web Services service. +// This setting defines how a user interacts with or uses a service or a feature of +// a service. For example, if an Amazon Web Services service charges money to the +// account based on feature or service usage, then the Amazon Web Services service +// team might create a default setting of false . This means the user can't use +// this feature unless they change the setting to true and intentionally opt in +// for a paid feature. +// +// Services map a SettingId object to a setting value. Amazon Web Services +// services teams define the default value for a SettingId . You can't create a new +// SettingId , but you can overwrite the default value if you have the +// ssm:UpdateServiceSetting permission for the setting. Use the UpdateServiceSetting API operation to +// change the default setting. Or use the ResetServiceSettingto change the value back to the original +// value defined by the Amazon Web Services service team. +// +// Query the current service setting for the Amazon Web Services account. +func (c *Client) GetServiceSetting(ctx context.Context, params *GetServiceSettingInput, optFns ...func(*Options)) (*GetServiceSettingOutput, error) { + if params == nil { + params = &GetServiceSettingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetServiceSetting", params, optFns, c.addOperationGetServiceSettingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetServiceSettingOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request body of the GetServiceSetting API operation. +type GetServiceSettingInput struct { + + // The ID of the service setting to get. The setting ID can be one of the + // following. + // + // - /ssm/appmanager/appmanager-enabled + // + // - /ssm/automation/customer-script-log-destination + // + // - /ssm/automation/customer-script-log-group-name + // + // - /ssm/automation/enable-adaptive-concurrency + // + // - /ssm/documents/console/public-sharing-permission + // + // - /ssm/managed-instance/activation-tier + // + // - /ssm/managed-instance/default-ec2-instance-management-role + // + // - /ssm/opsinsights/opscenter + // + // - /ssm/parameter-store/default-parameter-tier + // + // - /ssm/parameter-store/high-throughput-enabled + // + // This member is required. + SettingId *string + + noSmithyDocumentSerde +} + +// The query result body of the GetServiceSetting API operation. +type GetServiceSettingOutput struct { + + // The query result of the current service setting. + ServiceSetting *types.ServiceSetting + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetServiceSettingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetServiceSetting{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetServiceSetting{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetServiceSetting"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetServiceSettingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceSetting(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetServiceSetting(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetServiceSetting", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go new file mode 100644 index 00000000000..b218fa143eb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A parameter label is a user-defined alias to help you manage different versions +// of a parameter. When you modify a parameter, Amazon Web Services Systems Manager +// automatically saves a new version and increments the version number by one. A +// label can help you remember the purpose of a parameter when there are multiple +// versions. +// +// Parameter labels have the following requirements and restrictions. +// +// - A version of a parameter can have a maximum of 10 labels. +// +// - You can't attach the same label to different versions of the same +// parameter. For example, if version 1 has the label Production, then you can't +// attach Production to version 2. +// +// - You can move a label from one version of a parameter to another. +// +// - You can't create a label when you create a new parameter. You must attach a +// label to a specific version of a parameter. +// +// - If you no longer want to use a parameter label, then you can either delete +// it or move it to a different version of a parameter. +// +// - A label can have a maximum of 100 characters. +// +// - Labels can contain letters (case sensitive), numbers, periods (.), hyphens +// (-), or underscores (_). +// +// - Labels can't begin with a number, " aws " or " ssm " (not case sensitive). +// If a label fails to meet these requirements, then the label isn't associated +// with a parameter and the system displays it in the list of InvalidLabels. +// +// - Parameter names can't contain spaces. The service removes any spaces +// specified for the beginning or end of a parameter name. If the specified name +// for a parameter contains spaces between characters, the request fails with a +// ValidationException error. +func (c *Client) LabelParameterVersion(ctx context.Context, params *LabelParameterVersionInput, optFns ...func(*Options)) (*LabelParameterVersionOutput, error) { + if params == nil { + params = &LabelParameterVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "LabelParameterVersion", params, optFns, c.addOperationLabelParameterVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*LabelParameterVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type LabelParameterVersionInput struct { + + // One or more labels to attach to the specified parameter version. + // + // This member is required. + Labels []string + + // The parameter name on which you want to attach one or more labels. + // + // You can't enter the Amazon Resource Name (ARN) for a parameter, only the + // parameter name itself. + // + // This member is required. + Name *string + + // The specific version of the parameter on which you want to attach one or more + // labels. If no version is specified, the system attaches the label to the latest + // version. + ParameterVersion *int64 + + noSmithyDocumentSerde +} + +type LabelParameterVersionOutput struct { + + // The label doesn't meet the requirements. For information about parameter label + // requirements, see [Working with parameter labels]in the Amazon Web Services Systems Manager User Guide. + // + // [Working with parameter labels]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html + InvalidLabels []string + + // The version of the parameter that has been labeled. + ParameterVersion int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationLabelParameterVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpLabelParameterVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpLabelParameterVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "LabelParameterVersion"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpLabelParameterVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLabelParameterVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opLabelParameterVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "LabelParameterVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go new file mode 100644 index 00000000000..732d32e5d71 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves all versions of an association for a specific association ID. +func (c *Client) ListAssociationVersions(ctx context.Context, params *ListAssociationVersionsInput, optFns ...func(*Options)) (*ListAssociationVersionsOutput, error) { + if params == nil { + params = &ListAssociationVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAssociationVersions", params, optFns, c.addOperationListAssociationVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAssociationVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAssociationVersionsInput struct { + + // The association ID for which you want to view all versions. + // + // This member is required. + AssociationId *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAssociationVersionsOutput struct { + + // Information about all versions of the association for the specified association + // ID. + AssociationVersions []types.AssociationVersionInfo + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAssociationVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAssociationVersions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAssociationVersions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListAssociationVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociationVersions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListAssociationVersionsPaginatorOptions is the paginator options for +// ListAssociationVersions +type ListAssociationVersionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAssociationVersionsPaginator is a paginator for ListAssociationVersions +type ListAssociationVersionsPaginator struct { + options ListAssociationVersionsPaginatorOptions + client ListAssociationVersionsAPIClient + params *ListAssociationVersionsInput + nextToken *string + firstPage bool +} + +// NewListAssociationVersionsPaginator returns a new +// ListAssociationVersionsPaginator +func NewListAssociationVersionsPaginator(client ListAssociationVersionsAPIClient, params *ListAssociationVersionsInput, optFns ...func(*ListAssociationVersionsPaginatorOptions)) *ListAssociationVersionsPaginator { + if params == nil { + params = &ListAssociationVersionsInput{} + } + + options := ListAssociationVersionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAssociationVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAssociationVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAssociationVersions page. +func (p *ListAssociationVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssociationVersionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAssociationVersions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListAssociationVersionsAPIClient is a client that implements the +// ListAssociationVersions operation. +type ListAssociationVersionsAPIClient interface { + ListAssociationVersions(context.Context, *ListAssociationVersionsInput, ...func(*Options)) (*ListAssociationVersionsOutput, error) +} + +var _ ListAssociationVersionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAssociationVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAssociationVersions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go new file mode 100644 index 00000000000..249f0bf430f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns all State Manager associations in the current Amazon Web Services +// account and Amazon Web Services Region. You can limit the results to a specific +// State Manager association document or managed node by specifying a filter. State +// Manager is a tool in Amazon Web Services Systems Manager. +func (c *Client) ListAssociations(ctx context.Context, params *ListAssociationsInput, optFns ...func(*Options)) (*ListAssociationsOutput, error) { + if params == nil { + params = &ListAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAssociations", params, optFns, c.addOperationListAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAssociationsInput struct { + + // One or more filters. Use a filter to return a more specific list of results. + // + // Filtering associations using the InstanceID attribute only returns legacy + // associations created using the InstanceID attribute. Associations targeting the + // managed node that are part of the Target Attributes ResourceGroup or Tags + // aren't returned. + AssociationFilterList []types.AssociationFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListAssociationsOutput struct { + + // The associations. + Associations []types.Association + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAssociations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAssociations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListAssociationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListAssociationsPaginatorOptions is the paginator options for ListAssociations +type ListAssociationsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAssociationsPaginator is a paginator for ListAssociations +type ListAssociationsPaginator struct { + options ListAssociationsPaginatorOptions + client ListAssociationsAPIClient + params *ListAssociationsInput + nextToken *string + firstPage bool +} + +// NewListAssociationsPaginator returns a new ListAssociationsPaginator +func NewListAssociationsPaginator(client ListAssociationsAPIClient, params *ListAssociationsInput, optFns ...func(*ListAssociationsPaginatorOptions)) *ListAssociationsPaginator { + if params == nil { + params = &ListAssociationsInput{} + } + + options := ListAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAssociationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAssociations page. +func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssociationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAssociations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListAssociationsAPIClient is a client that implements the ListAssociations +// operation. +type ListAssociationsAPIClient interface { + ListAssociations(context.Context, *ListAssociationsInput, ...func(*Options)) (*ListAssociationsOutput, error) +} + +var _ ListAssociationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAssociations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go new file mode 100644 index 00000000000..d3deef36e84 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// An invocation is copy of a command sent to a specific managed node. A command +// can apply to one or more managed nodes. A command invocation applies to one +// managed node. For example, if a user runs SendCommand against three managed +// nodes, then a command invocation is created for each requested managed node ID. +// ListCommandInvocations provide status about command execution. +func (c *Client) ListCommandInvocations(ctx context.Context, params *ListCommandInvocationsInput, optFns ...func(*Options)) (*ListCommandInvocationsOutput, error) { + if params == nil { + params = &ListCommandInvocationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCommandInvocations", params, optFns, c.addOperationListCommandInvocationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCommandInvocationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCommandInvocationsInput struct { + + // (Optional) The invocations for a specific command ID. + CommandId *string + + // (Optional) If set this returns the response of the command executions and any + // command output. The default value is false . + Details bool + + // (Optional) One or more filters. Use a filter to return a more specific list of + // results. + Filters []types.CommandFilter + + // (Optional) The command execution details for a specific managed node ID. + InstanceId *string + + // (Optional) The maximum number of items to return for this call. The call also + // returns a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int32 + + // (Optional) The token for the next set of items to return. (You received this + // token from a previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListCommandInvocationsOutput struct { + + // (Optional) A list of all invocations. + CommandInvocations []types.CommandInvocation + + // (Optional) The token for the next set of items to return. (You received this + // token from a previous call.) + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCommandInvocations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCommandInvocations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCommandInvocations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListCommandInvocationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCommandInvocations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListCommandInvocationsPaginatorOptions is the paginator options for +// ListCommandInvocations +type ListCommandInvocationsPaginatorOptions struct { + // (Optional) The maximum number of items to return for this call. The call also + // returns a token that you can specify in a subsequent call to get the next set of + // results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCommandInvocationsPaginator is a paginator for ListCommandInvocations +type ListCommandInvocationsPaginator struct { + options ListCommandInvocationsPaginatorOptions + client ListCommandInvocationsAPIClient + params *ListCommandInvocationsInput + nextToken *string + firstPage bool +} + +// NewListCommandInvocationsPaginator returns a new ListCommandInvocationsPaginator +func NewListCommandInvocationsPaginator(client ListCommandInvocationsAPIClient, params *ListCommandInvocationsInput, optFns ...func(*ListCommandInvocationsPaginatorOptions)) *ListCommandInvocationsPaginator { + if params == nil { + params = &ListCommandInvocationsInput{} + } + + options := ListCommandInvocationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCommandInvocationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCommandInvocationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCommandInvocations page. +func (p *ListCommandInvocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCommandInvocationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListCommandInvocations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListCommandInvocationsAPIClient is a client that implements the +// ListCommandInvocations operation. +type ListCommandInvocationsAPIClient interface { + ListCommandInvocations(context.Context, *ListCommandInvocationsInput, ...func(*Options)) (*ListCommandInvocationsOutput, error) +} + +var _ ListCommandInvocationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCommandInvocations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCommandInvocations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go new file mode 100644 index 00000000000..ca7a02e6c1d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go @@ -0,0 +1,272 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the commands requested by users of the Amazon Web Services account. +func (c *Client) ListCommands(ctx context.Context, params *ListCommandsInput, optFns ...func(*Options)) (*ListCommandsOutput, error) { + if params == nil { + params = &ListCommandsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCommands", params, optFns, c.addOperationListCommandsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCommandsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCommandsInput struct { + + // (Optional) If provided, lists only the specified command. + CommandId *string + + // (Optional) One or more filters. Use a filter to return a more specific list of + // results. + Filters []types.CommandFilter + + // (Optional) Lists commands issued against this managed node ID. + // + // You can't specify a managed node ID in the same command that you specify Status + // = Pending . This is because the command hasn't reached the managed node yet. + InstanceId *string + + // (Optional) The maximum number of items to return for this call. The call also + // returns a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int32 + + // (Optional) The token for the next set of items to return. (You received this + // token from a previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListCommandsOutput struct { + + // (Optional) The list of commands requested by the user. + Commands []types.Command + + // (Optional) The token for the next set of items to return. (You received this + // token from a previous call.) + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCommands{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCommands{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCommands"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListCommandsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCommands(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListCommandsPaginatorOptions is the paginator options for ListCommands +type ListCommandsPaginatorOptions struct { + // (Optional) The maximum number of items to return for this call. The call also + // returns a token that you can specify in a subsequent call to get the next set of + // results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCommandsPaginator is a paginator for ListCommands +type ListCommandsPaginator struct { + options ListCommandsPaginatorOptions + client ListCommandsAPIClient + params *ListCommandsInput + nextToken *string + firstPage bool +} + +// NewListCommandsPaginator returns a new ListCommandsPaginator +func NewListCommandsPaginator(client ListCommandsAPIClient, params *ListCommandsInput, optFns ...func(*ListCommandsPaginatorOptions)) *ListCommandsPaginator { + if params == nil { + params = &ListCommandsInput{} + } + + options := ListCommandsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCommandsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCommandsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCommands page. +func (p *ListCommandsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCommandsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListCommands(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListCommandsAPIClient is a client that implements the ListCommands operation. +type ListCommandsAPIClient interface { + ListCommands(context.Context, *ListCommandsInput, ...func(*Options)) (*ListCommandsOutput, error) +} + +var _ ListCommandsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCommands(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCommands", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go new file mode 100644 index 00000000000..a6985515024 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// For a specified resource ID, this API operation returns a list of compliance +// statuses for different resource types. Currently, you can only specify one +// resource ID per call. List results depend on the criteria specified in the +// filter. +func (c *Client) ListComplianceItems(ctx context.Context, params *ListComplianceItemsInput, optFns ...func(*Options)) (*ListComplianceItemsOutput, error) { + if params == nil { + params = &ListComplianceItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListComplianceItems", params, optFns, c.addOperationListComplianceItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListComplianceItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListComplianceItemsInput struct { + + // One or more compliance filters. Use a filter to return a more specific list of + // results. + Filters []types.ComplianceStringFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + // The ID for the resources from which to get compliance information. Currently, + // you can only specify one resource ID. + ResourceIds []string + + // The type of resource from which to get compliance information. Currently, the + // only supported resource type is ManagedInstance . + ResourceTypes []string + + noSmithyDocumentSerde +} + +type ListComplianceItemsOutput struct { + + // A list of compliance information for the specified resource ID. + ComplianceItems []types.ComplianceItem + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListComplianceItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListComplianceItems{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListComplianceItems"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComplianceItems(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListComplianceItemsPaginatorOptions is the paginator options for +// ListComplianceItems +type ListComplianceItemsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListComplianceItemsPaginator is a paginator for ListComplianceItems +type ListComplianceItemsPaginator struct { + options ListComplianceItemsPaginatorOptions + client ListComplianceItemsAPIClient + params *ListComplianceItemsInput + nextToken *string + firstPage bool +} + +// NewListComplianceItemsPaginator returns a new ListComplianceItemsPaginator +func NewListComplianceItemsPaginator(client ListComplianceItemsAPIClient, params *ListComplianceItemsInput, optFns ...func(*ListComplianceItemsPaginatorOptions)) *ListComplianceItemsPaginator { + if params == nil { + params = &ListComplianceItemsInput{} + } + + options := ListComplianceItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListComplianceItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListComplianceItemsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListComplianceItems page. +func (p *ListComplianceItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComplianceItemsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListComplianceItems(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListComplianceItemsAPIClient is a client that implements the +// ListComplianceItems operation. +type ListComplianceItemsAPIClient interface { + ListComplianceItems(context.Context, *ListComplianceItemsInput, ...func(*Options)) (*ListComplianceItemsOutput, error) +} + +var _ ListComplianceItemsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListComplianceItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListComplianceItems", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go new file mode 100644 index 00000000000..8d6795f05a7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a summary count of compliant and non-compliant resources for a +// compliance type. For example, this call can return State Manager associations, +// patches, or custom compliance types according to the filter criteria that you +// specify. +func (c *Client) ListComplianceSummaries(ctx context.Context, params *ListComplianceSummariesInput, optFns ...func(*Options)) (*ListComplianceSummariesOutput, error) { + if params == nil { + params = &ListComplianceSummariesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListComplianceSummaries", params, optFns, c.addOperationListComplianceSummariesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListComplianceSummariesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListComplianceSummariesInput struct { + + // One or more compliance or inventory filters. Use a filter to return a more + // specific list of results. + Filters []types.ComplianceStringFilter + + // The maximum number of items to return for this call. Currently, you can specify + // null or 50. The call also returns a token that you can specify in a subsequent + // call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListComplianceSummariesOutput struct { + + // A list of compliant and non-compliant summary counts based on compliance types. + // For example, this call returns State Manager associations, patches, or custom + // compliance types according to the filter criteria that you specified. + ComplianceSummaryItems []types.ComplianceSummaryItem + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListComplianceSummaries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListComplianceSummaries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListComplianceSummaries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComplianceSummaries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListComplianceSummariesPaginatorOptions is the paginator options for +// ListComplianceSummaries +type ListComplianceSummariesPaginatorOptions struct { + // The maximum number of items to return for this call. Currently, you can specify + // null or 50. The call also returns a token that you can specify in a subsequent + // call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListComplianceSummariesPaginator is a paginator for ListComplianceSummaries +type ListComplianceSummariesPaginator struct { + options ListComplianceSummariesPaginatorOptions + client ListComplianceSummariesAPIClient + params *ListComplianceSummariesInput + nextToken *string + firstPage bool +} + +// NewListComplianceSummariesPaginator returns a new +// ListComplianceSummariesPaginator +func NewListComplianceSummariesPaginator(client ListComplianceSummariesAPIClient, params *ListComplianceSummariesInput, optFns ...func(*ListComplianceSummariesPaginatorOptions)) *ListComplianceSummariesPaginator { + if params == nil { + params = &ListComplianceSummariesInput{} + } + + options := ListComplianceSummariesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListComplianceSummariesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListComplianceSummariesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListComplianceSummaries page. +func (p *ListComplianceSummariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComplianceSummariesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListComplianceSummaries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListComplianceSummariesAPIClient is a client that implements the +// ListComplianceSummaries operation. +type ListComplianceSummariesAPIClient interface { + ListComplianceSummaries(context.Context, *ListComplianceSummariesInput, ...func(*Options)) (*ListComplianceSummariesOutput, error) +} + +var _ ListComplianceSummariesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListComplianceSummaries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListComplianceSummaries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go new file mode 100644 index 00000000000..412cbe03f99 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Amazon Web Services Systems Manager Change Manager is no longer open to new +// customers. Existing customers can continue to use the service as normal. For +// more information, see [Amazon Web Services Systems Manager Change Manager availability change]. +// +// Information about approval reviews for a version of a change template in Change +// Manager. +// +// [Amazon Web Services Systems Manager Change Manager availability change]: https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html +func (c *Client) ListDocumentMetadataHistory(ctx context.Context, params *ListDocumentMetadataHistoryInput, optFns ...func(*Options)) (*ListDocumentMetadataHistoryOutput, error) { + if params == nil { + params = &ListDocumentMetadataHistoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDocumentMetadataHistory", params, optFns, c.addOperationListDocumentMetadataHistoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDocumentMetadataHistoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDocumentMetadataHistoryInput struct { + + // The type of data for which details are being requested. Currently, the only + // supported value is DocumentReviews . + // + // This member is required. + Metadata types.DocumentMetadataEnum + + // The name of the change template. + // + // This member is required. + Name *string + + // The version of the change template. + DocumentVersion *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListDocumentMetadataHistoryOutput struct { + + // The user ID of the person in the organization who requested the review of the + // change template. + Author *string + + // The version of the change template. + DocumentVersion *string + + // Information about the response to the change template approval request. + Metadata *types.DocumentMetadataResponseInfo + + // The name of the change template. + Name *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDocumentMetadataHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDocumentMetadataHistory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDocumentMetadataHistory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDocumentMetadataHistory"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListDocumentMetadataHistoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDocumentMetadataHistory(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDocumentMetadataHistory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDocumentMetadataHistory", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go new file mode 100644 index 00000000000..b0da3bbad7e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all versions for a document. +func (c *Client) ListDocumentVersions(ctx context.Context, params *ListDocumentVersionsInput, optFns ...func(*Options)) (*ListDocumentVersionsOutput, error) { + if params == nil { + params = &ListDocumentVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDocumentVersions", params, optFns, c.addOperationListDocumentVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDocumentVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDocumentVersionsInput struct { + + // The name of the document. You can specify an Amazon Resource Name (ARN). + // + // This member is required. + Name *string + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListDocumentVersionsOutput struct { + + // The document versions. + DocumentVersions []types.DocumentVersionInfo + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDocumentVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDocumentVersions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDocumentVersions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListDocumentVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDocumentVersions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListDocumentVersionsPaginatorOptions is the paginator options for +// ListDocumentVersions +type ListDocumentVersionsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDocumentVersionsPaginator is a paginator for ListDocumentVersions +type ListDocumentVersionsPaginator struct { + options ListDocumentVersionsPaginatorOptions + client ListDocumentVersionsAPIClient + params *ListDocumentVersionsInput + nextToken *string + firstPage bool +} + +// NewListDocumentVersionsPaginator returns a new ListDocumentVersionsPaginator +func NewListDocumentVersionsPaginator(client ListDocumentVersionsAPIClient, params *ListDocumentVersionsInput, optFns ...func(*ListDocumentVersionsPaginatorOptions)) *ListDocumentVersionsPaginator { + if params == nil { + params = &ListDocumentVersionsInput{} + } + + options := ListDocumentVersionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDocumentVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDocumentVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListDocumentVersions page. +func (p *ListDocumentVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDocumentVersionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListDocumentVersions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListDocumentVersionsAPIClient is a client that implements the +// ListDocumentVersions operation. +type ListDocumentVersionsAPIClient interface { + ListDocumentVersions(context.Context, *ListDocumentVersionsInput, ...func(*Options)) (*ListDocumentVersionsOutput, error) +} + +var _ ListDocumentVersionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListDocumentVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDocumentVersions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go new file mode 100644 index 00000000000..4173212cad9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns all Systems Manager (SSM) documents in the current Amazon Web Services +// account and Amazon Web Services Region. You can limit the results of this +// request by using a filter. +func (c *Client) ListDocuments(ctx context.Context, params *ListDocumentsInput, optFns ...func(*Options)) (*ListDocumentsOutput, error) { + if params == nil { + params = &ListDocumentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDocuments", params, optFns, c.addOperationListDocumentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDocumentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDocumentsInput struct { + + // This data type is deprecated. Instead, use Filters . + DocumentFilterList []types.DocumentFilter + + // One or more DocumentKeyValuesFilter objects. Use a filter to return a more + // specific list of results. For keys, you can specify one or more key-value pair + // tags that have been applied to a document. Other valid keys include Owner , Name + // , PlatformTypes , DocumentType , and TargetType . For example, to return + // documents you own use Key=Owner,Values=Self . To specify a custom key-value + // pair, use the format Key=tag:tagName,Values=valueName . + // + // This API operation only supports filtering documents by using a single tag key + // and one or more tag values. For example: + // Key=tag:tagName,Values=valueName1,valueName2 + Filters []types.DocumentKeyValuesFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListDocumentsOutput struct { + + // The names of the SSM documents. + DocumentIdentifiers []types.DocumentIdentifier + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDocuments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDocuments{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDocuments"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListDocumentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDocuments(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListDocumentsPaginatorOptions is the paginator options for ListDocuments +type ListDocumentsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDocumentsPaginator is a paginator for ListDocuments +type ListDocumentsPaginator struct { + options ListDocumentsPaginatorOptions + client ListDocumentsAPIClient + params *ListDocumentsInput + nextToken *string + firstPage bool +} + +// NewListDocumentsPaginator returns a new ListDocumentsPaginator +func NewListDocumentsPaginator(client ListDocumentsAPIClient, params *ListDocumentsInput, optFns ...func(*ListDocumentsPaginatorOptions)) *ListDocumentsPaginator { + if params == nil { + params = &ListDocumentsInput{} + } + + options := ListDocumentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDocumentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDocumentsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListDocuments page. +func (p *ListDocumentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDocumentsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListDocuments(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListDocumentsAPIClient is a client that implements the ListDocuments operation. +type ListDocumentsAPIClient interface { + ListDocuments(context.Context, *ListDocumentsInput, ...func(*Options)) (*ListDocumentsOutput, error) +} + +var _ ListDocumentsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListDocuments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDocuments", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go new file mode 100644 index 00000000000..57402153adb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A list of inventory items returned by the request. +func (c *Client) ListInventoryEntries(ctx context.Context, params *ListInventoryEntriesInput, optFns ...func(*Options)) (*ListInventoryEntriesOutput, error) { + if params == nil { + params = &ListInventoryEntriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListInventoryEntries", params, optFns, c.addOperationListInventoryEntriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListInventoryEntriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListInventoryEntriesInput struct { + + // The managed node ID for which you want inventory information. + // + // This member is required. + InstanceId *string + + // The type of inventory item for which you want information. + // + // This member is required. + TypeName *string + + // One or more filters. Use a filter to return a more specific list of results. + Filters []types.InventoryFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type ListInventoryEntriesOutput struct { + + // The time that inventory information was collected for the managed nodes. + CaptureTime *string + + // A list of inventory items on the managed nodes. + Entries []map[string]string + + // The managed node ID targeted by the request to query inventory information. + InstanceId *string + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // The inventory schema version used by the managed nodes. + SchemaVersion *string + + // The type of inventory item returned by the request. + TypeName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListInventoryEntriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListInventoryEntries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListInventoryEntries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListInventoryEntries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListInventoryEntriesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInventoryEntries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListInventoryEntries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListInventoryEntries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go new file mode 100644 index 00000000000..8b0e9d8f673 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Takes in filters and returns a list of managed nodes matching the filter +// criteria. +func (c *Client) ListNodes(ctx context.Context, params *ListNodesInput, optFns ...func(*Options)) (*ListNodesOutput, error) { + if params == nil { + params = &ListNodesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNodes", params, optFns, c.addOperationListNodesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNodesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNodesInput struct { + + // One or more filters. Use a filter to return a more specific list of managed + // nodes. + Filters []types.NodeFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The name of the Amazon Web Services managed resource data sync to retrieve + // information about. + // + // For cross-account/cross-Region configurations, this parameter is required, and + // the name of the supported resource data sync is AWS-QuickSetup-ManagedNode . + // + // For single account/single-Region configurations, the parameter is not required. + SyncName *string + + noSmithyDocumentSerde +} + +type ListNodesOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // A list of managed nodes that match the specified filter criteria. + Nodes []types.Node + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListNodes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListNodes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListNodes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListNodesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListNodesPaginatorOptions is the paginator options for ListNodes +type ListNodesPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListNodesPaginator is a paginator for ListNodes +type ListNodesPaginator struct { + options ListNodesPaginatorOptions + client ListNodesAPIClient + params *ListNodesInput + nextToken *string + firstPage bool +} + +// NewListNodesPaginator returns a new ListNodesPaginator +func NewListNodesPaginator(client ListNodesAPIClient, params *ListNodesInput, optFns ...func(*ListNodesPaginatorOptions)) *ListNodesPaginator { + if params == nil { + params = &ListNodesInput{} + } + + options := ListNodesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNodesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNodesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNodes page. +func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNodesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListNodes(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListNodesAPIClient is a client that implements the ListNodes operation. +type ListNodesAPIClient interface { + ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) +} + +var _ ListNodesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListNodes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListNodes", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go new file mode 100644 index 00000000000..ddc8e607934 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a summary of managed instance/node metadata based on the filters and +// aggregators you specify. Results are grouped by the input aggregator you +// specify. +func (c *Client) ListNodesSummary(ctx context.Context, params *ListNodesSummaryInput, optFns ...func(*Options)) (*ListNodesSummaryOutput, error) { + if params == nil { + params = &ListNodesSummaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNodesSummary", params, optFns, c.addOperationListNodesSummaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNodesSummaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNodesSummaryInput struct { + + // Specify one or more aggregators to return a count of managed nodes that match + // that expression. For example, a count of managed nodes by operating system. + // + // This member is required. + Aggregators []types.NodeAggregator + + // One or more filters. Use a filter to generate a summary that matches your + // specified filter criteria. + Filters []types.NodeFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) The call also returns a token that you can specify in a + // subsequent call to get the next set of results. + NextToken *string + + // The name of the Amazon Web Services managed resource data sync to retrieve + // information about. + // + // For cross-account/cross-Region configurations, this parameter is required, and + // the name of the supported resource data sync is AWS-QuickSetup-ManagedNode . + // + // For single account/single-Region configurations, the parameter is not required. + SyncName *string + + noSmithyDocumentSerde +} + +type ListNodesSummaryOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // A collection of objects reporting information about your managed nodes, such as + // the count of nodes by operating system. + Summary []map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNodesSummaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListNodesSummary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListNodesSummary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListNodesSummary"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListNodesSummaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodesSummary(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListNodesSummaryPaginatorOptions is the paginator options for ListNodesSummary +type ListNodesSummaryPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListNodesSummaryPaginator is a paginator for ListNodesSummary +type ListNodesSummaryPaginator struct { + options ListNodesSummaryPaginatorOptions + client ListNodesSummaryAPIClient + params *ListNodesSummaryInput + nextToken *string + firstPage bool +} + +// NewListNodesSummaryPaginator returns a new ListNodesSummaryPaginator +func NewListNodesSummaryPaginator(client ListNodesSummaryAPIClient, params *ListNodesSummaryInput, optFns ...func(*ListNodesSummaryPaginatorOptions)) *ListNodesSummaryPaginator { + if params == nil { + params = &ListNodesSummaryInput{} + } + + options := ListNodesSummaryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNodesSummaryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNodesSummaryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNodesSummary page. +func (p *ListNodesSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNodesSummaryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListNodesSummary(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListNodesSummaryAPIClient is a client that implements the ListNodesSummary +// operation. +type ListNodesSummaryAPIClient interface { + ListNodesSummary(context.Context, *ListNodesSummaryInput, ...func(*Options)) (*ListNodesSummaryOutput, error) +} + +var _ ListNodesSummaryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListNodesSummary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListNodesSummary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go new file mode 100644 index 00000000000..34f5f9d6d3c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all OpsItem events in the current Amazon Web Services Region +// and Amazon Web Services account. You can limit the results to events associated +// with specific OpsItems by specifying a filter. +func (c *Client) ListOpsItemEvents(ctx context.Context, params *ListOpsItemEventsInput, optFns ...func(*Options)) (*ListOpsItemEventsOutput, error) { + if params == nil { + params = &ListOpsItemEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpsItemEvents", params, optFns, c.addOperationListOpsItemEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpsItemEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpsItemEventsInput struct { + + // One or more OpsItem filters. Use a filter to return a more specific list of + // results. + Filters []types.OpsItemEventFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListOpsItemEventsOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A list of event information for the specified OpsItems. + Summaries []types.OpsItemEventSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOpsItemEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOpsItemEvents{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOpsItemEvents"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListOpsItemEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpsItemEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListOpsItemEventsPaginatorOptions is the paginator options for ListOpsItemEvents +type ListOpsItemEventsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOpsItemEventsPaginator is a paginator for ListOpsItemEvents +type ListOpsItemEventsPaginator struct { + options ListOpsItemEventsPaginatorOptions + client ListOpsItemEventsAPIClient + params *ListOpsItemEventsInput + nextToken *string + firstPage bool +} + +// NewListOpsItemEventsPaginator returns a new ListOpsItemEventsPaginator +func NewListOpsItemEventsPaginator(client ListOpsItemEventsAPIClient, params *ListOpsItemEventsInput, optFns ...func(*ListOpsItemEventsPaginatorOptions)) *ListOpsItemEventsPaginator { + if params == nil { + params = &ListOpsItemEventsInput{} + } + + options := ListOpsItemEventsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOpsItemEventsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOpsItemEventsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOpsItemEvents page. +func (p *ListOpsItemEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOpsItemEventsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListOpsItemEvents(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListOpsItemEventsAPIClient is a client that implements the ListOpsItemEvents +// operation. +type ListOpsItemEventsAPIClient interface { + ListOpsItemEvents(context.Context, *ListOpsItemEventsInput, ...func(*Options)) (*ListOpsItemEventsOutput, error) +} + +var _ ListOpsItemEventsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListOpsItemEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOpsItemEvents", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go new file mode 100644 index 00000000000..aaa56d5730b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all related-item resources associated with a Systems Manager OpsCenter +// OpsItem. OpsCenter is a tool in Amazon Web Services Systems Manager. +func (c *Client) ListOpsItemRelatedItems(ctx context.Context, params *ListOpsItemRelatedItemsInput, optFns ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) { + if params == nil { + params = &ListOpsItemRelatedItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpsItemRelatedItems", params, optFns, c.addOperationListOpsItemRelatedItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpsItemRelatedItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpsItemRelatedItemsInput struct { + + // One or more OpsItem filters. Use a filter to return a more specific list of + // results. + Filters []types.OpsItemRelatedItemsFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The ID of the OpsItem for which you want to list all related-item resources. + OpsItemId *string + + noSmithyDocumentSerde +} + +type ListOpsItemRelatedItemsOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A list of related-item resources for the specified OpsItem. + Summaries []types.OpsItemRelatedItemSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOpsItemRelatedItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOpsItemRelatedItems{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOpsItemRelatedItems"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListOpsItemRelatedItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpsItemRelatedItems(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListOpsItemRelatedItemsPaginatorOptions is the paginator options for +// ListOpsItemRelatedItems +type ListOpsItemRelatedItemsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOpsItemRelatedItemsPaginator is a paginator for ListOpsItemRelatedItems +type ListOpsItemRelatedItemsPaginator struct { + options ListOpsItemRelatedItemsPaginatorOptions + client ListOpsItemRelatedItemsAPIClient + params *ListOpsItemRelatedItemsInput + nextToken *string + firstPage bool +} + +// NewListOpsItemRelatedItemsPaginator returns a new +// ListOpsItemRelatedItemsPaginator +func NewListOpsItemRelatedItemsPaginator(client ListOpsItemRelatedItemsAPIClient, params *ListOpsItemRelatedItemsInput, optFns ...func(*ListOpsItemRelatedItemsPaginatorOptions)) *ListOpsItemRelatedItemsPaginator { + if params == nil { + params = &ListOpsItemRelatedItemsInput{} + } + + options := ListOpsItemRelatedItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOpsItemRelatedItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOpsItemRelatedItemsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOpsItemRelatedItems page. +func (p *ListOpsItemRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListOpsItemRelatedItems(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListOpsItemRelatedItemsAPIClient is a client that implements the +// ListOpsItemRelatedItems operation. +type ListOpsItemRelatedItemsAPIClient interface { + ListOpsItemRelatedItems(context.Context, *ListOpsItemRelatedItemsInput, ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) +} + +var _ ListOpsItemRelatedItemsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListOpsItemRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOpsItemRelatedItems", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go new file mode 100644 index 00000000000..e4a21295b68 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Amazon Web Services Systems Manager calls this API operation when displaying +// all Application Manager OpsMetadata objects or blobs. +func (c *Client) ListOpsMetadata(ctx context.Context, params *ListOpsMetadataInput, optFns ...func(*Options)) (*ListOpsMetadataOutput, error) { + if params == nil { + params = &ListOpsMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpsMetadata", params, optFns, c.addOperationListOpsMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpsMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpsMetadataInput struct { + + // One or more filters to limit the number of OpsMetadata objects returned by the + // call. + Filters []types.OpsMetadataFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListOpsMetadataOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // Returns a list of OpsMetadata objects. + OpsMetadataList []types.OpsMetadata + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOpsMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOpsMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOpsMetadata"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListOpsMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpsMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListOpsMetadataPaginatorOptions is the paginator options for ListOpsMetadata +type ListOpsMetadataPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOpsMetadataPaginator is a paginator for ListOpsMetadata +type ListOpsMetadataPaginator struct { + options ListOpsMetadataPaginatorOptions + client ListOpsMetadataAPIClient + params *ListOpsMetadataInput + nextToken *string + firstPage bool +} + +// NewListOpsMetadataPaginator returns a new ListOpsMetadataPaginator +func NewListOpsMetadataPaginator(client ListOpsMetadataAPIClient, params *ListOpsMetadataInput, optFns ...func(*ListOpsMetadataPaginatorOptions)) *ListOpsMetadataPaginator { + if params == nil { + params = &ListOpsMetadataInput{} + } + + options := ListOpsMetadataPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOpsMetadataPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOpsMetadataPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOpsMetadata page. +func (p *ListOpsMetadataPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOpsMetadataOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListOpsMetadata(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListOpsMetadataAPIClient is a client that implements the ListOpsMetadata +// operation. +type ListOpsMetadataAPIClient interface { + ListOpsMetadata(context.Context, *ListOpsMetadataInput, ...func(*Options)) (*ListOpsMetadataOutput, error) +} + +var _ ListOpsMetadataAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOpsMetadata", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go new file mode 100644 index 00000000000..a6ad09aaaba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a resource-level summary count. The summary includes information about +// compliant and non-compliant statuses and detailed compliance-item severity +// counts, according to the filter criteria you specify. +func (c *Client) ListResourceComplianceSummaries(ctx context.Context, params *ListResourceComplianceSummariesInput, optFns ...func(*Options)) (*ListResourceComplianceSummariesOutput, error) { + if params == nil { + params = &ListResourceComplianceSummariesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceComplianceSummaries", params, optFns, c.addOperationListResourceComplianceSummariesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceComplianceSummariesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourceComplianceSummariesInput struct { + + // One or more filters. Use a filter to return a more specific list of results. + Filters []types.ComplianceStringFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListResourceComplianceSummariesOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A summary count for specified or targeted managed nodes. Summary count includes + // information about compliant and non-compliant State Manager associations, patch + // status, or custom items according to the filter criteria that you specify. + ResourceComplianceSummaryItems []types.ResourceComplianceSummaryItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResourceComplianceSummaries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResourceComplianceSummaries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceComplianceSummaries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceComplianceSummaries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListResourceComplianceSummariesPaginatorOptions is the paginator options for +// ListResourceComplianceSummaries +type ListResourceComplianceSummariesPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListResourceComplianceSummariesPaginator is a paginator for +// ListResourceComplianceSummaries +type ListResourceComplianceSummariesPaginator struct { + options ListResourceComplianceSummariesPaginatorOptions + client ListResourceComplianceSummariesAPIClient + params *ListResourceComplianceSummariesInput + nextToken *string + firstPage bool +} + +// NewListResourceComplianceSummariesPaginator returns a new +// ListResourceComplianceSummariesPaginator +func NewListResourceComplianceSummariesPaginator(client ListResourceComplianceSummariesAPIClient, params *ListResourceComplianceSummariesInput, optFns ...func(*ListResourceComplianceSummariesPaginatorOptions)) *ListResourceComplianceSummariesPaginator { + if params == nil { + params = &ListResourceComplianceSummariesInput{} + } + + options := ListResourceComplianceSummariesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceComplianceSummariesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceComplianceSummariesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourceComplianceSummaries page. +func (p *ListResourceComplianceSummariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceComplianceSummariesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourceComplianceSummaries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListResourceComplianceSummariesAPIClient is a client that implements the +// ListResourceComplianceSummaries operation. +type ListResourceComplianceSummariesAPIClient interface { + ListResourceComplianceSummaries(context.Context, *ListResourceComplianceSummariesInput, ...func(*Options)) (*ListResourceComplianceSummariesOutput, error) +} + +var _ ListResourceComplianceSummariesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListResourceComplianceSummaries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResourceComplianceSummaries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go new file mode 100644 index 00000000000..10c06c3f29d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists your resource data sync configurations. Includes information about the +// last time a sync attempted to start, the last sync status, and the last time a +// sync successfully completed. +// +// The number of sync configurations might be too large to return using a single +// call to ListResourceDataSync . You can limit the number of sync configurations +// returned by using the MaxResults parameter. To determine whether there are more +// sync configurations to list, check the value of NextToken in the output. If +// there are more sync configurations to list, you can request them by specifying +// the NextToken returned in the call to the parameter of a subsequent call. +func (c *Client) ListResourceDataSync(ctx context.Context, params *ListResourceDataSyncInput, optFns ...func(*Options)) (*ListResourceDataSyncOutput, error) { + if params == nil { + params = &ListResourceDataSyncInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceDataSync", params, optFns, c.addOperationListResourceDataSyncMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceDataSyncOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourceDataSyncInput struct { + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // A token to start the list. Use this token to get the next set of results. + NextToken *string + + // View a list of resource data syncs according to the sync type. Specify + // SyncToDestination to view resource data syncs that synchronize data to an Amazon + // S3 bucket. Specify SyncFromSource to view resource data syncs from + // Organizations or from multiple Amazon Web Services Regions. + SyncType *string + + noSmithyDocumentSerde +} + +type ListResourceDataSyncOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A list of your current resource data sync configurations and their statuses. + ResourceDataSyncItems []types.ResourceDataSyncItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResourceDataSync{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResourceDataSync{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceDataSync"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceDataSync(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListResourceDataSyncPaginatorOptions is the paginator options for +// ListResourceDataSync +type ListResourceDataSyncPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListResourceDataSyncPaginator is a paginator for ListResourceDataSync +type ListResourceDataSyncPaginator struct { + options ListResourceDataSyncPaginatorOptions + client ListResourceDataSyncAPIClient + params *ListResourceDataSyncInput + nextToken *string + firstPage bool +} + +// NewListResourceDataSyncPaginator returns a new ListResourceDataSyncPaginator +func NewListResourceDataSyncPaginator(client ListResourceDataSyncAPIClient, params *ListResourceDataSyncInput, optFns ...func(*ListResourceDataSyncPaginatorOptions)) *ListResourceDataSyncPaginator { + if params == nil { + params = &ListResourceDataSyncInput{} + } + + options := ListResourceDataSyncPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceDataSyncPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceDataSyncPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourceDataSync page. +func (p *ListResourceDataSyncPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceDataSyncOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourceDataSync(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListResourceDataSyncAPIClient is a client that implements the +// ListResourceDataSync operation. +type ListResourceDataSyncAPIClient interface { + ListResourceDataSync(context.Context, *ListResourceDataSyncInput, ...func(*Options)) (*ListResourceDataSyncOutput, error) +} + +var _ ListResourceDataSyncAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResourceDataSync", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..34ad98ea800 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the tags assigned to the specified resource. +// +// For information about the ID format for each supported resource type, see AddTagsToResource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The resource ID for which you want to see a list of tags. + // + // This member is required. + ResourceId *string + + // Returns a list of tags for a specific resource type. + // + // This member is required. + ResourceType types.ResourceTypeForTagging + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // A list of tags. + TagList []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTagsForResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go new file mode 100644 index 00000000000..904212aee72 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Shares a Amazon Web Services Systems Manager document (SSM document)publicly or +// privately. If you share a document privately, you must specify the Amazon Web +// Services user IDs for those people who can use the document. If you share a +// document publicly, you must specify All as the account ID. +func (c *Client) ModifyDocumentPermission(ctx context.Context, params *ModifyDocumentPermissionInput, optFns ...func(*Options)) (*ModifyDocumentPermissionOutput, error) { + if params == nil { + params = &ModifyDocumentPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyDocumentPermission", params, optFns, c.addOperationModifyDocumentPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyDocumentPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyDocumentPermissionInput struct { + + // The name of the document that you want to share. + // + // This member is required. + Name *string + + // The permission type for the document. The permission type can be Share. + // + // This member is required. + PermissionType types.DocumentPermissionType + + // The Amazon Web Services users that should have access to the document. The + // account IDs can either be a group of account IDs or All. You must specify a + // value for this parameter or the AccountIdsToRemove parameter. + AccountIdsToAdd []string + + // The Amazon Web Services users that should no longer have access to the + // document. The Amazon Web Services user can either be a group of account IDs or + // All. This action has a higher priority than AccountIdsToAdd . If you specify an + // ID to add and the same ID to remove, the system removes access to the document. + // You must specify a value for this parameter or the AccountIdsToAdd parameter. + AccountIdsToRemove []string + + // (Optional) The version of the document to share. If it isn't specified, the + // system choose the Default version to share. + SharedDocumentVersion *string + + noSmithyDocumentSerde +} + +type ModifyDocumentPermissionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyDocumentPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyDocumentPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyDocumentPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyDocumentPermission"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpModifyDocumentPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDocumentPermission(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifyDocumentPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ModifyDocumentPermission", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go new file mode 100644 index 00000000000..37169a4ecae --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Registers a compliance type and other compliance details on a designated +// resource. This operation lets you register custom compliance details with a +// resource. This call overwrites existing compliance information on the resource, +// so you must provide a full list of compliance items each time that you send the +// request. +// +// ComplianceType can be one of the following: +// +// - ExecutionId: The execution ID when the patch, association, or custom +// compliance item was applied. +// +// - ExecutionType: Specify patch, association, or Custom: string . +// +// - ExecutionTime. The time the patch, association, or custom compliance item +// was applied to the managed node. +// +// For State Manager associations, this represents the time when compliance status +// +// was captured by the Systems Manager service during its internal compliance +// aggregation workflow, not necessarily when the association was executed on the +// managed node. State Manager updates compliance information for all associations +// on an instance whenever any association executes, which may result in multiple +// associations showing the same execution time. +// +// - Id: The patch, association, or custom compliance ID. +// +// - Title: A title. +// +// - Status: The status of the compliance item. For example, approved for +// patches, or Failed for associations. +// +// - Severity: A patch severity. For example, Critical . +// +// - DocumentName: An SSM document name. For example, AWS-RunPatchBaseline . +// +// - DocumentVersion: An SSM document version number. For example, 4. +// +// - Classification: A patch classification. For example, security updates . +// +// - PatchBaselineId: A patch baseline ID. +// +// - PatchSeverity: A patch severity. For example, Critical . +// +// - PatchState: A patch state. For example, InstancesWithFailedPatches . +// +// - PatchGroup: The name of a patch group. +// +// - InstalledTime: The time the association, patch, or custom compliance item +// was applied to the resource. Specify the time by using the following format: +// yyyy-MM-dd'T'HH:mm:ss'Z' +func (c *Client) PutComplianceItems(ctx context.Context, params *PutComplianceItemsInput, optFns ...func(*Options)) (*PutComplianceItemsOutput, error) { + if params == nil { + params = &PutComplianceItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutComplianceItems", params, optFns, c.addOperationPutComplianceItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutComplianceItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutComplianceItemsInput struct { + + // Specify the compliance type. For example, specify Association (for a State + // Manager association), Patch, or Custom: string . + // + // This member is required. + ComplianceType *string + + // A summary of the call execution that includes an execution ID, the type of + // execution (for example, Command ), and the date/time of the execution using a + // datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z' + // + // This member is required. + ExecutionSummary *types.ComplianceExecutionSummary + + // Information about the compliance as defined by the resource type. For example, + // for a patch compliance type, Items includes information about the + // PatchSeverity, Classification, and so on. + // + // This member is required. + Items []types.ComplianceItemEntry + + // Specify an ID for this resource. For a managed node, this is the node ID. + // + // This member is required. + ResourceId *string + + // Specify the type of resource. ManagedInstance is currently the only supported + // resource type. + // + // This member is required. + ResourceType *string + + // MD5 or SHA-256 content hash. The content hash is used to determine if existing + // information should be overwritten or ignored. If the content hashes match, the + // request to put compliance information is ignored. + ItemContentHash *string + + // The mode for uploading compliance items. You can specify COMPLETE or PARTIAL . + // In COMPLETE mode, the system overwrites all existing compliance information for + // the resource. You must provide a full list of compliance items each time you + // send the request. + // + // In PARTIAL mode, the system overwrites compliance information for a specific + // association. The association must be configured with SyncCompliance set to + // MANUAL . By default, all requests use COMPLETE mode. + // + // This attribute is only valid for association compliance. + UploadType types.ComplianceUploadType + + noSmithyDocumentSerde +} + +type PutComplianceItemsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutComplianceItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutComplianceItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutComplianceItems{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutComplianceItems"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutComplianceItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutComplianceItems(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutComplianceItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutComplianceItems", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go new file mode 100644 index 00000000000..5920b4c93ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Bulk update custom inventory items on one or more managed nodes. The request +// adds an inventory item, if it doesn't already exist, or updates an inventory +// item, if it does exist. +func (c *Client) PutInventory(ctx context.Context, params *PutInventoryInput, optFns ...func(*Options)) (*PutInventoryOutput, error) { + if params == nil { + params = &PutInventoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutInventory", params, optFns, c.addOperationPutInventoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutInventoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutInventoryInput struct { + + // An managed node ID where you want to add or update inventory items. + // + // This member is required. + InstanceId *string + + // The inventory items that you want to add or update on managed nodes. + // + // This member is required. + Items []types.InventoryItem + + noSmithyDocumentSerde +} + +type PutInventoryOutput struct { + + // Information about the request. + Message *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutInventoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutInventory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutInventory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutInventory"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutInventoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutInventory(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutInventory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutInventory", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go new file mode 100644 index 00000000000..21f3d8a1f9b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go @@ -0,0 +1,398 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create or update a parameter in Parameter Store. +func (c *Client) PutParameter(ctx context.Context, params *PutParameterInput, optFns ...func(*Options)) (*PutParameterOutput, error) { + if params == nil { + params = &PutParameterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutParameter", params, optFns, c.addOperationPutParameterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutParameterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutParameterInput struct { + + // The fully qualified name of the parameter that you want to create or update. + // + // You can't enter the Amazon Resource Name (ARN) for a parameter, only the + // parameter name itself. + // + // The fully qualified name includes the complete hierarchy of the parameter path + // and name. For parameters in a hierarchy, you must include a leading forward + // slash character (/) when you create or reference a parameter. For example: + // /Dev/DBServer/MySQL/db-string13 + // + // Naming Constraints: + // + // - Parameter names are case sensitive. + // + // - A parameter name must be unique within an Amazon Web Services Region + // + // - A parameter name can't be prefixed with " aws " or " ssm " + // (case-insensitive). + // + // - Parameter names can include only the following symbols and letters: + // a-zA-Z0-9_.- + // + // In addition, the slash character ( / ) is used to delineate hierarchies in + // parameter names. For example: /Dev/Production/East/Project-ABC/MyParameter + // + // - Parameter names can't contain spaces. The service removes any spaces + // specified for the beginning or end of a parameter name. If the specified name + // for a parameter contains spaces between characters, the request fails with a + // ValidationException error. + // + // - Parameter hierarchies are limited to a maximum depth of fifteen levels. + // + // For additional information about valid values for parameter names, see [Creating Systems Manager parameters] in the + // Amazon Web Services Systems Manager User Guide. + // + // The reported maximum length of 2048 characters for a parameter name includes + // 1037 characters that are reserved for internal use by Systems Manager. The + // maximum length for a parameter name that you specify is 1011 characters. + // + // This count of 1011 characters includes the characters in the ARN that precede + // the name you specify. This ARN length will vary depending on your partition and + // Region. For example, the following 45 characters count toward the 1011 character + // maximum for a parameter created in the US East (Ohio) Region: + // arn:aws:ssm:us-east-2:111122223333:parameter/ . + // + // [Creating Systems Manager parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html + // + // This member is required. + Name *string + + // The parameter value that you want to add to the system. Standard parameters + // have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB. + // + // Parameters can't be referenced or nested in the values of other parameters. You + // can't include values wrapped in double brackets {{}} or {{ssm:parameter-name}} + // in a parameter value. + // + // This member is required. + Value *string + + // A regular expression used to validate the parameter value. For example, for + // String types with values restricted to numbers, you can specify the following: + // AllowedPattern=^\d+$ + AllowedPattern *string + + // The data type for a String parameter. Supported data types include plain text + // and Amazon Machine Image (AMI) IDs. + // + // The following data type values are supported. + // + // - text + // + // - aws:ec2:image + // + // - aws:ssm:integration + // + // When you create a String parameter and specify aws:ec2:image , Amazon Web + // Services Systems Manager validates the parameter value is in the required + // format, such as ami-12345abcdeEXAMPLE , and that the specified AMI is available + // in your Amazon Web Services account. + // + // If the action is successful, the service sends back an HTTP 200 response which + // indicates a successful PutParameter call for all cases except for data type + // aws:ec2:image . If you call PutParameter with aws:ec2:image data type, a + // successful HTTP 200 response does not guarantee that your parameter was + // successfully created or updated. The aws:ec2:image value is validated + // asynchronously, and the PutParameter call returns before the validation is + // complete. If you submit an invalid AMI value, the PutParameter operation will + // return success, but the asynchronous validation will fail and the parameter will + // not be created or updated. To monitor whether your aws:ec2:image parameters are + // created successfully, see [Setting up notifications or trigger actions based on Parameter Store events]. For more information about AMI format validation , + // see [Native parameter support for Amazon Machine Image IDs]. + // + // [Setting up notifications or trigger actions based on Parameter Store events]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html + // [Native parameter support for Amazon Machine Image IDs]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html + DataType *string + + // Information about the parameter that you want to add to the system. Optional + // but recommended. + // + // Don't enter personally identifiable information in this field. + Description *string + + // The Key Management Service (KMS) ID that you want to use to encrypt a + // parameter. Use a custom key for better security. Required for parameters that + // use the SecureString data type. + // + // If you don't specify a key ID, the system uses the default key associated with + // your Amazon Web Services account, which is not as secure as using a custom key. + // + // - To use a custom KMS key, choose the SecureString data type with the Key ID + // parameter. + KeyId *string + + // Overwrite an existing parameter. The default value is false . + Overwrite *bool + + // One or more policies to apply to a parameter. This operation takes a JSON + // array. Parameter Store, a tool in Amazon Web Services Systems Manager supports + // the following policy types: + // + // Expiration: This policy deletes the parameter after it expires. When you create + // the policy, you specify the expiration date. You can update the expiration date + // and time by updating the policy. Updating the parameter doesn't affect the + // expiration date and time. When the expiration time is reached, Parameter Store + // deletes the parameter. + // + // ExpirationNotification: This policy initiates an event in Amazon CloudWatch + // Events that notifies you about the expiration. By using this policy, you can + // receive notification before or after the expiration time is reached, in units of + // days or hours. + // + // NoChangeNotification: This policy initiates a CloudWatch Events event if a + // parameter hasn't been modified for a specified period of time. This policy type + // is useful when, for example, a secret needs to be changed within a period of + // time, but it hasn't been changed. + // + // All existing policies are preserved until you send new policies or an empty + // policy. For more information about parameter policies, see [Assigning parameter policies]. + // + // [Assigning parameter policies]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html + Policies *string + + // Optional metadata that you assign to a resource. Tags enable you to categorize + // a resource in different ways, such as by purpose, owner, or environment. For + // example, you might want to tag a Systems Manager parameter to identify the type + // of resource to which it applies, the environment, or the type of configuration + // data referenced by the parameter. In this case, you could specify the following + // key-value pairs: + // + // - Key=Resource,Value=S3bucket + // + // - Key=OS,Value=Windows + // + // - Key=ParameterType,Value=LicenseKey + // + // To add tags to an existing Systems Manager parameter, use the AddTagsToResource operation. + Tags []types.Tag + + // The parameter tier to assign to a parameter. + // + // Parameter Store offers a standard tier and an advanced tier for parameters. + // Standard parameters have a content size limit of 4 KB and can't be configured to + // use parameter policies. You can create a maximum of 10,000 standard parameters + // for each Region in an Amazon Web Services account. Standard parameters are + // offered at no additional cost. + // + // Advanced parameters have a content size limit of 8 KB and can be configured to + // use parameter policies. You can create a maximum of 100,000 advanced parameters + // for each Region in an Amazon Web Services account. Advanced parameters incur a + // charge. For more information, see [Managing parameter tiers]in the Amazon Web Services Systems Manager + // User Guide. + // + // You can change a standard parameter to an advanced parameter any time. But you + // can't revert an advanced parameter to a standard parameter. Reverting an + // advanced parameter to a standard parameter would result in data loss because the + // system would truncate the size of the parameter from 8 KB to 4 KB. Reverting + // would also remove any policies attached to the parameter. Lastly, advanced + // parameters use a different form of encryption than standard parameters. + // + // If you no longer need an advanced parameter, or if you no longer want to incur + // charges for an advanced parameter, you must delete it and recreate it as a new + // standard parameter. + // + // Using the Default Tier Configuration + // + // In PutParameter requests, you can specify the tier to create the parameter in. + // Whenever you specify a tier in the request, Parameter Store creates or updates + // the parameter according to that request. However, if you don't specify a tier in + // a request, Parameter Store assigns the tier based on the current Parameter Store + // default tier configuration. + // + // The default tier when you begin using Parameter Store is the standard-parameter + // tier. If you use the advanced-parameter tier, you can specify one of the + // following as the default: + // + // - Advanced: With this option, Parameter Store evaluates all requests as + // advanced parameters. + // + // - Intelligent-Tiering: With this option, Parameter Store evaluates each + // request to determine if the parameter is standard or advanced. + // + // If the request doesn't include any options that require an advanced parameter, + // the parameter is created in the standard-parameter tier. If one or more options + // requiring an advanced parameter are included in the request, Parameter Store + // create a parameter in the advanced-parameter tier. + // + // This approach helps control your parameter-related costs by always creating + // standard parameters unless an advanced parameter is necessary. + // + // Options that require an advanced parameter include the following: + // + // - The content size of the parameter is more than 4 KB. + // + // - The parameter uses a parameter policy. + // + // - More than 10,000 parameters already exist in your Amazon Web Services + // account in the current Amazon Web Services Region. + // + // For more information about configuring the default tier option, see [Specifying a default parameter tier] in the + // Amazon Web Services Systems Manager User Guide. + // + // [Specifying a default parameter tier]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html#ps-default-tier + // [Managing parameter tiers]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html + Tier types.ParameterTier + + // The type of parameter that you want to create. + // + // SecureString isn't currently supported for CloudFormation templates. + // + // Items in a StringList must be separated by a comma (,). You can't use other + // punctuation or special character to escape items in the list. If you have a + // parameter value that requires a comma, then use the String data type. + // + // Specifying a parameter type isn't required when updating a parameter. You must + // specify a parameter type when creating a parameter. + Type types.ParameterType + + noSmithyDocumentSerde +} + +type PutParameterOutput struct { + + // The tier assigned to the parameter. + Tier types.ParameterTier + + // The new version number of a parameter. If you edit a parameter value, Parameter + // Store automatically creates a new version and assigns this new version a unique + // ID. You can reference a parameter version ID in API operations or in Systems + // Manager documents (SSM documents). By default, if you don't specify a specific + // version, the system returns the latest parameter value when a parameter is + // called. + Version int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutParameterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutParameter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutParameter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutParameter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutParameterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutParameter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutParameter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutParameter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..799f29439c4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a Systems Manager resource policy. A resource policy helps +// you to define the IAM entity (for example, an Amazon Web Services account) that +// can manage your Systems Manager resources. The following resources support +// Systems Manager resource policies. +// +// - OpsItemGroup - The resource policy for OpsItemGroup enables Amazon Web +// Services accounts to view and interact with OpsCenter operational work items +// (OpsItems). +// +// - Parameter - The resource policy is used to share a parameter with other +// accounts using Resource Access Manager (RAM). +// +// To share a parameter, it must be in the advanced parameter tier. For +// +// information about parameter tiers, see [Managing parameter tiers]. For information about changing an +// existing standard parameter to an advanced parameter, see [Changing a standard parameter to an advanced parameter]. +// +// To share a SecureString parameter, it must be encrypted with a customer managed +// +// key, and you must share the key separately through Key Management Service. +// Amazon Web Services managed keys cannot be shared. Parameters encrypted with the +// default Amazon Web Services managed key can be updated to use a customer managed +// key instead. For KMS key definitions, see [KMS concepts]in the Key Management Service +// Developer Guide. +// +// While you can share a parameter using the Systems Manager PutResourcePolicy +// +// operation, we recommend using Resource Access Manager (RAM) instead. This is +// because using PutResourcePolicy requires the extra step of promoting the +// parameter to a standard RAM Resource Share using the RAM [PromoteResourceShareCreatedFromPolicy]API operation. +// Otherwise, the parameter won't be returned by the Systems Manager [DescribeParameters]API +// operation using the --shared option. +// +// For more information, see [Sharing a parameter]in the Amazon Web Services Systems Manager User Guide +// +// [Sharing a parameter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html#share +// +// [Managing parameter tiers]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html +// [Changing a standard parameter to an advanced parameter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html#parameter-store-advanced-parameters-enabling +// [PromoteResourceShareCreatedFromPolicy]: https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html +// [KMS concepts]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html +// [DescribeParameters]: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // A policy you want to associate with a resource. + // + // This member is required. + Policy *string + + // Amazon Resource Name (ARN) of the resource to which you want to attach a policy. + // + // This member is required. + ResourceArn *string + + // ID of the current policy version. The hash helps to prevent a situation where + // multiple users attempt to overwrite a policy. You must provide this hash when + // updating or deleting a policy. + PolicyHash *string + + // The policy ID. + PolicyId *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // ID of the current policy version. + PolicyHash *string + + // The policy ID. To update a policy, you must specify PolicyId and PolicyHash . + PolicyId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go new file mode 100644 index 00000000000..14e2d639ab9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Defines the default patch baseline for the relevant operating system. +// +// To reset the Amazon Web Services-predefined patch baseline as the default, +// specify the full patch baseline Amazon Resource Name (ARN) as the baseline ID +// value. For example, for CentOS, specify +// arn:aws:ssm:us-east-2:733109147000:patchbaseline/pb-0574b43a65ea646ed instead of +// pb-0574b43a65ea646ed . +func (c *Client) RegisterDefaultPatchBaseline(ctx context.Context, params *RegisterDefaultPatchBaselineInput, optFns ...func(*Options)) (*RegisterDefaultPatchBaselineOutput, error) { + if params == nil { + params = &RegisterDefaultPatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RegisterDefaultPatchBaseline", params, optFns, c.addOperationRegisterDefaultPatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RegisterDefaultPatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RegisterDefaultPatchBaselineInput struct { + + // The ID of the patch baseline that should be the default patch baseline. + // + // This member is required. + BaselineId *string + + noSmithyDocumentSerde +} + +type RegisterDefaultPatchBaselineOutput struct { + + // The ID of the default patch baseline. + BaselineId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRegisterDefaultPatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterDefaultPatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterDefaultPatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpRegisterDefaultPatchBaselineValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterDefaultPatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRegisterDefaultPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RegisterDefaultPatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go new file mode 100644 index 00000000000..2c88db9ea9d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Registers a patch baseline for a patch group. +func (c *Client) RegisterPatchBaselineForPatchGroup(ctx context.Context, params *RegisterPatchBaselineForPatchGroupInput, optFns ...func(*Options)) (*RegisterPatchBaselineForPatchGroupOutput, error) { + if params == nil { + params = &RegisterPatchBaselineForPatchGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RegisterPatchBaselineForPatchGroup", params, optFns, c.addOperationRegisterPatchBaselineForPatchGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RegisterPatchBaselineForPatchGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RegisterPatchBaselineForPatchGroupInput struct { + + // The ID of the patch baseline to register with the patch group. + // + // This member is required. + BaselineId *string + + // The name of the patch group to be registered with the patch baseline. + // + // This member is required. + PatchGroup *string + + noSmithyDocumentSerde +} + +type RegisterPatchBaselineForPatchGroupOutput struct { + + // The ID of the patch baseline the patch group was registered with. + BaselineId *string + + // The name of the patch group registered with the patch baseline. + PatchGroup *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRegisterPatchBaselineForPatchGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterPatchBaselineForPatchGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpRegisterPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterPatchBaselineForPatchGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRegisterPatchBaselineForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RegisterPatchBaselineForPatchGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go new file mode 100644 index 00000000000..4c64ca034fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go @@ -0,0 +1,255 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Registers a target with a maintenance window. +func (c *Client) RegisterTargetWithMaintenanceWindow(ctx context.Context, params *RegisterTargetWithMaintenanceWindowInput, optFns ...func(*Options)) (*RegisterTargetWithMaintenanceWindowOutput, error) { + if params == nil { + params = &RegisterTargetWithMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RegisterTargetWithMaintenanceWindow", params, optFns, c.addOperationRegisterTargetWithMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RegisterTargetWithMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RegisterTargetWithMaintenanceWindowInput struct { + + // The type of target being registered with the maintenance window. + // + // This member is required. + ResourceType types.MaintenanceWindowResourceType + + // The targets to register with the maintenance window. In other words, the + // managed nodes to run commands on when the maintenance window runs. + // + // If a single maintenance window task is registered with multiple targets, its + // task invocations occur sequentially and not in parallel. If your task must run + // on multiple targets at the same time, register a task for each target + // individually and assign each task the same priority level. + // + // You can specify targets using managed node IDs, resource group names, or tags + // that have been applied to managed nodes. + // + // Example 1: Specify managed node IDs + // + // Key=InstanceIds,Values=,, + // + // Example 2: Use tag key-pairs applied to managed nodes + // + // Key=tag:,Values=, + // + // Example 3: Use tag-keys applied to managed nodes + // + // Key=tag-key,Values=, + // + // Example 4: Use resource group names + // + // Key=resource-groups:Name,Values= + // + // Example 5: Use filters for resource group types + // + // Key=resource-groups:ResourceTypeFilters,Values=, + // + // For Key=resource-groups:ResourceTypeFilters , specify resource types in the + // following format + // + // Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC + // + // For more information about these examples formats, including the best use case + // for each one, see [Examples: Register targets with a maintenance window]in the Amazon Web Services Systems Manager User Guide. + // + // [Examples: Register targets with a maintenance window]: https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html + // + // This member is required. + Targets []types.Target + + // The ID of the maintenance window the target should be registered with. + // + // This member is required. + WindowId *string + + // User-provided idempotency token. + ClientToken *string + + // An optional description for the target. + Description *string + + // An optional name for the target. + Name *string + + // User-provided value that will be included in any Amazon CloudWatch Events + // events raised while running tasks for these targets in this maintenance window. + OwnerInformation *string + + noSmithyDocumentSerde +} + +type RegisterTargetWithMaintenanceWindowOutput struct { + + // The ID of the target definition in this maintenance window. + WindowTargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRegisterTargetWithMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterTargetWithMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opRegisterTargetWithMaintenanceWindowMiddleware(stack, options); err != nil { + return err + } + if err = addOpRegisterTargetWithMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterTargetWithMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpRegisterTargetWithMaintenanceWindow struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRegisterTargetWithMaintenanceWindow) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRegisterTargetWithMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*RegisterTargetWithMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RegisterTargetWithMaintenanceWindowInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opRegisterTargetWithMaintenanceWindowMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRegisterTargetWithMaintenanceWindow{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opRegisterTargetWithMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RegisterTargetWithMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go new file mode 100644 index 00000000000..8bfc8852736 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -0,0 +1,322 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a new task to a maintenance window. +func (c *Client) RegisterTaskWithMaintenanceWindow(ctx context.Context, params *RegisterTaskWithMaintenanceWindowInput, optFns ...func(*Options)) (*RegisterTaskWithMaintenanceWindowOutput, error) { + if params == nil { + params = &RegisterTaskWithMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RegisterTaskWithMaintenanceWindow", params, optFns, c.addOperationRegisterTaskWithMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RegisterTaskWithMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RegisterTaskWithMaintenanceWindowInput struct { + + // The ARN of the task to run. + // + // This member is required. + TaskArn *string + + // The type of task being registered. + // + // This member is required. + TaskType types.MaintenanceWindowTaskType + + // The ID of the maintenance window the task should be added to. + // + // This member is required. + WindowId *string + + // The CloudWatch alarm you want to apply to your maintenance window task. + AlarmConfiguration *types.AlarmConfiguration + + // User-provided idempotency token. + ClientToken *string + + // Indicates whether tasks should continue to run after the cutoff time specified + // in the maintenance windows is reached. + // + // - CONTINUE_TASK : When the cutoff time is reached, any tasks that are running + // continue. The default value. + // + // - CANCEL_TASK : + // + // - For Automation, Lambda, Step Functions tasks: When the cutoff time is + // reached, any task invocations that are already running continue, but no new task + // invocations are started. + // + // - For Run Command tasks: When the cutoff time is reached, the system sends a CancelCommand + // operation that attempts to cancel the command associated with the task. However, + // there is no guarantee that the command will be terminated and the underlying + // process stopped. + // + // The status for tasks that are not completed is TIMED_OUT . + CutoffBehavior types.MaintenanceWindowTaskCutoffBehavior + + // An optional description for the task. + Description *string + + // A structure containing information about an Amazon Simple Storage Service + // (Amazon S3) bucket to write managed node-level logs to. + // + // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service + // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and + // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For + // information about how Amazon Web Services Systems Manager handles these options + // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + LoggingInfo *types.LoggingInfo + + // The maximum number of targets this task can be run for, in parallel. + // + // Although this element is listed as "Required: No", a value can be omitted only + // when you are registering or updating a [targetless task]You must provide a value in all other + // cases. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 . + // This value doesn't affect the running of your task. + // + // [targetless task]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + MaxConcurrency *string + + // The maximum number of errors allowed before this task stops being scheduled. + // + // Although this element is listed as "Required: No", a value can be omitted only + // when you are registering or updating a [targetless task]You must provide a value in all other + // cases. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 . + // This value doesn't affect the running of your task. + // + // [targetless task]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + MaxErrors *string + + // An optional name for the task. + Name *string + + // The priority of the task in the maintenance window, the lower the number the + // higher the priority. Tasks in a maintenance window are scheduled in priority + // order with tasks that have the same priority scheduled in parallel. + Priority *int32 + + // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services + // Systems Manager to assume when running a maintenance window task. If you do not + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the + // Amazon Web Services Systems Manager User Guide. + // + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + ServiceRoleArn *string + + // The targets (either managed nodes or maintenance window targets). + // + // One or more targets must be specified for maintenance window Run Command-type + // tasks. Depending on the task, targets are optional for other maintenance window + // task types (Automation, Lambda, and Step Functions). For more information about + // running tasks that don't specify targets, see [Registering maintenance window tasks without targets]in the Amazon Web Services + // Systems Manager User Guide. + // + // Specify managed nodes using the following format: + // + // Key=InstanceIds,Values=, + // + // Specify maintenance window targets using the following format: + // + // Key=WindowTargetIds,Values=, + // + // [Registering maintenance window tasks without targets]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + Targets []types.Target + + // The parameters that the task should use during execution. Populate only the + // fields that match the task type. All other fields should be empty. + TaskInvocationParameters *types.MaintenanceWindowTaskInvocationParameters + + // The parameters that should be passed to the task when it is run. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + TaskParameters map[string]types.MaintenanceWindowTaskParameterValueExpression + + noSmithyDocumentSerde +} + +type RegisterTaskWithMaintenanceWindowOutput struct { + + // The ID of the task in the maintenance window. + WindowTaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRegisterTaskWithMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterTaskWithMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opRegisterTaskWithMaintenanceWindowMiddleware(stack, options); err != nil { + return err + } + if err = addOpRegisterTaskWithMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterTaskWithMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpRegisterTaskWithMaintenanceWindow struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRegisterTaskWithMaintenanceWindow) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRegisterTaskWithMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*RegisterTaskWithMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RegisterTaskWithMaintenanceWindowInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opRegisterTaskWithMaintenanceWindowMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRegisterTaskWithMaintenanceWindow{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opRegisterTaskWithMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RegisterTaskWithMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go new file mode 100644 index 00000000000..aaa518bd82f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go @@ -0,0 +1,188 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes tag keys from the specified resource. +func (c *Client) RemoveTagsFromResource(ctx context.Context, params *RemoveTagsFromResourceInput, optFns ...func(*Options)) (*RemoveTagsFromResourceOutput, error) { + if params == nil { + params = &RemoveTagsFromResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveTagsFromResource", params, optFns, c.addOperationRemoveTagsFromResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveTagsFromResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveTagsFromResourceInput struct { + + // The ID of the resource from which you want to remove tags. For example: + // + // ManagedInstance: mi-012345abcde + // + // MaintenanceWindow: mw-012345abcde + // + // Automation : example-c160-4567-8519-012345abcde + // + // PatchBaseline: pb-012345abcde + // + // OpsMetadata object: ResourceID for tagging is created from the Amazon Resource + // Name (ARN) for the object. Specifically, ResourceID is created from the strings + // that come after the word opsmetadata in the ARN. For example, an OpsMetadata + // object with an ARN of + // arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager has a + // ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager . + // + // For the Document and Parameter values, use the name of the resource. + // + // The ManagedInstance type for this API operation is only for on-premises managed + // nodes. Specify the name of the managed node in the following format: + // mi-ID_number. For example, mi-1a2b3c4d5e6f. + // + // This member is required. + ResourceId *string + + // The type of resource from which you want to remove a tag. + // + // The ManagedInstance type for this API operation is only for on-premises managed + // nodes. Specify the name of the managed node in the following format: + // mi-ID_number . For example, mi-1a2b3c4d5e6f . + // + // This member is required. + ResourceType types.ResourceTypeForTagging + + // Tag keys that you want to remove from the specified resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type RemoveTagsFromResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveTagsFromResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveTagsFromResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveTagsFromResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveTagsFromResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveTagsFromResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemoveTagsFromResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go new file mode 100644 index 00000000000..2392f70a56b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go @@ -0,0 +1,196 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// ServiceSetting is an account-level setting for an Amazon Web Services service. +// This setting defines how a user interacts with or uses a service or a feature of +// a service. For example, if an Amazon Web Services service charges money to the +// account based on feature or service usage, then the Amazon Web Services service +// team might create a default setting of "false". This means the user can't use +// this feature unless they change the setting to "true" and intentionally opt in +// for a paid feature. +// +// Services map a SettingId object to a setting value. Amazon Web Services +// services teams define the default value for a SettingId . You can't create a new +// SettingId , but you can overwrite the default value if you have the +// ssm:UpdateServiceSetting permission for the setting. Use the GetServiceSetting API operation to +// view the current value. Use the UpdateServiceSettingAPI operation to change the default setting. +// +// Reset the service setting for the account to the default value as provisioned +// by the Amazon Web Services service team. +func (c *Client) ResetServiceSetting(ctx context.Context, params *ResetServiceSettingInput, optFns ...func(*Options)) (*ResetServiceSettingOutput, error) { + if params == nil { + params = &ResetServiceSettingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ResetServiceSetting", params, optFns, c.addOperationResetServiceSettingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ResetServiceSettingOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request body of the ResetServiceSetting API operation. +type ResetServiceSettingInput struct { + + // The Amazon Resource Name (ARN) of the service setting to reset. The setting ID + // can be one of the following. + // + // - /ssm/appmanager/appmanager-enabled + // + // - /ssm/automation/customer-script-log-destination + // + // - /ssm/automation/customer-script-log-group-name + // + // - /ssm/automation/enable-adaptive-concurrency + // + // - /ssm/documents/console/public-sharing-permission + // + // - /ssm/managed-instance/activation-tier + // + // - /ssm/managed-instance/default-ec2-instance-management-role + // + // - /ssm/opsinsights/opscenter + // + // - /ssm/parameter-store/default-parameter-tier + // + // - /ssm/parameter-store/high-throughput-enabled + // + // This member is required. + SettingId *string + + noSmithyDocumentSerde +} + +// The result body of the ResetServiceSetting API operation. +type ResetServiceSettingOutput struct { + + // The current, effective service setting after calling the ResetServiceSetting + // API operation. + ServiceSetting *types.ServiceSetting + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationResetServiceSettingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpResetServiceSetting{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpResetServiceSetting{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ResetServiceSetting"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpResetServiceSettingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetServiceSetting(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opResetServiceSetting(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ResetServiceSetting", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go new file mode 100644 index 00000000000..f81c72aafc8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Reconnects a session to a managed node after it has been disconnected. +// Connections can be resumed for disconnected sessions, but not terminated +// sessions. +// +// This command is primarily for use by client machines to automatically reconnect +// during intermittent network issues. It isn't intended for any other use. +func (c *Client) ResumeSession(ctx context.Context, params *ResumeSessionInput, optFns ...func(*Options)) (*ResumeSessionOutput, error) { + if params == nil { + params = &ResumeSessionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ResumeSession", params, optFns, c.addOperationResumeSessionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ResumeSessionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ResumeSessionInput struct { + + // The ID of the disconnected session to resume. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type ResumeSessionOutput struct { + + // The ID of the session. + SessionId *string + + // A URL back to SSM Agent on the managed node that the Session Manager client + // uses to send commands and receive output from the managed node. Format: + // wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) + // . + // + // region represents the Region identifier for an Amazon Web Services Region + // supported by Amazon Web Services Systems Manager, such as us-east-2 for the US + // East (Ohio) Region. For a list of supported region values, see the Region column + // in [Systems Manager service endpoints]in the Amazon Web Services General Reference. + // + // session-id represents the ID of a Session Manager session, such as + // 1a2b3c4dEXAMPLE . + // + // [Systems Manager service endpoints]: https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region + StreamUrl *string + + // An encrypted token value containing session and caller information. Used to + // authenticate the connection to the managed node. + TokenValue *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationResumeSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpResumeSession{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpResumeSession{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ResumeSession"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpResumeSessionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResumeSession(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opResumeSession(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ResumeSession", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go new file mode 100644 index 00000000000..999f45cfed1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sends a signal to an Automation execution to change the current behavior or +// status of the execution. +func (c *Client) SendAutomationSignal(ctx context.Context, params *SendAutomationSignalInput, optFns ...func(*Options)) (*SendAutomationSignalOutput, error) { + if params == nil { + params = &SendAutomationSignalInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendAutomationSignal", params, optFns, c.addOperationSendAutomationSignalMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendAutomationSignalOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendAutomationSignalInput struct { + + // The unique identifier for an existing Automation execution that you want to + // send the signal to. + // + // This member is required. + AutomationExecutionId *string + + // The type of signal to send to an Automation execution. + // + // This member is required. + SignalType types.SignalType + + // The data sent with the signal. The data schema depends on the type of signal + // used in the request. + // + // For Approve and Reject signal types, the payload is an optional comment that + // you can send with the signal type. For example: + // + // Comment="Looks good" + // + // For StartStep and Resume signal types, you must send the name of the Automation + // step to start or resume as the payload. For example: + // + // StepName="step1" + // + // For the StopStep signal type, you must send the step execution ID as the + // payload. For example: + // + // StepExecutionId="97fff367-fc5a-4299-aed8-0123456789ab" + Payload map[string][]string + + noSmithyDocumentSerde +} + +type SendAutomationSignalOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendAutomationSignalMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSendAutomationSignal{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSendAutomationSignal{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SendAutomationSignal"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpSendAutomationSignalValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendAutomationSignal(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSendAutomationSignal(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SendAutomationSignal", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go new file mode 100644 index 00000000000..9e74e8244c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go @@ -0,0 +1,283 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Runs commands on one or more managed nodes. +func (c *Client) SendCommand(ctx context.Context, params *SendCommandInput, optFns ...func(*Options)) (*SendCommandOutput, error) { + if params == nil { + params = &SendCommandInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendCommand", params, optFns, c.addOperationSendCommandMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendCommandOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendCommandInput struct { + + // The name of the Amazon Web Services Systems Manager document (SSM document) to + // run. This can be a public document or a custom document. To run a shared + // document belonging to another account, specify the document Amazon Resource Name + // (ARN). For more information about how to use shared documents, see [Sharing SSM documents]in the + // Amazon Web Services Systems Manager User Guide. + // + // If you specify a document name or ARN that hasn't been shared with your + // account, you receive an InvalidDocument error. + // + // [Sharing SSM documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html + // + // This member is required. + DocumentName *string + + // The CloudWatch alarm you want to apply to your command. + AlarmConfiguration *types.AlarmConfiguration + + // Enables Amazon Web Services Systems Manager to send Run Command output to + // Amazon CloudWatch Logs. Run Command is a tool in Amazon Web Services Systems + // Manager. + CloudWatchOutputConfig *types.CloudWatchOutputConfig + + // User-specified information about the command, such as a brief description of + // what the command should do. + Comment *string + + // The Sha256 or Sha1 hash created by the system when the document was created. + // + // Sha1 hashes have been deprecated. + DocumentHash *string + + // Sha256 or Sha1. + // + // Sha1 hashes have been deprecated. + DocumentHashType types.DocumentHashType + + // The SSM document version to use in the request. You can specify $DEFAULT, + // $LATEST, or a specific version number. If you run commands by using the Command + // Line Interface (Amazon Web Services CLI), then you must escape the first two + // options by using a backslash. If you specify a version number, then you don't + // need to use the backslash. For example: + // + // --document-version "\$DEFAULT" + // + // --document-version "\$LATEST" + // + // --document-version "3" + DocumentVersion *string + + // The IDs of the managed nodes where the command should run. Specifying managed + // node IDs is most useful when you are targeting a limited number of managed + // nodes, though you can specify up to 50 IDs. + // + // To target a larger number of managed nodes, or if you prefer not to list + // individual node IDs, we recommend using the Targets option instead. Using + // Targets , which accepts tag key-value pairs to identify the managed nodes to + // send commands to, you can a send command to tens, hundreds, or thousands of + // nodes at once. + // + // For more information about how to use targets, see [Run commands at scale] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Run commands at scale]: https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html + InstanceIds []string + + // (Optional) The maximum number of managed nodes that are allowed to run the + // command at the same time. You can specify a number such as 10 or a percentage + // such as 10%. The default value is 50 . For more information about how to use + // MaxConcurrency , see [Using concurrency controls] in the Amazon Web Services Systems Manager User Guide. + // + // [Using concurrency controls]: https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity + MaxConcurrency *string + + // The maximum number of errors allowed without the command failing. When the + // command fails one more time beyond the value of MaxErrors , the systems stops + // sending the command to additional targets. You can specify a number like 10 or a + // percentage like 10%. The default value is 0 . For more information about how to + // use MaxErrors , see [Using error controls] in the Amazon Web Services Systems Manager User Guide. + // + // [Using error controls]: https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors + MaxErrors *string + + // Configurations for sending notifications. + NotificationConfig *types.NotificationConfig + + // The name of the S3 bucket where command execution responses should be stored. + OutputS3BucketName *string + + // The directory structure within the S3 bucket where the responses should be + // stored. + OutputS3KeyPrefix *string + + // (Deprecated) You can no longer specify this parameter. The system ignores it. + // Instead, Systems Manager automatically determines the Amazon Web Services Region + // of the S3 bucket. + OutputS3Region *string + + // The required and optional parameters specified in the document being run. + Parameters map[string][]string + + // The ARN of the Identity and Access Management (IAM) service role to use to + // publish Amazon Simple Notification Service (Amazon SNS) notifications for Run + // Command commands. + // + // This role must provide the sns:Publish permission for your notification topic. + // For information about creating and using this service role, see [Monitoring Systems Manager status changes using Amazon SNS notifications]in the Amazon + // Web Services Systems Manager User Guide. + // + // [Monitoring Systems Manager status changes using Amazon SNS notifications]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html + ServiceRoleArn *string + + // An array of search criteria that targets managed nodes using a Key,Value + // combination that you specify. Specifying targets is most useful when you want to + // send a command to a large number of managed nodes at once. Using Targets , which + // accepts tag key-value pairs to identify managed nodes, you can send a command to + // tens, hundreds, or thousands of nodes at once. + // + // To send a command to a smaller number of managed nodes, you can use the + // InstanceIds option instead. + // + // For more information about how to use targets, see [Run commands at scale] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Run commands at scale]: https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html + Targets []types.Target + + // If this time is reached and the command hasn't already started running, it + // won't run. + TimeoutSeconds *int32 + + noSmithyDocumentSerde +} + +type SendCommandOutput struct { + + // The request as it was received by Systems Manager. Also provides the command ID + // which can be used future references to this request. + Command *types.Command + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSendCommand{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSendCommand{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SendCommand"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpSendCommandValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendCommand(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSendCommand(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SendCommand", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAccessRequest.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAccessRequest.go new file mode 100644 index 00000000000..6e0123a2bec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAccessRequest.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts the workflow for just-in-time node access sessions. +func (c *Client) StartAccessRequest(ctx context.Context, params *StartAccessRequestInput, optFns ...func(*Options)) (*StartAccessRequestOutput, error) { + if params == nil { + params = &StartAccessRequestInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartAccessRequest", params, optFns, c.addOperationStartAccessRequestMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartAccessRequestOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartAccessRequestInput struct { + + // A brief description explaining why you are requesting access to the node. + // + // This member is required. + Reason *string + + // The node you are requesting access to. + // + // This member is required. + Targets []types.Target + + // Key-value pairs of metadata you want to assign to the access request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type StartAccessRequestOutput struct { + + // The ID of the access request. + AccessRequestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartAccessRequestMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartAccessRequest{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartAccessRequest{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartAccessRequest"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartAccessRequestValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartAccessRequest(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartAccessRequest(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartAccessRequest", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go new file mode 100644 index 00000000000..7f14f650ca6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Runs an association immediately and only one time. This operation can be +// helpful when troubleshooting associations. +func (c *Client) StartAssociationsOnce(ctx context.Context, params *StartAssociationsOnceInput, optFns ...func(*Options)) (*StartAssociationsOnceOutput, error) { + if params == nil { + params = &StartAssociationsOnceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartAssociationsOnce", params, optFns, c.addOperationStartAssociationsOnceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartAssociationsOnceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartAssociationsOnceInput struct { + + // The association IDs that you want to run immediately and only one time. + // + // This member is required. + AssociationIds []string + + noSmithyDocumentSerde +} + +type StartAssociationsOnceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartAssociationsOnceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartAssociationsOnce{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartAssociationsOnce{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartAssociationsOnce"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartAssociationsOnceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartAssociationsOnce(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartAssociationsOnce(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartAssociationsOnce", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go new file mode 100644 index 00000000000..142fdf58d4a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go @@ -0,0 +1,252 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Initiates execution of an Automation runbook. +func (c *Client) StartAutomationExecution(ctx context.Context, params *StartAutomationExecutionInput, optFns ...func(*Options)) (*StartAutomationExecutionOutput, error) { + if params == nil { + params = &StartAutomationExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartAutomationExecution", params, optFns, c.addOperationStartAutomationExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartAutomationExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartAutomationExecutionInput struct { + + // The name of the SSM document to run. This can be a public document or a custom + // document. To run a shared document belonging to another account, specify the + // document ARN. For more information about how to use shared documents, see [Sharing SSM documents]in + // the Amazon Web Services Systems Manager User Guide. + // + // [Sharing SSM documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-ssm-sharing.html + // + // This member is required. + DocumentName *string + + // The CloudWatch alarm you want to apply to your automation. + AlarmConfiguration *types.AlarmConfiguration + + // User-provided idempotency token. The token must be unique, is case insensitive, + // enforces the UUID format, and can't be reused. + ClientToken *string + + // The version of the Automation runbook to use for this execution. + DocumentVersion *string + + // The maximum number of targets allowed to run this task in parallel. You can + // specify a number, such as 10, or a percentage, such as 10%. The default value is + // 10 . + // + // If both this parameter and the TargetLocation:TargetsMaxConcurrency are + // supplied, TargetLocation:TargetsMaxConcurrency takes precedence. + MaxConcurrency *string + + // The number of errors that are allowed before the system stops running the + // automation on additional targets. You can specify either an absolute number of + // errors, for example 10, or a percentage of the target set, for example 10%. If + // you specify 3, for example, the system stops running the automation when the + // fourth error is received. If you specify 0, then the system stops running the + // automation on additional targets after the first error result is returned. If + // you run an automation on 50 resources and set max-errors to 10%, then the system + // stops running the automation on additional targets when the sixth error is + // received. + // + // Executions that are already running an automation when max-errors is reached + // are allowed to complete, but some of these executions may fail as well. If you + // need to ensure that there won't be more than max-errors failed executions, set + // max-concurrency to 1 so the executions proceed one at a time. + // + // If this parameter and the TargetLocation:TargetsMaxErrors parameter are both + // supplied, TargetLocation:TargetsMaxErrors takes precedence. + MaxErrors *string + + // The execution mode of the automation. Valid modes include the following: Auto + // and Interactive. The default mode is Auto. + Mode types.ExecutionMode + + // A key-value map of execution parameters, which match the declared parameters in + // the Automation runbook. + Parameters map[string][]string + + // Optional metadata that you assign to a resource. You can specify a maximum of + // five tags for an automation. Tags enable you to categorize a resource in + // different ways, such as by purpose, owner, or environment. For example, you + // might want to tag an automation to identify an environment or operating system. + // In this case, you could specify the following key-value pairs: + // + // - Key=environment,Value=test + // + // - Key=OS,Value=Windows + // + // The Array Members maximum value is reported as 1000. This number includes + // capacity reserved for internal operations. When calling the + // StartAutomationExecution action, you can specify a maximum of 5 tags. You can, + // however, use the AddTagsToResourceaction to add up to a total of 50 tags to an existing + // automation configuration. + Tags []types.Tag + + // A location is a combination of Amazon Web Services Regions and/or Amazon Web + // Services accounts where you want to run the automation. Use this operation to + // start an automation in multiple Amazon Web Services Regions and multiple Amazon + // Web Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services + // Systems Manager User Guide. + // + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + TargetLocations []types.TargetLocation + + // Specify a publicly accessible URL for a file that contains the TargetLocations + // body. Currently, only files in presigned Amazon S3 buckets are supported. + TargetLocationsURL *string + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The name of the parameter used as the target resource for the rate-controlled + // execution. Required if you specify targets. + TargetParameterName *string + + // A key-value mapping to target resources. Required if you specify + // TargetParameterName. + // + // If both this parameter and the TargetLocation:Targets parameter are supplied, + // TargetLocation:Targets takes precedence. + Targets []types.Target + + noSmithyDocumentSerde +} + +type StartAutomationExecutionOutput struct { + + // The unique ID of a newly scheduled automation execution. + AutomationExecutionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartAutomationExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartAutomationExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartAutomationExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartAutomationExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartAutomationExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartAutomationExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartAutomationExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartAutomationExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go new file mode 100644 index 00000000000..fbc0eed2c3f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go @@ -0,0 +1,238 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Amazon Web Services Systems Manager Change Manager is no longer open to new +// customers. Existing customers can continue to use the service as normal. For +// more information, see [Amazon Web Services Systems Manager Change Manager availability change]. +// +// Creates a change request for Change Manager. The Automation runbooks specified +// in the change request run only after all required approvals for the change +// request have been received. +// +// [Amazon Web Services Systems Manager Change Manager availability change]: https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html +func (c *Client) StartChangeRequestExecution(ctx context.Context, params *StartChangeRequestExecutionInput, optFns ...func(*Options)) (*StartChangeRequestExecutionOutput, error) { + if params == nil { + params = &StartChangeRequestExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartChangeRequestExecution", params, optFns, c.addOperationStartChangeRequestExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartChangeRequestExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartChangeRequestExecutionInput struct { + + // The name of the change template document to run during the runbook workflow. + // + // This member is required. + DocumentName *string + + // Information about the Automation runbooks that are run during the runbook + // workflow. + // + // The Automation runbooks specified for the runbook workflow can't run until all + // required approvals for the change request have been received. + // + // This member is required. + Runbooks []types.Runbook + + // Indicates whether the change request can be approved automatically without the + // need for manual approvals. + // + // If AutoApprovable is enabled in a change template, then setting AutoApprove to + // true in StartChangeRequestExecution creates a change request that bypasses + // approver review. + // + // Change Calendar restrictions are not bypassed in this scenario. If the state of + // an associated calendar is CLOSED , change freeze approvers must still grant + // permission for this change request to run. If they don't, the change won't be + // processed until the calendar state is again OPEN . + AutoApprove bool + + // User-provided details about the change. If no details are provided, content + // specified in the Template information section of the associated change template + // is added. + ChangeDetails *string + + // The name of the change request associated with the runbook workflow to be run. + ChangeRequestName *string + + // The user-provided idempotency token. The token must be unique, is case + // insensitive, enforces the UUID format, and can't be reused. + ClientToken *string + + // The version of the change template document to run during the runbook workflow. + DocumentVersion *string + + // A key-value map of parameters that match the declared parameters in the change + // template document. + Parameters map[string][]string + + // The time that the requester expects the runbook workflow related to the change + // request to complete. The time is an estimate only that the requester provides + // for reviewers. + ScheduledEndTime *time.Time + + // The date and time specified in the change request to run the Automation + // runbooks. + // + // The Automation runbooks specified for the runbook workflow can't run until all + // required approvals for the change request have been received. + ScheduledTime *time.Time + + // Optional metadata that you assign to a resource. You can specify a maximum of + // five tags for a change request. Tags enable you to categorize a resource in + // different ways, such as by purpose, owner, or environment. For example, you + // might want to tag a change request to identify an environment or target Amazon + // Web Services Region. In this case, you could specify the following key-value + // pairs: + // + // - Key=Environment,Value=Production + // + // - Key=Region,Value=us-east-2 + // + // The Array Members maximum value is reported as 1000. This number includes + // capacity reserved for internal operations. When calling the + // StartChangeRequestExecution action, you can specify a maximum of 5 tags. You + // can, however, use the AddTagsToResourceaction to add up to a total of 50 tags to an existing + // change request configuration. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type StartChangeRequestExecutionOutput struct { + + // The unique ID of a runbook workflow operation. (A runbook workflow is a type of + // Automation operation.) + AutomationExecutionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartChangeRequestExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartChangeRequestExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartChangeRequestExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartChangeRequestExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartChangeRequestExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartChangeRequestExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartChangeRequestExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartChangeRequestExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go new file mode 100644 index 00000000000..da72ff44fe9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Initiates the process of creating a preview showing the effects that running a +// specified Automation runbook would have on the targeted resources. +func (c *Client) StartExecutionPreview(ctx context.Context, params *StartExecutionPreviewInput, optFns ...func(*Options)) (*StartExecutionPreviewOutput, error) { + if params == nil { + params = &StartExecutionPreviewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartExecutionPreview", params, optFns, c.addOperationStartExecutionPreviewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartExecutionPreviewOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartExecutionPreviewInput struct { + + // The name of the Automation runbook to run. The result of the execution preview + // indicates what the impact would be of running this runbook. + // + // This member is required. + DocumentName *string + + // The version of the Automation runbook to run. The default value is $DEFAULT . + DocumentVersion *string + + // Information about the inputs that can be specified for the preview operation. + ExecutionInputs types.ExecutionInputs + + noSmithyDocumentSerde +} + +type StartExecutionPreviewOutput struct { + + // The ID of the execution preview generated by the system. + ExecutionPreviewId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartExecutionPreviewMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartExecutionPreview{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartExecutionPreview{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartExecutionPreview"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartExecutionPreviewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartExecutionPreview(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartExecutionPreview(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartExecutionPreview", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go new file mode 100644 index 00000000000..a839f1b0325 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Initiates a connection to a target (for example, a managed node) for a Session +// Manager session. Returns a URL and token that can be used to open a WebSocket +// connection for sending input and receiving outputs. +// +// Amazon Web Services CLI usage: start-session is an interactive command that +// requires the Session Manager plugin to be installed on the client machine making +// the call. For information, see [Install the Session Manager plugin for the Amazon Web Services CLI]in the Amazon Web Services Systems Manager User +// Guide. +// +// Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't +// currently supported by Amazon Web Services Tools for PowerShell on Windows local +// machines. +// +// [Install the Session Manager plugin for the Amazon Web Services CLI]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html +func (c *Client) StartSession(ctx context.Context, params *StartSessionInput, optFns ...func(*Options)) (*StartSessionOutput, error) { + if params == nil { + params = &StartSessionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartSession", params, optFns, c.addOperationStartSessionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartSessionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartSessionInput struct { + + // The managed node to connect to for the session. + // + // This member is required. + Target *string + + // The name of the SSM document you want to use to define the type of session, + // input parameters, or preferences for the session. For example, + // SSM-SessionManagerRunShell . You can call the GetDocument API to verify the document + // exists before attempting to start a session. If no document name is provided, a + // shell to the managed node is launched by default. For more information, see [Start a session]in + // the Amazon Web Services Systems Manager User Guide. + // + // [Start a session]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html + DocumentName *string + + // The values you want to specify for the parameters defined in the Session + // document. For more information about these parameters, see [Create a Session Manager preferences document]in the Amazon Web + // Services Systems Manager User Guide. + // + // [Create a Session Manager preferences document]: https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-create-preferences-cli.html + Parameters map[string][]string + + // The reason for connecting to the instance. This value is included in the + // details for the Amazon CloudWatch Events event created when you start the + // session. + Reason *string + + noSmithyDocumentSerde +} + +type StartSessionOutput struct { + + // The ID of the session. + SessionId *string + + // A URL back to SSM Agent on the managed node that the Session Manager client + // uses to send commands and receive output from the node. Format: + // wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) + // + // region represents the Region identifier for an Amazon Web Services Region + // supported by Amazon Web Services Systems Manager, such as us-east-2 for the US + // East (Ohio) Region. For a list of supported region values, see the Region column + // in [Systems Manager service endpoints]in the Amazon Web Services General Reference. + // + // session-id represents the ID of a Session Manager session, such as + // 1a2b3c4dEXAMPLE . + // + // [Systems Manager service endpoints]: https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region + StreamUrl *string + + // An encrypted token value containing session and caller information. This token + // is used to authenticate the connection to the managed node, and is valid only + // long enough to ensure the connection is successful. Never share your session's + // token. + TokenValue *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartSession{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartSession{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartSession"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartSessionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartSession(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartSession(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartSession", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go new file mode 100644 index 00000000000..715cca268e8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stop an Automation that is currently running. +func (c *Client) StopAutomationExecution(ctx context.Context, params *StopAutomationExecutionInput, optFns ...func(*Options)) (*StopAutomationExecutionOutput, error) { + if params == nil { + params = &StopAutomationExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopAutomationExecution", params, optFns, c.addOperationStopAutomationExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopAutomationExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopAutomationExecutionInput struct { + + // The execution ID of the Automation to stop. + // + // This member is required. + AutomationExecutionId *string + + // The stop request type. Valid types include the following: Cancel and Complete. + // The default type is Cancel. + Type types.StopType + + noSmithyDocumentSerde +} + +type StopAutomationExecutionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopAutomationExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopAutomationExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopAutomationExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopAutomationExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStopAutomationExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopAutomationExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopAutomationExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopAutomationExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go new file mode 100644 index 00000000000..f1523859142 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Permanently ends a session and closes the data connection between the Session +// Manager client and SSM Agent on the managed node. A terminated session can't be +// resumed. +func (c *Client) TerminateSession(ctx context.Context, params *TerminateSessionInput, optFns ...func(*Options)) (*TerminateSessionOutput, error) { + if params == nil { + params = &TerminateSessionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TerminateSession", params, optFns, c.addOperationTerminateSessionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TerminateSessionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TerminateSessionInput struct { + + // The ID of the session to terminate. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type TerminateSessionOutput struct { + + // The ID of the session that has been terminated. + SessionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTerminateSession{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTerminateSession{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TerminateSession"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpTerminateSessionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateSession(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTerminateSession(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TerminateSession", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go new file mode 100644 index 00000000000..5bc47871be8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Remove a label or labels from a parameter. +// +// Parameter names can't contain spaces. The service removes any spaces specified +// for the beginning or end of a parameter name. If the specified name for a +// parameter contains spaces between characters, the request fails with a +// ValidationException error. +func (c *Client) UnlabelParameterVersion(ctx context.Context, params *UnlabelParameterVersionInput, optFns ...func(*Options)) (*UnlabelParameterVersionOutput, error) { + if params == nil { + params = &UnlabelParameterVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UnlabelParameterVersion", params, optFns, c.addOperationUnlabelParameterVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UnlabelParameterVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UnlabelParameterVersionInput struct { + + // One or more labels to delete from the specified parameter version. + // + // This member is required. + Labels []string + + // The name of the parameter from which you want to delete one or more labels. + // + // You can't enter the Amazon Resource Name (ARN) for a parameter, only the + // parameter name itself. + // + // This member is required. + Name *string + + // The specific version of the parameter which you want to delete one or more + // labels from. If it isn't present, the call will fail. + // + // This member is required. + ParameterVersion *int64 + + noSmithyDocumentSerde +} + +type UnlabelParameterVersionOutput struct { + + // The labels that aren't attached to the given parameter version. + InvalidLabels []string + + // A list of all labels deleted from the parameter. + RemovedLabels []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUnlabelParameterVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUnlabelParameterVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUnlabelParameterVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UnlabelParameterVersion"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUnlabelParameterVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnlabelParameterVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUnlabelParameterVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UnlabelParameterVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go new file mode 100644 index 00000000000..a5a87c4a7a6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go @@ -0,0 +1,375 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an association. You can update the association name and version, the +// document version, schedule, parameters, and Amazon Simple Storage Service +// (Amazon S3) output. When you call UpdateAssociation , the system removes all +// optional parameters from the request and overwrites the association with null +// values for those parameters. This is by design. You must specify all optional +// parameters in the call, even if you are not changing the parameters. This +// includes the Name parameter. Before calling this API action, we recommend that +// you call the DescribeAssociationAPI operation and make a note of all optional parameters required +// for your UpdateAssociation call. +// +// In order to call this API operation, a user, group, or role must be granted +// permission to call the DescribeAssociationAPI operation. If you don't have permission to call +// DescribeAssociation , then you receive the following error: An error occurred +// (AccessDeniedException) when calling the UpdateAssociation operation: User: +// isn't authorized to perform: ssm:DescribeAssociation on resource: +// +// When you update an association, the association immediately runs against the +// specified targets. You can add the ApplyOnlyAtCronInterval parameter to run the +// association during the next schedule run. +func (c *Client) UpdateAssociation(ctx context.Context, params *UpdateAssociationInput, optFns ...func(*Options)) (*UpdateAssociationOutput, error) { + if params == nil { + params = &UpdateAssociationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAssociation", params, optFns, c.addOperationUpdateAssociationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAssociationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAssociationInput struct { + + // The ID of the association you want to update. + // + // This member is required. + AssociationId *string + + // The details for the CloudWatch alarm you want to apply to an automation or + // command. + AlarmConfiguration *types.AlarmConfiguration + + // By default, when you update an association, the system runs it immediately + // after it is updated and then according to the schedule you specified. Specify + // true for ApplyOnlyAtCronInterval if you want the association to run only + // according to the schedule you specified. + // + // If you chose this option when you created an association and later you edit + // that association or you make changes to the Automation runbook or SSM document + // on which that association is based, State Manager applies the association at the + // next specified cron interval. For example, if you chose the Latest version of + // an SSM document when you created an association and you edit the association by + // choosing a different document version on the Documents page, State Manager + // applies the association at the next specified cron interval if you previously + // set ApplyOnlyAtCronInterval to true . If this option wasn't selected, State + // Manager immediately runs the association. + // + // For more information, see [Understanding when associations are applied to resources] and [About target updates with Automation runbooks] in the Amazon Web Services Systems Manager User + // Guide. + // + // This parameter isn't supported for rate expressions. + // + // You can reset this parameter. To do so, specify the + // no-apply-only-at-cron-interval parameter when you update the association from + // the command line. This parameter forces the association to run immediately after + // updating it and according to the interval specified. + // + // [Understanding when associations are applied to resources]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling + // [About target updates with Automation runbooks]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates + ApplyOnlyAtCronInterval bool + + // A role used by association to take actions on your behalf. State Manager will + // assume this role and call required APIs when dispatching configurations to + // nodes. If not specified, [service-linked role for Systems Manager]will be used by default. + // + // It is recommended that you define a custom IAM role so that you have full + // control of the permissions that State Manager has when taking actions on your + // behalf. + // + // Service-linked role support in State Manager is being phased out. Associations + // relying on service-linked role may require updates in the future to continue + // functioning properly. + // + // [service-linked role for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html + AssociationDispatchAssumeRole *string + + // The name of the association that you want to update. + AssociationName *string + + // This parameter is provided for concurrency control purposes. You must specify + // the latest association version in the service. If you want to ensure that this + // request succeeds, either specify $LATEST , or omit this parameter. + AssociationVersion *string + + // Choose the parameter that will define how your automation will branch out. This + // target is required for associations that use an Automation runbook and target + // resources by using rate controls. Automation is a tool in Amazon Web Services + // Systems Manager. + AutomationTargetParameterName *string + + // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents + // you want to gate your associations under. The associations only run when that + // change calendar is open. For more information, see [Amazon Web Services Systems Manager Change Calendar]in the Amazon Web Services + // Systems Manager User Guide. + // + // [Amazon Web Services Systems Manager Change Calendar]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar + CalendarNames []string + + // The severity level to assign to the association. + ComplianceSeverity types.AssociationComplianceSeverity + + // The document version you want update for the association. + // + // State Manager doesn't support running associations that use a new version of a + // document if that document is shared from another account. State Manager always + // runs the default version of a document if shared from another account, even + // though the Systems Manager console shows that a new version was processed. If + // you want to run an association using a new version of a document shared form + // another account, you must set the document version to default . + DocumentVersion *string + + // The number of hours the association can run before it is canceled. Duration + // applies to associations that are currently running, and any pending and in + // progress commands on all targets. If a target was taken offline for the + // association to run, it is made available again immediately, without a reboot. + // + // The Duration parameter applies only when both these conditions are true: + // + // - The association for which you specify a duration is cancelable according to + // the parameters of the SSM command document or Automation runbook associated with + // this execution. + // + // - The command specifies the [ApplyOnlyAtCronInterval]parameter, which means that the association + // doesn't run immediately after it is updated, but only according to the specified + // schedule. + // + // [ApplyOnlyAtCronInterval]: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval + Duration *int32 + + // The maximum number of targets allowed to run the association at the same time. + // You can specify a number, for example 10, or a percentage of the target set, for + // example 10%. The default value is 100%, which means all targets run the + // association at the same time. + // + // If a new managed node starts and attempts to run an association while Systems + // Manager is running MaxConcurrency associations, the association is allowed to + // run. During the next association interval, the new managed node will process its + // association within the limit specified for MaxConcurrency . + MaxConcurrency *string + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for example + // 10%. If you specify 3, for example, the system stops sending requests when the + // fourth error is received. If you specify 0, then the system stops sending + // requests after the first error is returned. If you run an association on 50 + // managed nodes and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If you + // need to ensure that there won't be more than max-errors failed executions, set + // MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string + + // The name of the SSM Command document or Automation runbook that contains the + // configuration information for the managed node. + // + // You can specify Amazon Web Services-predefined documents, documents you + // created, or a document that is shared with you from another account. + // + // For Systems Manager document (SSM document) that are shared with you from other + // Amazon Web Services accounts, you must specify the complete SSM document ARN, in + // the following format: + // + // arn:aws:ssm:region:account-id:document/document-name + // + // For example: + // + // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document + // + // For Amazon Web Services-predefined documents and SSM documents you created in + // your account, you only need to specify the document name. For example, + // AWS-ApplyPatchBaseline or My-Document . + Name *string + + // An S3 bucket where you want to store the results of this request. + OutputLocation *types.InstanceAssociationOutputLocation + + // The parameters you want to update for the association. If you create a + // parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, + // you can reference the parameter using {{ssm:parameter-name}} . + Parameters map[string][]string + + // The cron expression used to schedule the association that you want to update. + ScheduleExpression *string + + // Number of days to wait after the scheduled day to run an association. For + // example, if you specified a cron schedule of cron(0 0 ? * THU#2 *) , you could + // specify an offset of 3 to run the association each Sunday after the second + // Thursday of the month. For more information about cron schedules for + // associations, see [Reference: Cron and rate expressions for Systems Manager]in the Amazon Web Services Systems Manager User Guide. + // + // To use offsets, you must specify the ApplyOnlyAtCronInterval parameter. This + // option tells the system not to run an association immediately after you create + // it. + // + // [Reference: Cron and rate expressions for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html + ScheduleOffset *int32 + + // The mode for generating association compliance. You can specify AUTO or MANUAL . + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT . If the association execution doesn't run + // successfully, the association is NON-COMPLIANT . + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API + // operation. In this case, compliance data isn't managed by State Manager, a tool + // in Amazon Web Services Systems Manager. It is managed by your direct call to the + // PutComplianceItemsAPI operation. + // + // By default, all associations use AUTO mode. + SyncCompliance types.AssociationSyncCompliance + + // A location is a combination of Amazon Web Services Regions and Amazon Web + // Services accounts where you want to run the association. Use this action to + // update an association in multiple Regions and multiple accounts. + // + // The IncludeChildOrganizationUnits parameter is not supported by State Manager. + TargetLocations []types.TargetLocation + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The targets of the association. + Targets []types.Target + + noSmithyDocumentSerde +} + +type UpdateAssociationOutput struct { + + // The description of the association that was updated. + AssociationDescription *types.AssociationDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAssociation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAssociation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAssociation"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateAssociationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAssociation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAssociation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAssociation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go new file mode 100644 index 00000000000..e7cc63bcc77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the status of the Amazon Web Services Systems Manager document (SSM +// document) associated with the specified managed node. +// +// UpdateAssociationStatus is primarily used by the Amazon Web Services Systems +// Manager Agent (SSM Agent) to report status updates about your associations and +// is only used for associations created with the InstanceId legacy parameter. +func (c *Client) UpdateAssociationStatus(ctx context.Context, params *UpdateAssociationStatusInput, optFns ...func(*Options)) (*UpdateAssociationStatusOutput, error) { + if params == nil { + params = &UpdateAssociationStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAssociationStatus", params, optFns, c.addOperationUpdateAssociationStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAssociationStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAssociationStatusInput struct { + + // The association status. + // + // This member is required. + AssociationStatus *types.AssociationStatus + + // The managed node ID. + // + // This member is required. + InstanceId *string + + // The name of the SSM document. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type UpdateAssociationStatusOutput struct { + + // Information about the association. + AssociationDescription *types.AssociationDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAssociationStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAssociationStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAssociationStatus{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAssociationStatus"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateAssociationStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAssociationStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAssociationStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAssociationStatus", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go new file mode 100644 index 00000000000..cb57983f442 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates one or more values for an SSM document. +func (c *Client) UpdateDocument(ctx context.Context, params *UpdateDocumentInput, optFns ...func(*Options)) (*UpdateDocumentOutput, error) { + if params == nil { + params = &UpdateDocumentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDocument", params, optFns, c.addOperationUpdateDocumentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDocumentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDocumentInput struct { + + // A valid JSON or YAML string. + // + // This member is required. + Content *string + + // The name of the SSM document that you want to update. + // + // This member is required. + Name *string + + // A list of key-value pairs that describe attachments to a version of a document. + Attachments []types.AttachmentsSource + + // The friendly name of the SSM document that you want to update. This value can + // differ for each version of the document. If you don't specify a value for this + // parameter in your request, the existing value is applied to the new document + // version. + DisplayName *string + + // Specify the document format for the new document version. Systems Manager + // supports JSON and YAML documents. JSON is the default format. + DocumentFormat types.DocumentFormat + + // The version of the document that you want to update. Currently, Systems Manager + // supports updating only the latest version of the document. You can specify the + // version number of the latest version or use the $LATEST variable. + // + // If you change a document version for a State Manager association, Systems + // Manager immediately runs the association unless you previously specifed the + // apply-only-at-cron-interval parameter. + DocumentVersion *string + + // Specify a new target type for the document. + TargetType *string + + // An optional field specifying the version of the artifact you are updating with + // the document. For example, 12.6. This value is unique across all versions of a + // document, and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +type UpdateDocumentOutput struct { + + // A description of the document that was updated. + DocumentDescription *types.DocumentDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDocument{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDocument{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDocument"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateDocumentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDocument(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDocument(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDocument", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go new file mode 100644 index 00000000000..580b15b827d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Set the default version of a document. +// +// If you change a document version for a State Manager association, Systems +// Manager immediately runs the association unless you previously specifed the +// apply-only-at-cron-interval parameter. +func (c *Client) UpdateDocumentDefaultVersion(ctx context.Context, params *UpdateDocumentDefaultVersionInput, optFns ...func(*Options)) (*UpdateDocumentDefaultVersionOutput, error) { + if params == nil { + params = &UpdateDocumentDefaultVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDocumentDefaultVersion", params, optFns, c.addOperationUpdateDocumentDefaultVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDocumentDefaultVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDocumentDefaultVersionInput struct { + + // The version of a custom document that you want to set as the default version. + // + // This member is required. + DocumentVersion *string + + // The name of a custom document that you want to set as the default version. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type UpdateDocumentDefaultVersionOutput struct { + + // The description of a custom document that you want to set as the default + // version. + Description *types.DocumentDefaultVersionDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDocumentDefaultVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDocumentDefaultVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDocumentDefaultVersion"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateDocumentDefaultVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDocumentDefaultVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDocumentDefaultVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDocumentDefaultVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go new file mode 100644 index 00000000000..9a359224c2b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Amazon Web Services Systems Manager Change Manager is no longer open to new +// customers. Existing customers can continue to use the service as normal. For +// more information, see [Amazon Web Services Systems Manager Change Manager availability change]. +// +// Updates information related to approval reviews for a specific version of a +// change template in Change Manager. +// +// [Amazon Web Services Systems Manager Change Manager availability change]: https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html +func (c *Client) UpdateDocumentMetadata(ctx context.Context, params *UpdateDocumentMetadataInput, optFns ...func(*Options)) (*UpdateDocumentMetadataOutput, error) { + if params == nil { + params = &UpdateDocumentMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDocumentMetadata", params, optFns, c.addOperationUpdateDocumentMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDocumentMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDocumentMetadataInput struct { + + // The change template review details to update. + // + // This member is required. + DocumentReviews *types.DocumentReviews + + // The name of the change template for which a version's metadata is to be updated. + // + // This member is required. + Name *string + + // The version of a change template in which to update approval metadata. + DocumentVersion *string + + noSmithyDocumentSerde +} + +type UpdateDocumentMetadataOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDocumentMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDocumentMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDocumentMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDocumentMetadata"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateDocumentMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDocumentMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDocumentMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDocumentMetadata", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go new file mode 100644 index 00000000000..d7f9721260c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing maintenance window. Only specified parameters are modified. +// +// The value you specify for Duration determines the specific end time for the +// maintenance window based on the time it begins. No maintenance window tasks are +// permitted to start after the resulting endtime minus the number of hours you +// specify for Cutoff . For example, if the maintenance window starts at 3 PM, the +// duration is three hours, and the value you specify for Cutoff is one hour, no +// maintenance window tasks can start after 5 PM. +func (c *Client) UpdateMaintenanceWindow(ctx context.Context, params *UpdateMaintenanceWindowInput, optFns ...func(*Options)) (*UpdateMaintenanceWindowOutput, error) { + if params == nil { + params = &UpdateMaintenanceWindowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateMaintenanceWindow", params, optFns, c.addOperationUpdateMaintenanceWindowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateMaintenanceWindowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateMaintenanceWindowInput struct { + + // The ID of the maintenance window to update. + // + // This member is required. + WindowId *string + + // Whether targets must be registered with the maintenance window before tasks can + // be defined for those targets. + AllowUnassociatedTargets *bool + + // The number of hours before the end of the maintenance window that Amazon Web + // Services Systems Manager stops scheduling new tasks for execution. + Cutoff *int32 + + // An optional description for the update request. + Description *string + + // The duration of the maintenance window in hours. + Duration *int32 + + // Whether the maintenance window is enabled. + Enabled *bool + + // The date and time, in ISO-8601 Extended format, for when you want the + // maintenance window to become inactive. EndDate allows you to set a date and + // time in the future when the maintenance window will no longer run. + EndDate *string + + // The name of the maintenance window. + Name *string + + // If True , then all fields that are required by the CreateMaintenanceWindow operation are also required + // for this API request. Optional fields that aren't specified are set to null. + Replace *bool + + // The schedule of the maintenance window in the form of a cron or rate expression. + Schedule *string + + // The number of days to wait after the date and time specified by a cron + // expression before running the maintenance window. + // + // For example, the following cron expression schedules a maintenance window to + // run the third Tuesday of every month at 11:30 PM. + // + // cron(30 23 ? * TUE#3 *) + // + // If the schedule offset is 2 , the maintenance window won't run until two days + // later. + ScheduleOffset *int32 + + // The time zone that the scheduled maintenance window executions are based on, in + // Internet Assigned Numbers Authority (IANA) format. For example: + // "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the [Time Zone Database]on + // the IANA website. + // + // [Time Zone Database]: https://www.iana.org/time-zones + ScheduleTimezone *string + + // The date and time, in ISO-8601 Extended format, for when you want the + // maintenance window to become active. StartDate allows you to delay activation + // of the maintenance window until the specified future date. + // + // When using a rate schedule, if you provide a start date that occurs in the + // past, the current date and time are used as the start date. + StartDate *string + + noSmithyDocumentSerde +} + +type UpdateMaintenanceWindowOutput struct { + + // Whether targets must be registered with the maintenance window before tasks can + // be defined for those targets. + AllowUnassociatedTargets bool + + // The number of hours before the end of the maintenance window that Amazon Web + // Services Systems Manager stops scheduling new tasks for execution. + Cutoff int32 + + // An optional description of the update. + Description *string + + // The duration of the maintenance window in hours. + Duration *int32 + + // Whether the maintenance window is enabled. + Enabled bool + + // The date and time, in ISO-8601 Extended format, for when the maintenance window + // is scheduled to become inactive. The maintenance window won't run after this + // specified time. + EndDate *string + + // The name of the maintenance window. + Name *string + + // The schedule of the maintenance window in the form of a cron or rate expression. + Schedule *string + + // The number of days to wait to run a maintenance window after the scheduled cron + // expression date and time. + ScheduleOffset *int32 + + // The time zone that the scheduled maintenance window executions are based on, in + // Internet Assigned Numbers Authority (IANA) format. For example: + // "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the [Time Zone Database]on + // the IANA website. + // + // [Time Zone Database]: https://www.iana.org/time-zones + ScheduleTimezone *string + + // The date and time, in ISO-8601 Extended format, for when the maintenance window + // is scheduled to become active. The maintenance window won't run before this + // specified time. + StartDate *string + + // The ID of the created maintenance window. + WindowId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateMaintenanceWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMaintenanceWindow{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateMaintenanceWindow"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateMaintenanceWindowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMaintenanceWindow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateMaintenanceWindow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateMaintenanceWindow", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go new file mode 100644 index 00000000000..2c7461b3de2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies the target of an existing maintenance window. You can change the +// following: +// +// - Name +// +// - Description +// +// - Owner +// +// - IDs for an ID target +// +// - Tags for a Tag target +// +// - From any supported tag type to another. The three supported tag types are +// ID target, Tag target, and resource group. For more information, see Target. +// +// If a parameter is null, then the corresponding field isn't modified. +func (c *Client) UpdateMaintenanceWindowTarget(ctx context.Context, params *UpdateMaintenanceWindowTargetInput, optFns ...func(*Options)) (*UpdateMaintenanceWindowTargetOutput, error) { + if params == nil { + params = &UpdateMaintenanceWindowTargetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateMaintenanceWindowTarget", params, optFns, c.addOperationUpdateMaintenanceWindowTargetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateMaintenanceWindowTargetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateMaintenanceWindowTargetInput struct { + + // The maintenance window ID with which to modify the target. + // + // This member is required. + WindowId *string + + // The target ID to modify. + // + // This member is required. + WindowTargetId *string + + // An optional description for the update. + Description *string + + // A name for the update. + Name *string + + // User-provided value that will be included in any Amazon CloudWatch Events + // events raised while running tasks for these targets in this maintenance window. + OwnerInformation *string + + // If True , then all fields that are required by the RegisterTargetWithMaintenanceWindow operation are also required + // for this API request. Optional fields that aren't specified are set to null. + Replace *bool + + // The targets to add or replace. + Targets []types.Target + + noSmithyDocumentSerde +} + +type UpdateMaintenanceWindowTargetOutput struct { + + // The updated description. + Description *string + + // The updated name. + Name *string + + // The updated owner. + OwnerInformation *string + + // The updated targets. + Targets []types.Target + + // The maintenance window ID specified in the update request. + WindowId *string + + // The target ID specified in the update request. + WindowTargetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateMaintenanceWindowTargetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateMaintenanceWindowTarget"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateMaintenanceWindowTargetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMaintenanceWindowTarget(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateMaintenanceWindowTarget(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateMaintenanceWindowTarget", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go new file mode 100644 index 00000000000..7b3bff95eeb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -0,0 +1,397 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies a task assigned to a maintenance window. You can't change the task +// type, but you can change the following values: +// +// - TaskARN . For example, you can change a RUN_COMMAND task from +// AWS-RunPowerShellScript to AWS-RunShellScript . +// +// - ServiceRoleArn +// +// - TaskInvocationParameters +// +// - Priority +// +// - MaxConcurrency +// +// - MaxErrors +// +// One or more targets must be specified for maintenance window Run Command-type +// tasks. Depending on the task, targets are optional for other maintenance window +// task types (Automation, Lambda, and Step Functions). For more information about +// running tasks that don't specify targets, see [Registering maintenance window tasks without targets]in the Amazon Web Services +// Systems Manager User Guide. +// +// If the value for a parameter in UpdateMaintenanceWindowTask is null, then the +// corresponding field isn't modified. If you set Replace to true, then all fields +// required by the RegisterTaskWithMaintenanceWindowoperation are required for this request. Optional fields that +// aren't specified are set to null. +// +// When you update a maintenance window task that has options specified in +// TaskInvocationParameters , you must provide again all the +// TaskInvocationParameters values that you want to retain. The values you don't +// specify again are removed. For example, suppose that when you registered a Run +// Command task, you specified TaskInvocationParameters values for Comment , +// NotificationConfig , and OutputS3BucketName . If you update the maintenance +// window task and specify only a different OutputS3BucketName value, the values +// for Comment and NotificationConfig are removed. +// +// [Registering maintenance window tasks without targets]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html +func (c *Client) UpdateMaintenanceWindowTask(ctx context.Context, params *UpdateMaintenanceWindowTaskInput, optFns ...func(*Options)) (*UpdateMaintenanceWindowTaskOutput, error) { + if params == nil { + params = &UpdateMaintenanceWindowTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateMaintenanceWindowTask", params, optFns, c.addOperationUpdateMaintenanceWindowTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateMaintenanceWindowTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateMaintenanceWindowTaskInput struct { + + // The maintenance window ID that contains the task to modify. + // + // This member is required. + WindowId *string + + // The task ID to modify. + // + // This member is required. + WindowTaskId *string + + // The CloudWatch alarm you want to apply to your maintenance window task. + AlarmConfiguration *types.AlarmConfiguration + + // Indicates whether tasks should continue to run after the cutoff time specified + // in the maintenance windows is reached. + // + // - CONTINUE_TASK : When the cutoff time is reached, any tasks that are running + // continue. The default value. + // + // - CANCEL_TASK : + // + // - For Automation, Lambda, Step Functions tasks: When the cutoff time is + // reached, any task invocations that are already running continue, but no new task + // invocations are started. + // + // - For Run Command tasks: When the cutoff time is reached, the system sends a CancelCommand + // operation that attempts to cancel the command associated with the task. However, + // there is no guarantee that the command will be terminated and the underlying + // process stopped. + // + // The status for tasks that are not completed is TIMED_OUT . + CutoffBehavior types.MaintenanceWindowTaskCutoffBehavior + + // The new task description to specify. + Description *string + + // The new logging location in Amazon S3 to specify. + // + // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service + // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and + // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For + // information about how Amazon Web Services Systems Manager handles these options + // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + LoggingInfo *types.LoggingInfo + + // The new MaxConcurrency value you want to specify. MaxConcurrency is the number + // of targets that are allowed to run this task, in parallel. + // + // Although this element is listed as "Required: No", a value can be omitted only + // when you are registering or updating a [targetless task]You must provide a value in all other + // cases. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 . + // This value doesn't affect the running of your task. + // + // [targetless task]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + MaxConcurrency *string + + // The new MaxErrors value to specify. MaxErrors is the maximum number of errors + // that are allowed before the task stops being scheduled. + // + // Although this element is listed as "Required: No", a value can be omitted only + // when you are registering or updating a [targetless task]You must provide a value in all other + // cases. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 . + // This value doesn't affect the running of your task. + // + // [targetless task]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + MaxErrors *string + + // The new task name to specify. + Name *string + + // The new task priority to specify. The lower the number, the higher the + // priority. Tasks that have the same priority are scheduled in parallel. + Priority *int32 + + // If True, then all fields that are required by the RegisterTaskWithMaintenanceWindow operation are also required + // for this API request. Optional fields that aren't specified are set to null. + Replace *bool + + // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services + // Systems Manager to assume when running a maintenance window task. If you do not + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the + // Amazon Web Services Systems Manager User Guide. + // + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + ServiceRoleArn *string + + // The targets (either managed nodes or tags) to modify. Managed nodes are + // specified using the format Key=instanceids,Values=instanceID_1,instanceID_2 . + // Tags are specified using the format Key=tag_name,Values=tag_value . + // + // One or more targets must be specified for maintenance window Run Command-type + // tasks. Depending on the task, targets are optional for other maintenance window + // task types (Automation, Lambda, and Step Functions). For more information about + // running tasks that don't specify targets, see [Registering maintenance window tasks without targets]in the Amazon Web Services + // Systems Manager User Guide. + // + // [Registering maintenance window tasks without targets]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + Targets []types.Target + + // The task ARN to modify. + TaskArn *string + + // The parameters that the task should use during execution. Populate only the + // fields that match the task type. All other fields should be empty. + // + // When you update a maintenance window task that has options specified in + // TaskInvocationParameters , you must provide again all the + // TaskInvocationParameters values that you want to retain. The values you don't + // specify again are removed. For example, suppose that when you registered a Run + // Command task, you specified TaskInvocationParameters values for Comment , + // NotificationConfig , and OutputS3BucketName . If you update the maintenance + // window task and specify only a different OutputS3BucketName value, the values + // for Comment and NotificationConfig are removed. + TaskInvocationParameters *types.MaintenanceWindowTaskInvocationParameters + + // The parameters to modify. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + // + // The map has the following format: + // + // Key: string, between 1 and 255 characters + // + // Value: an array of strings, each string is between 1 and 255 characters + TaskParameters map[string]types.MaintenanceWindowTaskParameterValueExpression + + noSmithyDocumentSerde +} + +type UpdateMaintenanceWindowTaskOutput struct { + + // The details for the CloudWatch alarm you applied to your maintenance window + // task. + AlarmConfiguration *types.AlarmConfiguration + + // The specification for whether tasks should continue to run after the cutoff + // time specified in the maintenance windows is reached. + CutoffBehavior types.MaintenanceWindowTaskCutoffBehavior + + // The updated task description. + Description *string + + // The updated logging information in Amazon S3. + // + // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service + // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and + // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For + // information about how Amazon Web Services Systems Manager handles these options + // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + LoggingInfo *types.LoggingInfo + + // The updated MaxConcurrency value. + MaxConcurrency *string + + // The updated MaxErrors value. + MaxErrors *string + + // The updated task name. + Name *string + + // The updated priority value. + Priority int32 + + // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services + // Systems Manager to assume when running a maintenance window task. If you do not + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the + // Amazon Web Services Systems Manager User Guide. + // + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + ServiceRoleArn *string + + // The updated target values. + Targets []types.Target + + // The updated task ARN value. + TaskArn *string + + // The updated parameter values. + TaskInvocationParameters *types.MaintenanceWindowTaskInvocationParameters + + // The updated parameter values. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + TaskParameters map[string]types.MaintenanceWindowTaskParameterValueExpression + + // The ID of the maintenance window that was updated. + WindowId *string + + // The task ID of the maintenance window that was updated. + WindowTaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateMaintenanceWindowTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMaintenanceWindowTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateMaintenanceWindowTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateMaintenanceWindowTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMaintenanceWindowTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateMaintenanceWindowTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateMaintenanceWindowTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go new file mode 100644 index 00000000000..fc2b7c85183 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the Identity and Access Management (IAM) role that is assigned to the +// on-premises server, edge device, or virtual machines (VM). IAM roles are first +// assigned to these hybrid nodes during the activation process. For more +// information, see CreateActivation. +func (c *Client) UpdateManagedInstanceRole(ctx context.Context, params *UpdateManagedInstanceRoleInput, optFns ...func(*Options)) (*UpdateManagedInstanceRoleOutput, error) { + if params == nil { + params = &UpdateManagedInstanceRoleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateManagedInstanceRole", params, optFns, c.addOperationUpdateManagedInstanceRoleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateManagedInstanceRoleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateManagedInstanceRoleInput struct { + + // The name of the Identity and Access Management (IAM) role that you want to + // assign to the managed node. This IAM role must provide AssumeRole permissions + // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com + // . For more information, see [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager User + // Guide. + // + // You can't specify an IAM service-linked role for this parameter. You must + // create a unique role. + // + // [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html + // + // This member is required. + IamRole *string + + // The ID of the managed node where you want to update the role. + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type UpdateManagedInstanceRoleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateManagedInstanceRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateManagedInstanceRole{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateManagedInstanceRole{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateManagedInstanceRole"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateManagedInstanceRoleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateManagedInstanceRole(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateManagedInstanceRole(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateManagedInstanceRole", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go new file mode 100644 index 00000000000..d58c6a98da1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go @@ -0,0 +1,246 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Edit or change an OpsItem. You must have permission in Identity and Access +// Management (IAM) to update an OpsItem. For more information, see [Set up OpsCenter]in the Amazon +// Web Services Systems Manager User Guide. +// +// Operations engineers and IT professionals use Amazon Web Services Systems +// Manager OpsCenter to view, investigate, and remediate operational issues +// impacting the performance and health of their Amazon Web Services resources. For +// more information, see [Amazon Web Services Systems Manager OpsCenter]in the Amazon Web Services Systems Manager User Guide. +// +// [Amazon Web Services Systems Manager OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html +// [Set up OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html +func (c *Client) UpdateOpsItem(ctx context.Context, params *UpdateOpsItemInput, optFns ...func(*Options)) (*UpdateOpsItemOutput, error) { + if params == nil { + params = &UpdateOpsItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOpsItem", params, optFns, c.addOperationUpdateOpsItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOpsItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOpsItemInput struct { + + // The ID of the OpsItem. + // + // This member is required. + OpsItemId *string + + // The time a runbook workflow ended. Currently reported only for the OpsItem type + // /aws/changerequest . + ActualEndTime *time.Time + + // The time a runbook workflow started. Currently reported only for the OpsItem + // type /aws/changerequest . + ActualStartTime *time.Time + + // Specify a new category for an OpsItem. + Category *string + + // User-defined text that contains information about the OpsItem, in Markdown + // format. + Description *string + + // The Amazon Resource Name (ARN) of an SNS topic where notifications are sent + // when this OpsItem is edited or changed. + Notifications []types.OpsItemNotification + + // Add new keys or edit existing key-value pairs of the OperationalData map in the + // OpsItem object. + // + // Operational data is custom data that provides useful reference details about + // the OpsItem. For example, you can specify log files, error strings, license + // keys, troubleshooting tips, or other relevant data. You enter operational data + // as key-value pairs. The key has a maximum length of 128 characters. The value + // has a maximum size of 20 KB. + // + // Operational data keys can't begin with the following: amazon , aws , amzn , ssm + // , /amazon , /aws , /amzn , /ssm . + // + // You can choose to make the data searchable by other users in the account or you + // can restrict search access. Searchable data means that all users with access to + // the OpsItem Overview page (as provided by the DescribeOpsItemsAPI operation) can view and + // search on the specified data. Operational data that isn't searchable is only + // viewable by users who have access to the OpsItem (as provided by the GetOpsItemAPI + // operation). + // + // Use the /aws/resources key in OperationalData to specify a related resource in + // the request. Use the /aws/automations key in OperationalData to associate an + // Automation runbook with the OpsItem. To view Amazon Web Services CLI example + // commands that use these keys, see [Creating OpsItems manually]in the Amazon Web Services Systems Manager + // User Guide. + // + // [Creating OpsItems manually]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html + OperationalData map[string]types.OpsItemDataValue + + // Keys that you want to remove from the OperationalData map. + OperationalDataToDelete []string + + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + + // The time specified in a change request for a runbook workflow to end. Currently + // supported only for the OpsItem type /aws/changerequest . + PlannedEndTime *time.Time + + // The time specified in a change request for a runbook workflow to start. + // Currently supported only for the OpsItem type /aws/changerequest . + PlannedStartTime *time.Time + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int32 + + // One or more OpsItems that share something in common with the current OpsItems. + // For example, related OpsItems can include OpsItems with similar error messages, + // impacted resources, or statuses for the impacted resource. + RelatedOpsItems []types.RelatedOpsItem + + // Specify a new severity for an OpsItem. + Severity *string + + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html + Status types.OpsItemStatus + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + Title *string + + noSmithyDocumentSerde +} + +type UpdateOpsItemOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOpsItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateOpsItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateOpsItem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOpsItem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateOpsItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOpsItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOpsItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateOpsItem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go new file mode 100644 index 00000000000..151e403e73d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Amazon Web Services Systems Manager calls this API operation when you edit +// OpsMetadata in Application Manager. +func (c *Client) UpdateOpsMetadata(ctx context.Context, params *UpdateOpsMetadataInput, optFns ...func(*Options)) (*UpdateOpsMetadataOutput, error) { + if params == nil { + params = &UpdateOpsMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOpsMetadata", params, optFns, c.addOperationUpdateOpsMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOpsMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOpsMetadataInput struct { + + // The Amazon Resource Name (ARN) of the OpsMetadata Object to update. + // + // This member is required. + OpsMetadataArn *string + + // The metadata keys to delete from the OpsMetadata object. + KeysToDelete []string + + // Metadata to add to an OpsMetadata object. + MetadataToUpdate map[string]types.MetadataValue + + noSmithyDocumentSerde +} + +type UpdateOpsMetadataOutput struct { + + // The Amazon Resource Name (ARN) of the OpsMetadata Object that was updated. + OpsMetadataArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOpsMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateOpsMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateOpsMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOpsMetadata"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateOpsMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOpsMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateOpsMetadata", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go new file mode 100644 index 00000000000..909496d80a1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go @@ -0,0 +1,309 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Modifies an existing patch baseline. Fields not specified in the request are +// left unchanged. +// +// For information about valid key-value pairs in PatchFilters for each supported +// operating system type, see PatchFilter. +func (c *Client) UpdatePatchBaseline(ctx context.Context, params *UpdatePatchBaselineInput, optFns ...func(*Options)) (*UpdatePatchBaselineOutput, error) { + if params == nil { + params = &UpdatePatchBaselineInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdatePatchBaseline", params, optFns, c.addOperationUpdatePatchBaselineMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdatePatchBaselineOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdatePatchBaselineInput struct { + + // The ID of the patch baseline to update. + // + // This member is required. + BaselineId *string + + // A set of rules used to include patches in the baseline. + ApprovalRules *types.PatchRuleGroup + + // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + ApprovedPatches []string + + // Assigns a new compliance severity level to an existing patch baseline. + ApprovedPatchesComplianceLevel types.PatchComplianceLevel + + // Indicates whether the list of approved patches includes non-security updates + // that should be applied to the managed nodes. The default value is false . + // Applies to Linux managed nodes only. + ApprovedPatchesEnableNonSecurity *bool + + // Indicates the status to be assigned to security patches that are available but + // not approved because they don't meet the installation criteria specified in the + // patch baseline. + // + // Example scenario: Security patches that you might want installed can be skipped + // if you have specified a long period to wait after a patch is released before + // installation. If an update to the patch is released during your specified + // waiting period, the waiting period for installing the patch starts over. If the + // waiting period is too long, multiple versions of the patch could be released but + // never installed. + // + // Supported for Windows Server managed nodes only. + AvailableSecurityUpdatesComplianceStatus types.PatchComplianceStatus + + // A description of the patch baseline. + Description *string + + // A set of global filters used to include patches in the baseline. + // + // The GlobalFilters parameter can be configured only by using the CLI or an + // Amazon Web Services SDK. It can't be configured from the Patch Manager console, + // and its value isn't displayed in the console. + GlobalFilters *types.PatchFilterGroup + + // The name of the patch baseline. + Name *string + + // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + RejectedPatches []string + + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. + // + // ALLOW_AS_DEPENDENCY Linux and macOS: A package in the rejected patches list is + // installed only if it is a dependency of another package. It is considered + // compliant with the patch baseline, and its status is reported as INSTALLED_OTHER + // . This is the default action if no option is specified. + // + // Windows Server: Windows Server doesn't support the concept of package + // dependencies. If a package in the rejected patches list and already installed on + // the node, its status is reported as INSTALLED_OTHER . Any package not already + // installed on the node is skipped. This is the default action if no option is + // specified. + // + // BLOCK All OSs: Packages in the rejected patches list, and packages that + // include them as dependencies, aren't installed by Patch Manager under any + // circumstances. + // + // State value assignment for patch compliance: + // + // - If a package was installed before it was added to the rejected patches + // list, or is installed outside of Patch Manager afterward, it's considered + // noncompliant with the patch baseline and its status is reported as + // INSTALLED_REJECTED . + // + // - If an update attempts to install a dependency package that is now rejected + // by the baseline, when previous versions of the package were not rejected, the + // package being updated is reported as MISSING for SCAN operations and as FAILED + // for INSTALL operations. + RejectedPatchesAction types.PatchAction + + // If True, then all fields that are required by the CreatePatchBaseline operation are also required + // for this API request. Optional fields that aren't specified are set to null. + Replace *bool + + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. + Sources []types.PatchSource + + noSmithyDocumentSerde +} + +type UpdatePatchBaselineOutput struct { + + // A set of rules used to include patches in the baseline. + ApprovalRules *types.PatchRuleGroup + + // A list of explicitly approved patches for the baseline. + ApprovedPatches []string + + // The compliance severity level assigned to the patch baseline after the update + // completed. + ApprovedPatchesComplianceLevel types.PatchComplianceLevel + + // Indicates whether the list of approved patches includes non-security updates + // that should be applied to the managed nodes. The default value is false . + // Applies to Linux managed nodes only. + ApprovedPatchesEnableNonSecurity *bool + + // Indicates the compliance status of managed nodes for which security-related + // patches are available but were not approved. This preference is specified when + // the CreatePatchBaseline or UpdatePatchBaseline commands are run. + // + // Applies to Windows Server managed nodes only. + AvailableSecurityUpdatesComplianceStatus types.PatchComplianceStatus + + // The ID of the deleted patch baseline. + BaselineId *string + + // The date when the patch baseline was created. + CreatedDate *time.Time + + // A description of the patch baseline. + Description *string + + // A set of global filters used to exclude patches from the baseline. + GlobalFilters *types.PatchFilterGroup + + // The date when the patch baseline was last modified. + ModifiedDate *time.Time + + // The name of the patch baseline. + Name *string + + // The operating system rule used by the updated patch baseline. + OperatingSystem types.OperatingSystem + + // A list of explicitly rejected patches for the baseline. + RejectedPatches []string + + // The action specified to take on patches included in the RejectedPatches list. A + // patch can be allowed only if it is a dependency of another package, or blocked + // entirely along with packages that include it as a dependency. + RejectedPatchesAction types.PatchAction + + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. + Sources []types.PatchSource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdatePatchBaselineMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdatePatchBaseline{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdatePatchBaseline{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePatchBaseline"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdatePatchBaselineValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePatchBaseline(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdatePatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdatePatchBaseline", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go new file mode 100644 index 00000000000..e6d70e39147 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a resource data sync. After you create a resource data sync for a +// Region, you can't change the account options for that sync. For example, if you +// create a sync in the us-east-2 (Ohio) Region and you choose the Include only +// the current account option, you can't edit that sync later and choose the +// Include all accounts from my Organizations configuration option. Instead, you +// must delete the first resource data sync, and create a new one. +// +// This API operation only supports a resource data sync that was created with a +// SyncFromSource SyncType . +func (c *Client) UpdateResourceDataSync(ctx context.Context, params *UpdateResourceDataSyncInput, optFns ...func(*Options)) (*UpdateResourceDataSyncOutput, error) { + if params == nil { + params = &UpdateResourceDataSyncInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateResourceDataSync", params, optFns, c.addOperationUpdateResourceDataSyncMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateResourceDataSyncOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateResourceDataSyncInput struct { + + // The name of the resource data sync you want to update. + // + // This member is required. + SyncName *string + + // Specify information about the data sources to synchronize. + // + // This member is required. + SyncSource *types.ResourceDataSyncSource + + // The type of resource data sync. The supported SyncType is SyncFromSource. + // + // This member is required. + SyncType *string + + noSmithyDocumentSerde +} + +type UpdateResourceDataSyncOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateResourceDataSyncMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateResourceDataSync{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateResourceDataSync{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateResourceDataSync"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateResourceDataSyncValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateResourceDataSync(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateResourceDataSync", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go new file mode 100644 index 00000000000..41a6ef6ec0d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// ServiceSetting is an account-level setting for an Amazon Web Services service. +// This setting defines how a user interacts with or uses a service or a feature of +// a service. For example, if an Amazon Web Services service charges money to the +// account based on feature or service usage, then the Amazon Web Services service +// team might create a default setting of "false". This means the user can't use +// this feature unless they change the setting to "true" and intentionally opt in +// for a paid feature. +// +// Services map a SettingId object to a setting value. Amazon Web Services +// services teams define the default value for a SettingId . You can't create a new +// SettingId , but you can overwrite the default value if you have the +// ssm:UpdateServiceSetting permission for the setting. Use the GetServiceSetting API operation to +// view the current value. Or, use the ResetServiceSettingto change the value back to the original +// value defined by the Amazon Web Services service team. +// +// Update the service setting for the account. +func (c *Client) UpdateServiceSetting(ctx context.Context, params *UpdateServiceSettingInput, optFns ...func(*Options)) (*UpdateServiceSettingOutput, error) { + if params == nil { + params = &UpdateServiceSettingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateServiceSetting", params, optFns, c.addOperationUpdateServiceSettingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateServiceSettingOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request body of the UpdateServiceSetting API operation. +type UpdateServiceSettingInput struct { + + // The Amazon Resource Name (ARN) of the service setting to update. For example, + // arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled + // . The setting ID can be one of the following. + // + // - /ssm/appmanager/appmanager-enabled + // + // - /ssm/automation/customer-script-log-destination + // + // - /ssm/automation/customer-script-log-group-name + // + // - /ssm/automation/enable-adaptive-concurrency + // + // - /ssm/documents/console/public-sharing-permission + // + // - /ssm/managed-instance/activation-tier + // + // - /ssm/managed-instance/default-ec2-instance-management-role + // + // - /ssm/opsinsights/opscenter + // + // - /ssm/parameter-store/default-parameter-tier + // + // - /ssm/parameter-store/high-throughput-enabled + // + // Permissions to update the + // /ssm/managed-instance/default-ec2-instance-management-role setting should only + // be provided to administrators. Implement least privilege access when allowing + // individuals to configure or modify the Default Host Management Configuration. + // + // This member is required. + SettingId *string + + // The new value to specify for the service setting. The following list specifies + // the available values for each setting. + // + // - For /ssm/appmanager/appmanager-enabled , enter True or False . + // + // - For /ssm/automation/customer-script-log-destination , enter CloudWatch . + // + // - For /ssm/automation/customer-script-log-group-name , enter the name of an + // Amazon CloudWatch Logs log group. + // + // - For /ssm/documents/console/public-sharing-permission , enter Enable or + // Disable . + // + // - For /ssm/managed-instance/activation-tier , enter standard or advanced . + // + // - For /ssm/managed-instance/default-ec2-instance-management-role , enter the + // name of an IAM role. + // + // - For /ssm/opsinsights/opscenter , enter Enabled or Disabled . + // + // - For /ssm/parameter-store/default-parameter-tier , enter Standard , Advanced + // , or Intelligent-Tiering + // + // - For /ssm/parameter-store/high-throughput-enabled , enter true or false . + // + // This member is required. + SettingValue *string + + noSmithyDocumentSerde +} + +// The result body of the UpdateServiceSetting API operation. +type UpdateServiceSettingOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateServiceSettingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateServiceSetting{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateServiceSetting{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateServiceSetting"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateServiceSettingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateServiceSetting(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateServiceSetting(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateServiceSetting", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go new file mode 100644 index 00000000000..bda8e187f89 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go @@ -0,0 +1,345 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "slices" + "strings" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { + params.Region = options.Region + return nil +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { + params := &AuthResolverParameters{ + Operation: operation, + } + + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } + + return params, nil +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "ssm") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + sorted := sortAuthOptions(options, m.options.AuthSchemePreference) + for _, option := range sorted { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { + byPriority := make([]*smithyauth.Option, 0, len(options)) + for _, prefName := range preferred { + for _, option := range options { + optName := option.SchemeID + if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { + optName = parts[1] + } + if prefName == optName { + byPriority = append(byPriority, option) + } + } + } + for _, option := range options { + if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { + return o.SchemeID == option.SchemeID + }) { + byPriority = append(byPriority, option) + } + } + return byPriority +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go new file mode 100644 index 00000000000..0e10ca8980e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go @@ -0,0 +1,52262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "strings" +) + +type awsAwsjson11_deserializeOpAddTagsToResource struct { +} + +func (*awsAwsjson11_deserializeOpAddTagsToResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAddTagsToResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorAddTagsToResource(response, &metadata) + } + output := &AddTagsToResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentAddTagsToResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorAddTagsToResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + case strings.EqualFold("TooManyTagsError", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsError(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorAssociateOpsItemRelatedItem(response, &metadata) + } + output := &AssociateOpsItemRelatedItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentAssociateOpsItemRelatedItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorAssociateOpsItemRelatedItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemConflictException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + case strings.EqualFold("OpsItemRelatedItemAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemRelatedItemAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCancelCommand struct { +} + +func (*awsAwsjson11_deserializeOpCancelCommand) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCancelCommand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCancelCommand(response, &metadata) + } + output := &CancelCommandOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCancelCommandOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCancelCommand(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DuplicateInstanceId", errorCode): + return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution struct { +} + +func (*awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCancelMaintenanceWindowExecution(response, &metadata) + } + output := &CancelMaintenanceWindowExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCancelMaintenanceWindowExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCancelMaintenanceWindowExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateActivation struct { +} + +func (*awsAwsjson11_deserializeOpCreateActivation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateActivation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateActivation(response, &metadata) + } + output := &CreateActivationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateActivationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateActivation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateAssociation struct { +} + +func (*awsAwsjson11_deserializeOpCreateAssociation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateAssociation(response, &metadata) + } + output := &CreateAssociationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateAssociationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationAlreadyExists", errorCode): + return awsAwsjson11_deserializeErrorAssociationAlreadyExists(response, errorBody) + + case strings.EqualFold("AssociationLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorAssociationLimitExceeded(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidOutputLocation", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputLocation(response, errorBody) + + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + + case strings.EqualFold("InvalidSchedule", errorCode): + return awsAwsjson11_deserializeErrorInvalidSchedule(response, errorBody) + + case strings.EqualFold("InvalidTag", errorCode): + return awsAwsjson11_deserializeErrorInvalidTag(response, errorBody) + + case strings.EqualFold("InvalidTarget", errorCode): + return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) + + case strings.EqualFold("InvalidTargetMaps", errorCode): + return awsAwsjson11_deserializeErrorInvalidTargetMaps(response, errorBody) + + case strings.EqualFold("UnsupportedPlatformType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateAssociationBatch struct { +} + +func (*awsAwsjson11_deserializeOpCreateAssociationBatch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateAssociationBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateAssociationBatch(response, &metadata) + } + output := &CreateAssociationBatchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateAssociationBatchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateAssociationBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorAssociationLimitExceeded(response, errorBody) + + case strings.EqualFold("DuplicateInstanceId", errorCode): + return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidOutputLocation", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputLocation(response, errorBody) + + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + + case strings.EqualFold("InvalidSchedule", errorCode): + return awsAwsjson11_deserializeErrorInvalidSchedule(response, errorBody) + + case strings.EqualFold("InvalidTarget", errorCode): + return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) + + case strings.EqualFold("InvalidTargetMaps", errorCode): + return awsAwsjson11_deserializeErrorInvalidTargetMaps(response, errorBody) + + case strings.EqualFold("UnsupportedPlatformType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateDocument struct { +} + +func (*awsAwsjson11_deserializeOpCreateDocument) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateDocument(response, &metadata) + } + output := &CreateDocumentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateDocumentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DocumentAlreadyExists", errorCode): + return awsAwsjson11_deserializeErrorDocumentAlreadyExists(response, errorBody) + + case strings.EqualFold("DocumentLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorDocumentLimitExceeded(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocumentContent", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentContent(response, errorBody) + + case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) + + case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): + return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) + + case strings.EqualFold("NoLongerSupportedException", errorCode): + return awsAwsjson11_deserializeErrorNoLongerSupportedException(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpCreateMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateMaintenanceWindow(response, &metadata) + } + output := &CreateMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateOpsItem struct { +} + +func (*awsAwsjson11_deserializeOpCreateOpsItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateOpsItem(response, &metadata) + } + output := &CreateOpsItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateOpsItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + + case strings.EqualFold("OpsItemAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateOpsMetadata struct { +} + +func (*awsAwsjson11_deserializeOpCreateOpsMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateOpsMetadata(response, &metadata) + } + output := &CreateOpsMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateOpsMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsMetadataAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataAlreadyExistsException(response, errorBody) + + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + + case strings.EqualFold("OpsMetadataLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsMetadataTooManyUpdatesException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataTooManyUpdatesException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreatePatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpCreatePatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreatePatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreatePatchBaseline(response, &metadata) + } + output := &CreatePatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreatePatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreatePatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateResourceDataSync struct { +} + +func (*awsAwsjson11_deserializeOpCreateResourceDataSync) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateResourceDataSync(response, &metadata) + } + output := &CreateResourceDataSyncOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateResourceDataSyncOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceDataSyncAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncCountExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncCountExceededException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteActivation struct { +} + +func (*awsAwsjson11_deserializeOpDeleteActivation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteActivation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteActivation(response, &metadata) + } + output := &DeleteActivationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteActivationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteActivation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidActivation", errorCode): + return awsAwsjson11_deserializeErrorInvalidActivation(response, errorBody) + + case strings.EqualFold("InvalidActivationId", errorCode): + return awsAwsjson11_deserializeErrorInvalidActivationId(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteAssociation struct { +} + +func (*awsAwsjson11_deserializeOpDeleteAssociation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAssociation(response, &metadata) + } + output := &DeleteAssociationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteAssociationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDocument struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDocument) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDocument(response, &metadata) + } + output := &DeleteDocumentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteDocumentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociatedInstances", errorCode): + return awsAwsjson11_deserializeErrorAssociatedInstances(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentOperation", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteInventory struct { +} + +func (*awsAwsjson11_deserializeOpDeleteInventory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteInventory(response, &metadata) + } + output := &DeleteInventoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteInventoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDeleteInventoryParametersException", errorCode): + return awsAwsjson11_deserializeErrorInvalidDeleteInventoryParametersException(response, errorBody) + + case strings.EqualFold("InvalidInventoryRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInventoryRequestException(response, errorBody) + + case strings.EqualFold("InvalidOptionException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOptionException(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpDeleteMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMaintenanceWindow(response, &metadata) + } + output := &DeleteMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteOpsItem struct { +} + +func (*awsAwsjson11_deserializeOpDeleteOpsItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOpsItem(response, &metadata) + } + output := &DeleteOpsItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteOpsItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteOpsMetadata struct { +} + +func (*awsAwsjson11_deserializeOpDeleteOpsMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOpsMetadata(response, &metadata) + } + output := &DeleteOpsMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteOpsMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + + case strings.EqualFold("OpsMetadataNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteParameter struct { +} + +func (*awsAwsjson11_deserializeOpDeleteParameter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteParameter(response, &metadata) + } + output := &DeleteParameterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteParameterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteParameters struct { +} + +func (*awsAwsjson11_deserializeOpDeleteParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteParameters(response, &metadata) + } + output := &DeleteParametersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteParametersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeletePatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpDeletePatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeletePatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeletePatchBaseline(response, &metadata) + } + output := &DeletePatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeletePatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeletePatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteResourceDataSync struct { +} + +func (*awsAwsjson11_deserializeOpDeleteResourceDataSync) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourceDataSync(response, &metadata) + } + output := &DeleteResourceDataSyncOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteResourceDataSyncOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("MalformedResourcePolicyDocumentException", errorCode): + return awsAwsjson11_deserializeErrorMalformedResourcePolicyDocumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourcePolicyConflictException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyConflictException(response, errorBody) + + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourcePolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeregisterManagedInstance struct { +} + +func (*awsAwsjson11_deserializeOpDeregisterManagedInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeregisterManagedInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterManagedInstance(response, &metadata) + } + output := &DeregisterManagedInstanceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeregisterManagedInstanceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeregisterManagedInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup struct { +} + +func (*awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterPatchBaselineForPatchGroup(response, &metadata) + } + output := &DeregisterPatchBaselineForPatchGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeregisterPatchBaselineForPatchGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeregisterPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterTargetFromMaintenanceWindow(response, &metadata) + } + output := &DeregisterTargetFromMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeregisterTargetFromMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeregisterTargetFromMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("TargetInUseException", errorCode): + return awsAwsjson11_deserializeErrorTargetInUseException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterTaskFromMaintenanceWindow(response, &metadata) + } + output := &DeregisterTaskFromMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeregisterTaskFromMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeregisterTaskFromMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeActivations struct { +} + +func (*awsAwsjson11_deserializeOpDescribeActivations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeActivations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeActivations(response, &metadata) + } + output := &DescribeActivationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeActivationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeActivations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAssociation struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAssociation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAssociation(response, &metadata) + } + output := &DescribeAssociationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAssociationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAssociationVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidAssociationVersion(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAssociationExecutions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAssociationExecutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAssociationExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAssociationExecutions(response, &metadata) + } + output := &DescribeAssociationExecutionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAssociationExecutionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAssociationExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAssociationExecutionTargets(response, &metadata) + } + output := &DescribeAssociationExecutionTargetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAssociationExecutionTargetsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAssociationExecutionTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("AssociationExecutionDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationExecutionDoesNotExist(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAutomationExecutions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAutomationExecutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAutomationExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAutomationExecutions(response, &metadata) + } + output := &DescribeAutomationExecutionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAutomationExecutionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAutomationExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAutomationStepExecutions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAutomationStepExecutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAutomationStepExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAutomationStepExecutions(response, &metadata) + } + output := &DescribeAutomationStepExecutionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAutomationStepExecutionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAutomationStepExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAvailablePatches struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAvailablePatches) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAvailablePatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAvailablePatches(response, &metadata) + } + output := &DescribeAvailablePatchesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAvailablePatchesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAvailablePatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeDocument struct { +} + +func (*awsAwsjson11_deserializeOpDescribeDocument) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDocument(response, &metadata) + } + output := &DescribeDocumentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeDocumentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeDocumentPermission struct { +} + +func (*awsAwsjson11_deserializeOpDescribeDocumentPermission) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeDocumentPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDocumentPermission(response, &metadata) + } + output := &DescribeDocumentPermissionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeDocumentPermissionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeDocumentPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentOperation", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidPermissionType", errorCode): + return awsAwsjson11_deserializeErrorInvalidPermissionType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations struct { +} + +func (*awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEffectiveInstanceAssociations(response, &metadata) + } + output := &DescribeEffectiveInstanceAssociationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeEffectiveInstanceAssociationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeEffectiveInstanceAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEffectivePatchesForPatchBaseline(response, &metadata) + } + output := &DescribeEffectivePatchesForPatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeEffectivePatchesForPatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeEffectivePatchesForPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("UnsupportedOperatingSystem", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstanceAssociationsStatus(response, &metadata) + } + output := &DescribeInstanceAssociationsStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInstanceAssociationsStatusOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInstanceAssociationsStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInstanceInformation struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInstanceInformation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInstanceInformation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstanceInformation(response, &metadata) + } + output := &DescribeInstanceInformationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInstanceInformationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInstanceInformation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidInstanceInformationFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceInformationFilterValue(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInstancePatches struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInstancePatches) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInstancePatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstancePatches(response, &metadata) + } + output := &DescribeInstancePatchesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInstancePatchesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInstancePatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInstancePatchStates struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInstancePatchStates) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInstancePatchStates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstancePatchStates(response, &metadata) + } + output := &DescribeInstancePatchStatesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInstancePatchStatesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInstancePatchStates(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstancePatchStatesForPatchGroup(response, &metadata) + } + output := &DescribeInstancePatchStatesForPatchGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInstancePatchStatesForPatchGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInstancePatchStatesForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInstanceProperties struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInstanceProperties) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInstanceProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstanceProperties(response, &metadata) + } + output := &DescribeInstancePropertiesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInstancePropertiesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInstanceProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidActivationId", errorCode): + return awsAwsjson11_deserializeErrorInvalidActivationId(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidInstancePropertyFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstancePropertyFilterValue(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeInventoryDeletions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeInventoryDeletions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response, &metadata) + } + output := &DescribeInventoryDeletionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeInventoryDeletionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDeletionIdException", errorCode): + return awsAwsjson11_deserializeErrorInvalidDeletionIdException(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response, &metadata) + } + output := &DescribeMaintenanceWindowExecutionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvocations(response, &metadata) + } + output := &DescribeMaintenanceWindowExecutionTaskInvocationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTaskInvocationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(response, &metadata) + } + output := &DescribeMaintenanceWindowExecutionTasksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTasksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindows struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindows) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindows(response, &metadata) + } + output := &DescribeMaintenanceWindowsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindows(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(response, &metadata) + } + output := &DescribeMaintenanceWindowScheduleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowScheduleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(response, &metadata) + } + output := &DescribeMaintenanceWindowsForTargetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsForTargetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(response, &metadata) + } + output := &DescribeMaintenanceWindowTargetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTargetsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response, &metadata) + } + output := &DescribeMaintenanceWindowTasksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTasksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeOpsItems struct { +} + +func (*awsAwsjson11_deserializeOpDescribeOpsItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOpsItems(response, &metadata) + } + output := &DescribeOpsItemsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeOpsItemsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeOpsItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeParameters struct { +} + +func (*awsAwsjson11_deserializeOpDescribeParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeParameters(response, &metadata) + } + output := &DescribeParametersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeParametersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidFilterOption", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) + + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribePatchBaselines struct { +} + +func (*awsAwsjson11_deserializeOpDescribePatchBaselines) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchBaselines(response, &metadata) + } + output := &DescribePatchBaselinesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribePatchBaselinesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribePatchBaselines(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribePatchGroups struct { +} + +func (*awsAwsjson11_deserializeOpDescribePatchGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchGroups(response, &metadata) + } + output := &DescribePatchGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribePatchGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribePatchGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribePatchGroupState struct { +} + +func (*awsAwsjson11_deserializeOpDescribePatchGroupState) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribePatchGroupState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchGroupState(response, &metadata) + } + output := &DescribePatchGroupStateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribePatchGroupStateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribePatchGroupState(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribePatchProperties struct { +} + +func (*awsAwsjson11_deserializeOpDescribePatchProperties) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchProperties(response, &metadata) + } + output := &DescribePatchPropertiesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribePatchPropertiesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribePatchProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeSessions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeSessions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSessions(response, &metadata) + } + output := &DescribeSessionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeSessionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response, &metadata) + } + output := &DisassociateOpsItemRelatedItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDisassociateOpsItemRelatedItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemConflictException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + case strings.EqualFold("OpsItemRelatedItemAssociationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemRelatedItemAssociationNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetAccessToken struct { +} + +func (*awsAwsjson11_deserializeOpGetAccessToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetAccessToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetAccessToken(response, &metadata) + } + output := &GetAccessTokenOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetAccessTokenOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetAccessToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetAutomationExecution struct { +} + +func (*awsAwsjson11_deserializeOpGetAutomationExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetAutomationExecution(response, &metadata) + } + output := &GetAutomationExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetCalendarState struct { +} + +func (*awsAwsjson11_deserializeOpGetCalendarState) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetCalendarState(response, &metadata) + } + output := &GetCalendarStateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetCalendarStateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetCalendarState(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentType", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentType(response, errorBody) + + case strings.EqualFold("UnsupportedCalendarException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedCalendarException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetCommandInvocation struct { +} + +func (*awsAwsjson11_deserializeOpGetCommandInvocation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetCommandInvocation(response, &metadata) + } + output := &GetCommandInvocationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetCommandInvocationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidPluginName", errorCode): + return awsAwsjson11_deserializeErrorInvalidPluginName(response, errorBody) + + case strings.EqualFold("InvocationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorInvocationDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetConnectionStatus struct { +} + +func (*awsAwsjson11_deserializeOpGetConnectionStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetConnectionStatus(response, &metadata) + } + output := &GetConnectionStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetConnectionStatusOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDefaultPatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpGetDefaultPatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response, &metadata) + } + output := &GetDefaultPatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDefaultPatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance struct { +} + +func (*awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response, &metadata) + } + output := &GetDeployablePatchSnapshotForInstanceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDeployablePatchSnapshotForInstanceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("UnsupportedFeatureRequiredException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedFeatureRequiredException(response, errorBody) + + case strings.EqualFold("UnsupportedOperatingSystem", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDocument struct { +} + +func (*awsAwsjson11_deserializeOpGetDocument) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDocument(response, &metadata) + } + output := &GetDocumentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDocumentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetExecutionPreview struct { +} + +func (*awsAwsjson11_deserializeOpGetExecutionPreview) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetExecutionPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetExecutionPreview(response, &metadata) + } + output := &GetExecutionPreviewOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetExecutionPreviewOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetExecutionPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetInventory struct { +} + +func (*awsAwsjson11_deserializeOpGetInventory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetInventory(response, &metadata) + } + output := &GetInventoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetInventoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidInventoryGroupException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidResultAttributeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidResultAttributeException(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetInventorySchema struct { +} + +func (*awsAwsjson11_deserializeOpGetInventorySchema) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetInventorySchema(response, &metadata) + } + output := &GetInventorySchemaOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetInventorySchemaOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpGetMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response, &metadata) + } + output := &GetMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecution struct { +} + +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response, &metadata) + } + output := &GetMaintenanceWindowExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask struct { +} + +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response, &metadata) + } + output := &GetMaintenanceWindowExecutionTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation struct { +} + +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response, &metadata) + } + output := &GetMaintenanceWindowExecutionTaskInvocationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetMaintenanceWindowTask struct { +} + +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response, &metadata) + } + output := &GetMaintenanceWindowTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetOpsItem struct { +} + +func (*awsAwsjson11_deserializeOpGetOpsItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsItem(response, &metadata) + } + output := &GetOpsItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetOpsItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetOpsMetadata struct { +} + +func (*awsAwsjson11_deserializeOpGetOpsMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsMetadata(response, &metadata) + } + output := &GetOpsMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetOpsMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + + case strings.EqualFold("OpsMetadataNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetOpsSummary struct { +} + +func (*awsAwsjson11_deserializeOpGetOpsSummary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsSummary(response, &metadata) + } + output := &GetOpsSummaryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetOpsSummaryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetParameter struct { +} + +func (*awsAwsjson11_deserializeOpGetParameter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameter(response, &metadata) + } + output := &GetParameterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetParameterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetParameterHistory struct { +} + +func (*awsAwsjson11_deserializeOpGetParameterHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameterHistory(response, &metadata) + } + output := &GetParameterHistoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetParameterHistoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetParameters struct { +} + +func (*awsAwsjson11_deserializeOpGetParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameters(response, &metadata) + } + output := &GetParametersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetParametersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetParametersByPath struct { +} + +func (*awsAwsjson11_deserializeOpGetParametersByPath) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetParametersByPath(response, &metadata) + } + output := &GetParametersByPathOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetParametersByPathOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidFilterOption", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) + + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetPatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpGetPatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaseline(response, &metadata) + } + output := &GetPatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup struct { +} + +func (*awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response, &metadata) + } + output := &GetPatchBaselineForPatchGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineForPatchGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetResourcePolicies struct { +} + +func (*awsAwsjson11_deserializeOpGetResourcePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetResourcePolicies(response, &metadata) + } + output := &GetResourcePoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetResourcePoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetServiceSetting struct { +} + +func (*awsAwsjson11_deserializeOpGetServiceSetting) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetServiceSetting(response, &metadata) + } + output := &GetServiceSettingOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetServiceSettingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ServiceSettingNotFound", errorCode): + return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpLabelParameterVersion struct { +} + +func (*awsAwsjson11_deserializeOpLabelParameterVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorLabelParameterVersion(response, &metadata) + } + output := &LabelParameterVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentLabelParameterVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorLabelParameterVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + case strings.EqualFold("ParameterVersionLabelLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionLabelLimitExceeded(response, errorBody) + + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListAssociations struct { +} + +func (*awsAwsjson11_deserializeOpListAssociations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListAssociations(response, &metadata) + } + output := &ListAssociationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListAssociationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListAssociationVersions struct { +} + +func (*awsAwsjson11_deserializeOpListAssociationVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListAssociationVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListAssociationVersions(response, &metadata) + } + output := &ListAssociationVersionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListAssociationVersionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListAssociationVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListCommandInvocations struct { +} + +func (*awsAwsjson11_deserializeOpListCommandInvocations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListCommandInvocations(response, &metadata) + } + output := &ListCommandInvocationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListCommandInvocationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListCommandInvocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListCommands struct { +} + +func (*awsAwsjson11_deserializeOpListCommands) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListCommands(response, &metadata) + } + output := &ListCommandsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListCommandsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListCommands(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListComplianceItems struct { +} + +func (*awsAwsjson11_deserializeOpListComplianceItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListComplianceItems(response, &metadata) + } + output := &ListComplianceItemsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListComplianceItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListComplianceSummaries struct { +} + +func (*awsAwsjson11_deserializeOpListComplianceSummaries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListComplianceSummaries(response, &metadata) + } + output := &ListComplianceSummariesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListComplianceSummariesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListComplianceSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListDocumentMetadataHistory struct { +} + +func (*awsAwsjson11_deserializeOpListDocumentMetadataHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response, &metadata) + } + output := &ListDocumentMetadataHistoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListDocuments struct { +} + +func (*awsAwsjson11_deserializeOpListDocuments) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListDocuments(response, &metadata) + } + output := &ListDocumentsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListDocumentsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListDocuments(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListDocumentVersions struct { +} + +func (*awsAwsjson11_deserializeOpListDocumentVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListDocumentVersions(response, &metadata) + } + output := &ListDocumentVersionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListDocumentVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListInventoryEntries struct { +} + +func (*awsAwsjson11_deserializeOpListInventoryEntries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListInventoryEntries(response, &metadata) + } + output := &ListInventoryEntriesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListInventoryEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListNodes struct { +} + +func (*awsAwsjson11_deserializeOpListNodes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListNodes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListNodes(response, &metadata) + } + output := &ListNodesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListNodesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListNodes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListNodesSummary struct { +} + +func (*awsAwsjson11_deserializeOpListNodesSummary) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListNodesSummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListNodesSummary(response, &metadata) + } + output := &ListNodesSummaryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListNodesSummaryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListNodesSummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListOpsItemEvents struct { +} + +func (*awsAwsjson11_deserializeOpListOpsItemEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemEvents(response, &metadata) + } + output := &ListOpsItemEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListOpsItemRelatedItems struct { +} + +func (*awsAwsjson11_deserializeOpListOpsItemRelatedItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response, &metadata) + } + output := &ListOpsItemRelatedItemsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListOpsMetadata struct { +} + +func (*awsAwsjson11_deserializeOpListOpsMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsMetadata(response, &metadata) + } + output := &ListOpsMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListResourceComplianceSummaries struct { +} + +func (*awsAwsjson11_deserializeOpListResourceComplianceSummaries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response, &metadata) + } + output := &ListResourceComplianceSummariesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListResourceComplianceSummariesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListResourceDataSync struct { +} + +func (*awsAwsjson11_deserializeOpListResourceDataSync) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceDataSync(response, &metadata) + } + output := &ListResourceDataSyncOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListResourceDataSyncOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpModifyDocumentPermission struct { +} + +func (*awsAwsjson11_deserializeOpModifyDocumentPermission) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response, &metadata) + } + output := &ModifyDocumentPermissionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentModifyDocumentPermissionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DocumentLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorDocumentLimitExceeded(response, errorBody) + + case strings.EqualFold("DocumentPermissionLimit", errorCode): + return awsAwsjson11_deserializeErrorDocumentPermissionLimit(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidPermissionType", errorCode): + return awsAwsjson11_deserializeErrorInvalidPermissionType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutComplianceItems struct { +} + +func (*awsAwsjson11_deserializeOpPutComplianceItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutComplianceItems(response, &metadata) + } + output := &PutComplianceItemsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutComplianceItemsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ComplianceTypeCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorComplianceTypeCountLimitExceededException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidItemContentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + case strings.EqualFold("ItemSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("TotalSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutInventory struct { +} + +func (*awsAwsjson11_deserializeOpPutInventory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutInventory(response, &metadata) + } + output := &PutInventoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutInventoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("CustomSchemaCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorCustomSchemaCountLimitExceededException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidInventoryItemContextException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInventoryItemContextException(response, errorBody) + + case strings.EqualFold("InvalidItemContentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + case strings.EqualFold("ItemContentMismatchException", errorCode): + return awsAwsjson11_deserializeErrorItemContentMismatchException(response, errorBody) + + case strings.EqualFold("ItemSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("SubTypeCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorSubTypeCountLimitExceededException(response, errorBody) + + case strings.EqualFold("TotalSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("UnsupportedInventoryItemContextException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedInventoryItemContextException(response, errorBody) + + case strings.EqualFold("UnsupportedInventorySchemaVersionException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedInventorySchemaVersionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutParameter struct { +} + +func (*awsAwsjson11_deserializeOpPutParameter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutParameter(response, &metadata) + } + output := &PutParameterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutParameterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("HierarchyLevelLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorHierarchyLevelLimitExceededException(response, errorBody) + + case strings.EqualFold("HierarchyTypeMismatchException", errorCode): + return awsAwsjson11_deserializeErrorHierarchyTypeMismatchException(response, errorBody) + + case strings.EqualFold("IncompatiblePolicyException", errorCode): + return awsAwsjson11_deserializeErrorIncompatiblePolicyException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAllowedPatternException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAllowedPatternException(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidPolicyAttributeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPolicyAttributeException(response, errorBody) + + case strings.EqualFold("InvalidPolicyTypeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPolicyTypeException(response, errorBody) + + case strings.EqualFold("ParameterAlreadyExists", errorCode): + return awsAwsjson11_deserializeErrorParameterAlreadyExists(response, errorBody) + + case strings.EqualFold("ParameterLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorParameterLimitExceeded(response, errorBody) + + case strings.EqualFold("ParameterMaxVersionLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorParameterMaxVersionLimitExceeded(response, errorBody) + + case strings.EqualFold("ParameterPatternMismatchException", errorCode): + return awsAwsjson11_deserializeErrorParameterPatternMismatchException(response, errorBody) + + case strings.EqualFold("PoliciesLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorPoliciesLimitExceededException(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + case strings.EqualFold("UnsupportedParameterType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedParameterType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) + } + output := &PutResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("MalformedResourcePolicyDocumentException", errorCode): + return awsAwsjson11_deserializeErrorMalformedResourcePolicyDocumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourcePolicyConflictException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyConflictException(response, errorBody) + + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourcePolicyLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourcePolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response, &metadata) + } + output := &RegisterDefaultPatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup struct { +} + +func (*awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response, &metadata) + } + output := &RegisterPatchBaselineForPatchGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRegisterPatchBaselineForPatchGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response, &metadata) + } + output := &RegisterTargetWithMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRegisterTargetWithMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response, &metadata) + } + output := &RegisterTaskWithMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRegisterTaskWithMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("FeatureNotAvailableException", errorCode): + return awsAwsjson11_deserializeErrorFeatureNotAvailableException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRemoveTagsFromResource struct { +} + +func (*awsAwsjson11_deserializeOpRemoveTagsFromResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response, &metadata) + } + output := &RemoveTagsFromResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRemoveTagsFromResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpResetServiceSetting struct { +} + +func (*awsAwsjson11_deserializeOpResetServiceSetting) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorResetServiceSetting(response, &metadata) + } + output := &ResetServiceSettingOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentResetServiceSettingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ServiceSettingNotFound", errorCode): + return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpResumeSession struct { +} + +func (*awsAwsjson11_deserializeOpResumeSession) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorResumeSession(response, &metadata) + } + output := &ResumeSessionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentResumeSessionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorResumeSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpSendAutomationSignal struct { +} + +func (*awsAwsjson11_deserializeOpSendAutomationSignal) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorSendAutomationSignal(response, &metadata) + } + output := &SendAutomationSignalOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentSendAutomationSignalOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationStepNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationStepNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAutomationSignalException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationSignalException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpSendCommand struct { +} + +func (*awsAwsjson11_deserializeOpSendCommand) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorSendCommand(response, &metadata) + } + output := &SendCommandOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentSendCommandOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DuplicateInstanceId", errorCode): + return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidNotificationConfig", errorCode): + return awsAwsjson11_deserializeErrorInvalidNotificationConfig(response, errorBody) + + case strings.EqualFold("InvalidOutputFolder", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputFolder(response, errorBody) + + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + + case strings.EqualFold("InvalidRole", errorCode): + return awsAwsjson11_deserializeErrorInvalidRole(response, errorBody) + + case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): + return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) + + case strings.EqualFold("UnsupportedPlatformType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartAccessRequest struct { +} + +func (*awsAwsjson11_deserializeOpStartAccessRequest) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartAccessRequest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartAccessRequest(response, &metadata) + } + output := &StartAccessRequestOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartAccessRequestOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartAccessRequest(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartAssociationsOnce struct { +} + +func (*awsAwsjson11_deserializeOpStartAssociationsOnce) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response, &metadata) + } + output := &StartAssociationsOnceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartAssociationsOnceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("InvalidAssociation", errorCode): + return awsAwsjson11_deserializeErrorInvalidAssociation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartAutomationExecution struct { +} + +func (*awsAwsjson11_deserializeOpStartAutomationExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartAutomationExecution(response, &metadata) + } + output := &StartAutomationExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartAutomationExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationDefinitionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationDefinitionVersionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationExecutionLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAutomationExecutionParametersException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response, errorBody) + + case strings.EqualFold("InvalidTarget", errorCode): + return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartChangeRequestExecution struct { +} + +func (*awsAwsjson11_deserializeOpStartChangeRequestExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response, &metadata) + } + output := &StartChangeRequestExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartChangeRequestExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationDefinitionNotApprovedException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionNotApprovedException(response, errorBody) + + case strings.EqualFold("AutomationDefinitionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationDefinitionVersionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationExecutionLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAutomationExecutionParametersException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response, errorBody) + + case strings.EqualFold("NoLongerSupportedException", errorCode): + return awsAwsjson11_deserializeErrorNoLongerSupportedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartExecutionPreview struct { +} + +func (*awsAwsjson11_deserializeOpStartExecutionPreview) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartExecutionPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartExecutionPreview(response, &metadata) + } + output := &StartExecutionPreviewOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartExecutionPreviewOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartExecutionPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartSession struct { +} + +func (*awsAwsjson11_deserializeOpStartSession) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartSession(response, &metadata) + } + output := &StartSessionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartSessionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("TargetNotConnected", errorCode): + return awsAwsjson11_deserializeErrorTargetNotConnected(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStopAutomationExecution struct { +} + +func (*awsAwsjson11_deserializeOpStopAutomationExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopAutomationExecution(response, &metadata) + } + output := &StopAutomationExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopAutomationExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStopAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAutomationStatusUpdateException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationStatusUpdateException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpTerminateSession struct { +} + +func (*awsAwsjson11_deserializeOpTerminateSession) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpTerminateSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorTerminateSession(response, &metadata) + } + output := &TerminateSessionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentTerminateSessionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorTerminateSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUnlabelParameterVersion struct { +} + +func (*awsAwsjson11_deserializeOpUnlabelParameterVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response, &metadata) + } + output := &UnlabelParameterVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUnlabelParameterVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateAssociation struct { +} + +func (*awsAwsjson11_deserializeOpUpdateAssociation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssociation(response, &metadata) + } + output := &UpdateAssociationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateAssociationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("AssociationVersionLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorAssociationVersionLimitExceeded(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAssociationVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidAssociationVersion(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("InvalidOutputLocation", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputLocation(response, errorBody) + + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + + case strings.EqualFold("InvalidSchedule", errorCode): + return awsAwsjson11_deserializeErrorInvalidSchedule(response, errorBody) + + case strings.EqualFold("InvalidTarget", errorCode): + return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) + + case strings.EqualFold("InvalidTargetMaps", errorCode): + return awsAwsjson11_deserializeErrorInvalidTargetMaps(response, errorBody) + + case strings.EqualFold("InvalidUpdate", errorCode): + return awsAwsjson11_deserializeErrorInvalidUpdate(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateAssociationStatus struct { +} + +func (*awsAwsjson11_deserializeOpUpdateAssociationStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response, &metadata) + } + output := &UpdateAssociationStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateAssociationStatusOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("StatusUnchanged", errorCode): + return awsAwsjson11_deserializeErrorStatusUnchanged(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateDocument struct { +} + +func (*awsAwsjson11_deserializeOpUpdateDocument) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocument(response, &metadata) + } + output := &UpdateDocumentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateDocumentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DocumentVersionLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorDocumentVersionLimitExceeded(response, errorBody) + + case strings.EqualFold("DuplicateDocumentContent", errorCode): + return awsAwsjson11_deserializeErrorDuplicateDocumentContent(response, errorBody) + + case strings.EqualFold("DuplicateDocumentVersionName", errorCode): + return awsAwsjson11_deserializeErrorDuplicateDocumentVersionName(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentContent", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentContent(response, errorBody) + + case strings.EqualFold("InvalidDocumentOperation", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + + case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): + return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion struct { +} + +func (*awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response, &metadata) + } + output := &UpdateDocumentDefaultVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateDocumentDefaultVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateDocumentMetadata struct { +} + +func (*awsAwsjson11_deserializeOpUpdateDocumentMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response, &metadata) + } + output := &UpdateDocumentMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateDocumentMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentOperation", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response, &metadata) + } + output := &UpdateMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget struct { +} + +func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(response, &metadata) + } + output := &UpdateMaintenanceWindowTargetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTargetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask struct { +} + +func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response, &metadata) + } + output := &UpdateMaintenanceWindowTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateManagedInstanceRole struct { +} + +func (*awsAwsjson11_deserializeOpUpdateManagedInstanceRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response, &metadata) + } + output := &UpdateManagedInstanceRoleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateManagedInstanceRoleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateOpsItem struct { +} + +func (*awsAwsjson11_deserializeOpUpdateOpsItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOpsItem(response, &metadata) + } + output := &UpdateOpsItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateOpsItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + + case strings.EqualFold("OpsItemAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response, errorBody) + + case strings.EqualFold("OpsItemConflictException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateOpsMetadata struct { +} + +func (*awsAwsjson11_deserializeOpUpdateOpsMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOpsMetadata(response, &metadata) + } + output := &UpdateOpsMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateOpsMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + + case strings.EqualFold("OpsMetadataKeyLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataKeyLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsMetadataNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) + + case strings.EqualFold("OpsMetadataTooManyUpdatesException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataTooManyUpdatesException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdatePatchBaseline struct { +} + +func (*awsAwsjson11_deserializeOpUpdatePatchBaseline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdatePatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePatchBaseline(response, &metadata) + } + output := &UpdatePatchBaselineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdatePatchBaselineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdatePatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateResourceDataSync struct { +} + +func (*awsAwsjson11_deserializeOpUpdateResourceDataSync) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateResourceDataSync(response, &metadata) + } + output := &UpdateResourceDataSyncOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateResourceDataSyncOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceDataSyncConflictException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncConflictException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateServiceSetting struct { +} + +func (*awsAwsjson11_deserializeOpUpdateServiceSetting) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateServiceSetting(response, &metadata) + } + output := &UpdateServiceSettingOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateServiceSettingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ServiceSettingNotFound", errorCode): + return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccessDeniedException{} + err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAssociatedInstances(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AssociatedInstances{} + err := awsAwsjson11_deserializeDocumentAssociatedInstances(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAssociationAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AssociationAlreadyExists{} + err := awsAwsjson11_deserializeDocumentAssociationAlreadyExists(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAssociationDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AssociationDoesNotExist{} + err := awsAwsjson11_deserializeDocumentAssociationDoesNotExist(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAssociationExecutionDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AssociationExecutionDoesNotExist{} + err := awsAwsjson11_deserializeDocumentAssociationExecutionDoesNotExist(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAssociationLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AssociationLimitExceeded{} + err := awsAwsjson11_deserializeDocumentAssociationLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAssociationVersionLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AssociationVersionLimitExceeded{} + err := awsAwsjson11_deserializeDocumentAssociationVersionLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAutomationDefinitionNotApprovedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AutomationDefinitionNotApprovedException{} + err := awsAwsjson11_deserializeDocumentAutomationDefinitionNotApprovedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AutomationDefinitionNotFoundException{} + err := awsAwsjson11_deserializeDocumentAutomationDefinitionNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AutomationDefinitionVersionNotFoundException{} + err := awsAwsjson11_deserializeDocumentAutomationDefinitionVersionNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AutomationExecutionLimitExceededException{} + err := awsAwsjson11_deserializeDocumentAutomationExecutionLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AutomationExecutionNotFoundException{} + err := awsAwsjson11_deserializeDocumentAutomationExecutionNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAutomationStepNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AutomationStepNotFoundException{} + err := awsAwsjson11_deserializeDocumentAutomationStepNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorComplianceTypeCountLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ComplianceTypeCountLimitExceededException{} + err := awsAwsjson11_deserializeDocumentComplianceTypeCountLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorCustomSchemaCountLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.CustomSchemaCountLimitExceededException{} + err := awsAwsjson11_deserializeDocumentCustomSchemaCountLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDocumentAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DocumentAlreadyExists{} + err := awsAwsjson11_deserializeDocumentDocumentAlreadyExists(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDocumentLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DocumentLimitExceeded{} + err := awsAwsjson11_deserializeDocumentDocumentLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDocumentPermissionLimit(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DocumentPermissionLimit{} + err := awsAwsjson11_deserializeDocumentDocumentPermissionLimit(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDocumentVersionLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DocumentVersionLimitExceeded{} + err := awsAwsjson11_deserializeDocumentDocumentVersionLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DoesNotExistException{} + err := awsAwsjson11_deserializeDocumentDoesNotExistException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDuplicateDocumentContent(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DuplicateDocumentContent{} + err := awsAwsjson11_deserializeDocumentDuplicateDocumentContent(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDuplicateDocumentVersionName(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DuplicateDocumentVersionName{} + err := awsAwsjson11_deserializeDocumentDuplicateDocumentVersionName(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDuplicateInstanceId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DuplicateInstanceId{} + err := awsAwsjson11_deserializeDocumentDuplicateInstanceId(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorFeatureNotAvailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.FeatureNotAvailableException{} + err := awsAwsjson11_deserializeDocumentFeatureNotAvailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorHierarchyLevelLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.HierarchyLevelLimitExceededException{} + err := awsAwsjson11_deserializeDocumentHierarchyLevelLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorHierarchyTypeMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.HierarchyTypeMismatchException{} + err := awsAwsjson11_deserializeDocumentHierarchyTypeMismatchException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.IdempotentParameterMismatch{} + err := awsAwsjson11_deserializeDocumentIdempotentParameterMismatch(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorIncompatiblePolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.IncompatiblePolicyException{} + err := awsAwsjson11_deserializeDocumentIncompatiblePolicyException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInternalServerError(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerError{} + err := awsAwsjson11_deserializeDocumentInternalServerError(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidActivation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidActivation{} + err := awsAwsjson11_deserializeDocumentInvalidActivation(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidActivationId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidActivationId{} + err := awsAwsjson11_deserializeDocumentInvalidActivationId(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAggregatorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAggregatorException{} + err := awsAwsjson11_deserializeDocumentInvalidAggregatorException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAllowedPatternException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAllowedPatternException{} + err := awsAwsjson11_deserializeDocumentInvalidAllowedPatternException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAssociation{} + err := awsAwsjson11_deserializeDocumentInvalidAssociation(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAssociationVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAssociationVersion{} + err := awsAwsjson11_deserializeDocumentInvalidAssociationVersion(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAutomationExecutionParametersException{} + err := awsAwsjson11_deserializeDocumentInvalidAutomationExecutionParametersException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAutomationSignalException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAutomationSignalException{} + err := awsAwsjson11_deserializeDocumentInvalidAutomationSignalException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidAutomationStatusUpdateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidAutomationStatusUpdateException{} + err := awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidCommandId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidCommandId{} + err := awsAwsjson11_deserializeDocumentInvalidCommandId(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDeleteInventoryParametersException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDeleteInventoryParametersException{} + err := awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDeletionIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDeletionIdException{} + err := awsAwsjson11_deserializeDocumentInvalidDeletionIdException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDocument(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDocument{} + err := awsAwsjson11_deserializeDocumentInvalidDocument(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDocumentContent(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDocumentContent{} + err := awsAwsjson11_deserializeDocumentInvalidDocumentContent(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDocumentOperation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDocumentOperation{} + err := awsAwsjson11_deserializeDocumentInvalidDocumentOperation(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDocumentSchemaVersion{} + err := awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDocumentType(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDocumentType{} + err := awsAwsjson11_deserializeDocumentInvalidDocumentType(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidDocumentVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidDocumentVersion{} + err := awsAwsjson11_deserializeDocumentInvalidDocumentVersion(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidFilter(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidFilter{} + err := awsAwsjson11_deserializeDocumentInvalidFilter(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidFilterKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidFilterKey{} + err := awsAwsjson11_deserializeDocumentInvalidFilterKey(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidFilterOption(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidFilterOption{} + err := awsAwsjson11_deserializeDocumentInvalidFilterOption(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidFilterValue(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidFilterValue{} + err := awsAwsjson11_deserializeDocumentInvalidFilterValue(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInstanceId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInstanceId{} + err := awsAwsjson11_deserializeDocumentInvalidInstanceId(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInstanceInformationFilterValue(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInstanceInformationFilterValue{} + err := awsAwsjson11_deserializeDocumentInvalidInstanceInformationFilterValue(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInstancePropertyFilterValue(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInstancePropertyFilterValue{} + err := awsAwsjson11_deserializeDocumentInvalidInstancePropertyFilterValue(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInventoryGroupException{} + err := awsAwsjson11_deserializeDocumentInvalidInventoryGroupException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInventoryItemContextException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInventoryItemContextException{} + err := awsAwsjson11_deserializeDocumentInvalidInventoryItemContextException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInventoryRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInventoryRequestException{} + err := awsAwsjson11_deserializeDocumentInvalidInventoryRequestException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidItemContentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidItemContentException{} + err := awsAwsjson11_deserializeDocumentInvalidItemContentException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidKeyId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidKeyId{} + err := awsAwsjson11_deserializeDocumentInvalidKeyId(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidNextToken(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidNextToken{} + err := awsAwsjson11_deserializeDocumentInvalidNextToken(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidNotificationConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidNotificationConfig{} + err := awsAwsjson11_deserializeDocumentInvalidNotificationConfig(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidOptionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidOptionException{} + err := awsAwsjson11_deserializeDocumentInvalidOptionException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidOutputFolder(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidOutputFolder{} + err := awsAwsjson11_deserializeDocumentInvalidOutputFolder(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidOutputLocation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidOutputLocation{} + err := awsAwsjson11_deserializeDocumentInvalidOutputLocation(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidParameters{} + err := awsAwsjson11_deserializeDocumentInvalidParameters(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidPermissionType(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidPermissionType{} + err := awsAwsjson11_deserializeDocumentInvalidPermissionType(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidPluginName(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidPluginName{} + err := awsAwsjson11_deserializeDocumentInvalidPluginName(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidPolicyAttributeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidPolicyAttributeException{} + err := awsAwsjson11_deserializeDocumentInvalidPolicyAttributeException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidPolicyTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidPolicyTypeException{} + err := awsAwsjson11_deserializeDocumentInvalidPolicyTypeException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidResourceId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidResourceId{} + err := awsAwsjson11_deserializeDocumentInvalidResourceId(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidResourceType(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidResourceType{} + err := awsAwsjson11_deserializeDocumentInvalidResourceType(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidResultAttributeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidResultAttributeException{} + err := awsAwsjson11_deserializeDocumentInvalidResultAttributeException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidRole(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidRole{} + err := awsAwsjson11_deserializeDocumentInvalidRole(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidSchedule(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidSchedule{} + err := awsAwsjson11_deserializeDocumentInvalidSchedule(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidTag(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidTag{} + err := awsAwsjson11_deserializeDocumentInvalidTag(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidTarget(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidTarget{} + err := awsAwsjson11_deserializeDocumentInvalidTarget(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidTargetMaps(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidTargetMaps{} + err := awsAwsjson11_deserializeDocumentInvalidTargetMaps(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidTypeNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidTypeNameException{} + err := awsAwsjson11_deserializeDocumentInvalidTypeNameException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidUpdate(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidUpdate{} + err := awsAwsjson11_deserializeDocumentInvalidUpdate(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvocationDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvocationDoesNotExist{} + err := awsAwsjson11_deserializeDocumentInvocationDoesNotExist(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorItemContentMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ItemContentMismatchException{} + err := awsAwsjson11_deserializeDocumentItemContentMismatchException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ItemSizeLimitExceededException{} + err := awsAwsjson11_deserializeDocumentItemSizeLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorMalformedResourcePolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.MalformedResourcePolicyDocumentException{} + err := awsAwsjson11_deserializeDocumentMalformedResourcePolicyDocumentException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.MaxDocumentSizeExceeded{} + err := awsAwsjson11_deserializeDocumentMaxDocumentSizeExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorNoLongerSupportedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.NoLongerSupportedException{} + err := awsAwsjson11_deserializeDocumentNoLongerSupportedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemAccessDeniedException{} + err := awsAwsjson11_deserializeDocumentOpsItemAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentOpsItemAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemConflictException{} + err := awsAwsjson11_deserializeDocumentOpsItemConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemInvalidParameterException{} + err := awsAwsjson11_deserializeDocumentOpsItemInvalidParameterException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemLimitExceededException{} + err := awsAwsjson11_deserializeDocumentOpsItemLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemNotFoundException{} + err := awsAwsjson11_deserializeDocumentOpsItemNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemRelatedItemAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemRelatedItemAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsItemRelatedItemAssociationNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsItemRelatedItemAssociationNotFoundException{} + err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemAssociationNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsMetadataAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsMetadataAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentOpsMetadataAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsMetadataInvalidArgumentException{} + err := awsAwsjson11_deserializeDocumentOpsMetadataInvalidArgumentException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsMetadataKeyLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsMetadataKeyLimitExceededException{} + err := awsAwsjson11_deserializeDocumentOpsMetadataKeyLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsMetadataLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsMetadataLimitExceededException{} + err := awsAwsjson11_deserializeDocumentOpsMetadataLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsMetadataNotFoundException{} + err := awsAwsjson11_deserializeDocumentOpsMetadataNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOpsMetadataTooManyUpdatesException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OpsMetadataTooManyUpdatesException{} + err := awsAwsjson11_deserializeDocumentOpsMetadataTooManyUpdatesException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterAlreadyExists{} + err := awsAwsjson11_deserializeDocumentParameterAlreadyExists(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterLimitExceeded{} + err := awsAwsjson11_deserializeDocumentParameterLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterMaxVersionLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterMaxVersionLimitExceeded{} + err := awsAwsjson11_deserializeDocumentParameterMaxVersionLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterNotFound{} + err := awsAwsjson11_deserializeDocumentParameterNotFound(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterPatternMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterPatternMismatchException{} + err := awsAwsjson11_deserializeDocumentParameterPatternMismatchException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterVersionLabelLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterVersionLabelLimitExceeded{} + err := awsAwsjson11_deserializeDocumentParameterVersionLabelLimitExceeded(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorParameterVersionNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ParameterVersionNotFound{} + err := awsAwsjson11_deserializeDocumentParameterVersionNotFound(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorPoliciesLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.PoliciesLimitExceededException{} + err := awsAwsjson11_deserializeDocumentPoliciesLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceDataSyncAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceDataSyncAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentResourceDataSyncAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceDataSyncConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceDataSyncConflictException{} + err := awsAwsjson11_deserializeDocumentResourceDataSyncConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceDataSyncCountExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceDataSyncCountExceededException{} + err := awsAwsjson11_deserializeDocumentResourceDataSyncCountExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceDataSyncInvalidConfigurationException{} + err := awsAwsjson11_deserializeDocumentResourceDataSyncInvalidConfigurationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceDataSyncNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceDataSyncNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceInUseException{} + err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceLimitExceededException{} + err := awsAwsjson11_deserializeDocumentResourceLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourcePolicyConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourcePolicyConflictException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourcePolicyInvalidParameterException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyInvalidParameterException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourcePolicyLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourcePolicyLimitExceededException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourcePolicyNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourcePolicyNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson11_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorServiceSettingNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceSettingNotFound{} + err := awsAwsjson11_deserializeDocumentServiceSettingNotFound(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorStatusUnchanged(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.StatusUnchanged{} + err := awsAwsjson11_deserializeDocumentStatusUnchanged(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorSubTypeCountLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.SubTypeCountLimitExceededException{} + err := awsAwsjson11_deserializeDocumentSubTypeCountLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTargetInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TargetInUseException{} + err := awsAwsjson11_deserializeDocumentTargetInUseException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTargetNotConnected(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TargetNotConnected{} + err := awsAwsjson11_deserializeDocumentTargetNotConnected(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson11_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTooManyTagsError(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TooManyTagsError{} + err := awsAwsjson11_deserializeDocumentTooManyTagsError(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTooManyUpdates(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TooManyUpdates{} + err := awsAwsjson11_deserializeDocumentTooManyUpdates(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TotalSizeLimitExceededException{} + err := awsAwsjson11_deserializeDocumentTotalSizeLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedCalendarException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedCalendarException{} + err := awsAwsjson11_deserializeDocumentUnsupportedCalendarException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedFeatureRequiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedFeatureRequiredException{} + err := awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedInventoryItemContextException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedInventoryItemContextException{} + err := awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedInventorySchemaVersionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedInventorySchemaVersionException{} + err := awsAwsjson11_deserializeDocumentUnsupportedInventorySchemaVersionException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedOperatingSystem{} + err := awsAwsjson11_deserializeDocumentUnsupportedOperatingSystem(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedOperationException{} + err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedParameterType(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedParameterType{} + err := awsAwsjson11_deserializeDocumentUnsupportedParameterType(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedPlatformType(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedPlatformType{} + err := awsAwsjson11_deserializeDocumentUnsupportedPlatformType(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAccountIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAccounts(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Account to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAccountSharingInfo(v **types.AccountSharingInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountSharingInfo + if *v == nil { + sv = &types.AccountSharingInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "SharedDocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SharedDocumentVersion to be of type string, got %T instead", value) + } + sv.SharedDocumentVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAccountSharingInfoList(v *[]types.AccountSharingInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AccountSharingInfo + if *v == nil { + cv = []types.AccountSharingInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccountSharingInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAccountSharingInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentActivation(v **types.Activation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Activation + if *v == nil { + sv = &types.Activation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationId to be of type string, got %T instead", value) + } + sv.ActivationId = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedDate to be a JSON Number, got %T instead", value) + + } + } + + case "DefaultInstanceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DefaultInstanceName to be of type string, got %T instead", value) + } + sv.DefaultInstanceName = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "ExpirationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpirationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ExpirationDate to be a JSON Number, got %T instead", value) + + } + } + + case "Expired": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Expired = jtv + } + + case "IamRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRole to be of type string, got %T instead", value) + } + sv.IamRole = ptr.String(jtv) + } + + case "RegistrationLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RegistrationLimit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RegistrationLimit = ptr.Int32(int32(i64)) + } + + case "RegistrationsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RegistrationsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RegistrationsCount = ptr.Int32(int32(i64)) + } + + case "Tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentActivationList(v *[]types.Activation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Activation + if *v == nil { + cv = []types.Activation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Activation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentActivation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAlarm(v **types.Alarm, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Alarm + if *v == nil { + sv = &types.Alarm{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AlarmName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAlarmConfiguration(v **types.AlarmConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AlarmConfiguration + if *v == nil { + sv = &types.AlarmConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Alarms": + if err := awsAwsjson11_deserializeDocumentAlarmList(&sv.Alarms, value); err != nil { + return err + } + + case "IgnorePollAlarmFailure": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IgnorePollAlarmFailure = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAlarmList(v *[]types.Alarm, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Alarm + if *v == nil { + cv = []types.Alarm{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Alarm + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAlarm(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAlarmStateInformation(v **types.AlarmStateInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AlarmStateInformation + if *v == nil { + sv = &types.AlarmStateInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AlarmName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalAlarmState to be of type string, got %T instead", value) + } + sv.State = types.ExternalAlarmState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAlarmStateInformationList(v *[]types.AlarmStateInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AlarmStateInformation + if *v == nil { + cv = []types.AlarmStateInformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AlarmStateInformation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAlarmStateInformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AlreadyExistsException + if *v == nil { + sv = &types.AlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociatedInstances(v **types.AssociatedInstances, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociatedInstances + if *v == nil { + sv = &types.AssociatedInstances{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociation(v **types.Association, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Association + if *v == nil { + sv = &types.Association{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationName to be of type string, got %T instead", value) + } + sv.AssociationName = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Duration to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "LastExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Overview": + if err := awsAwsjson11_deserializeDocumentAssociationOverview(&sv.Overview, value); err != nil { + return err + } + + case "ScheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ScheduleOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationAlreadyExists(v **types.AssociationAlreadyExists, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationAlreadyExists + if *v == nil { + sv = &types.AssociationAlreadyExists{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationDescription(v **types.AssociationDescription, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationDescription + if *v == nil { + sv = &types.AssociationDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "ApplyOnlyAtCronInterval": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ApplyOnlyAtCronInterval to be of type *bool, got %T instead", value) + } + sv.ApplyOnlyAtCronInterval = jtv + } + + case "AssociationDispatchAssumeRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationDispatchAssumeRoleArn to be of type string, got %T instead", value) + } + sv.AssociationDispatchAssumeRole = ptr.String(jtv) + } + + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationName to be of type string, got %T instead", value) + } + sv.AssociationName = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "AutomationTargetParameterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationTargetParameterName to be of type string, got %T instead", value) + } + sv.AutomationTargetParameterName = ptr.String(jtv) + } + + case "CalendarNames": + if err := awsAwsjson11_deserializeDocumentCalendarNameOrARNList(&sv.CalendarNames, value); err != nil { + return err + } + + case "ComplianceSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationComplianceSeverity to be of type string, got %T instead", value) + } + sv.ComplianceSeverity = types.AssociationComplianceSeverity(jtv) + } + + case "Date": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Date = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Duration to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "LastExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastSuccessfulExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSuccessfulExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdateAssociationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdateAssociationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OutputLocation": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationOutputLocation(&sv.OutputLocation, value); err != nil { + return err + } + + case "Overview": + if err := awsAwsjson11_deserializeDocumentAssociationOverview(&sv.Overview, value); err != nil { + return err + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameters(&sv.Parameters, value); err != nil { + return err + } + + case "ScheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ScheduleOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "Status": + if err := awsAwsjson11_deserializeDocumentAssociationStatus(&sv.Status, value); err != nil { + return err + } + + case "SyncCompliance": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationSyncCompliance to be of type string, got %T instead", value) + } + sv.SyncCompliance = types.AssociationSyncCompliance(jtv) + } + + case "TargetLocations": + if err := awsAwsjson11_deserializeDocumentTargetLocations(&sv.TargetLocations, value); err != nil { + return err + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationDescriptionList(v *[]types.AssociationDescription, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AssociationDescription + if *v == nil { + cv = []types.AssociationDescription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociationDescription + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssociationDescription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationDoesNotExist(v **types.AssociationDoesNotExist, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationDoesNotExist + if *v == nil { + sv = &types.AssociationDoesNotExist{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationExecution(v **types.AssociationExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationExecution + if *v == nil { + sv = &types.AssociationExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DetailedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.DetailedStatus = ptr.String(jtv) + } + + case "ExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "LastExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ResourceCountByStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceCountByStatus to be of type string, got %T instead", value) + } + sv.ResourceCountByStatus = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationExecutionDoesNotExist(v **types.AssociationExecutionDoesNotExist, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationExecutionDoesNotExist + if *v == nil { + sv = &types.AssociationExecutionDoesNotExist{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationExecutionsList(v *[]types.AssociationExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AssociationExecution + if *v == nil { + cv = []types.AssociationExecution{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociationExecution + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssociationExecution(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationExecutionTarget(v **types.AssociationExecutionTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationExecutionTarget + if *v == nil { + sv = &types.AssociationExecutionTarget{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "DetailedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.DetailedStatus = ptr.String(jtv) + } + + case "ExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "LastExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "OutputSource": + if err := awsAwsjson11_deserializeDocumentOutputSource(&sv.OutputSource, value); err != nil { + return err + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationExecutionTargetsList(v *[]types.AssociationExecutionTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AssociationExecutionTarget + if *v == nil { + cv = []types.AssociationExecutionTarget{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociationExecutionTarget + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssociationExecutionTarget(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationLimitExceeded(v **types.AssociationLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationLimitExceeded + if *v == nil { + sv = &types.AssociationLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationList(v *[]types.Association, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Association + if *v == nil { + cv = []types.Association{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Association + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssociation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationOverview(v **types.AssociationOverview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationOverview + if *v == nil { + sv = &types.AssociationOverview{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationStatusAggregatedCount": + if err := awsAwsjson11_deserializeDocumentAssociationStatusAggregatedCount(&sv.AssociationStatusAggregatedCount, value); err != nil { + return err + } + + case "DetailedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.DetailedStatus = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationStatus(v **types.AssociationStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationStatus + if *v == nil { + sv = &types.AssociationStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdditionalInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusAdditionalInfo to be of type string, got %T instead", value) + } + sv.AdditionalInfo = ptr.String(jtv) + } + + case "Date": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Date = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationStatusName to be of type string, got %T instead", value) + } + sv.Name = types.AssociationStatusName(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationStatusAggregatedCount(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstanceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationVersionInfo(v **types.AssociationVersionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationVersionInfo + if *v == nil { + sv = &types.AssociationVersionInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplyOnlyAtCronInterval": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ApplyOnlyAtCronInterval to be of type *bool, got %T instead", value) + } + sv.ApplyOnlyAtCronInterval = jtv + } + + case "AssociationDispatchAssumeRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationDispatchAssumeRoleArn to be of type string, got %T instead", value) + } + sv.AssociationDispatchAssumeRole = ptr.String(jtv) + } + + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationName to be of type string, got %T instead", value) + } + sv.AssociationName = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "CalendarNames": + if err := awsAwsjson11_deserializeDocumentCalendarNameOrARNList(&sv.CalendarNames, value); err != nil { + return err + } + + case "ComplianceSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationComplianceSeverity to be of type string, got %T instead", value) + } + sv.ComplianceSeverity = types.AssociationComplianceSeverity(jtv) + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Duration to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OutputLocation": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationOutputLocation(&sv.OutputLocation, value); err != nil { + return err + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameters(&sv.Parameters, value); err != nil { + return err + } + + case "ScheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ScheduleOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "SyncCompliance": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationSyncCompliance to be of type string, got %T instead", value) + } + sv.SyncCompliance = types.AssociationSyncCompliance(jtv) + } + + case "TargetLocations": + if err := awsAwsjson11_deserializeDocumentTargetLocations(&sv.TargetLocations, value); err != nil { + return err + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationVersionLimitExceeded(v **types.AssociationVersionLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AssociationVersionLimitExceeded + if *v == nil { + sv = &types.AssociationVersionLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAssociationVersionList(v *[]types.AssociationVersionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AssociationVersionInfo + if *v == nil { + cv = []types.AssociationVersionInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AssociationVersionInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAssociationVersionInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAttachmentContent(v **types.AttachmentContent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AttachmentContent + if *v == nil { + sv = &types.AttachmentContent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Hash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentHash to be of type string, got %T instead", value) + } + sv.Hash = ptr.String(jtv) + } + + case "HashType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentHashType to be of type string, got %T instead", value) + } + sv.HashType = types.AttachmentHashType(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Size": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContentLength to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Size = i64 + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentUrl to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAttachmentContentList(v *[]types.AttachmentContent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AttachmentContent + if *v == nil { + cv = []types.AttachmentContent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AttachmentContent + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAttachmentContent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAttachmentInformation(v **types.AttachmentInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AttachmentInformation + if *v == nil { + sv = &types.AttachmentInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAttachmentInformationList(v *[]types.AttachmentInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AttachmentInformation + if *v == nil { + cv = []types.AttachmentInformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AttachmentInformation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAttachmentInformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationDefinitionNotApprovedException(v **types.AutomationDefinitionNotApprovedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationDefinitionNotApprovedException + if *v == nil { + sv = &types.AutomationDefinitionNotApprovedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationDefinitionNotFoundException(v **types.AutomationDefinitionNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationDefinitionNotFoundException + if *v == nil { + sv = &types.AutomationDefinitionNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationDefinitionVersionNotFoundException(v **types.AutomationDefinitionVersionNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationDefinitionVersionNotFoundException + if *v == nil { + sv = &types.AutomationDefinitionVersionNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationExecution(v **types.AutomationExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationExecution + if *v == nil { + sv = &types.AutomationExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AutomationExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionId to be of type string, got %T instead", value) + } + sv.AutomationExecutionId = ptr.String(jtv) + } + + case "AutomationExecutionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionStatus to be of type string, got %T instead", value) + } + sv.AutomationExecutionStatus = types.AutomationExecutionStatus(jtv) + } + + case "AutomationSubtype": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationSubtype to be of type string, got %T instead", value) + } + sv.AutomationSubtype = types.AutomationSubtype(jtv) + } + + case "ChangeRequestName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeRequestName to be of type string, got %T instead", value) + } + sv.ChangeRequestName = ptr.String(jtv) + } + + case "CurrentAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentAction = ptr.String(jtv) + } + + case "CurrentStepName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentStepName = ptr.String(jtv) + } + + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "ExecutedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ExecutedBy = ptr.String(jtv) + } + + case "ExecutionEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "FailureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionMode to be of type string, got %T instead", value) + } + sv.Mode = types.ExecutionMode(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "Outputs": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Outputs, value); err != nil { + return err + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Parameters, value); err != nil { + return err + } + + case "ParentAutomationExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionId to be of type string, got %T instead", value) + } + sv.ParentAutomationExecutionId = ptr.String(jtv) + } + + case "ProgressCounters": + if err := awsAwsjson11_deserializeDocumentProgressCounters(&sv.ProgressCounters, value); err != nil { + return err + } + + case "ResolvedTargets": + if err := awsAwsjson11_deserializeDocumentResolvedTargets(&sv.ResolvedTargets, value); err != nil { + return err + } + + case "Runbooks": + if err := awsAwsjson11_deserializeDocumentRunbooks(&sv.Runbooks, value); err != nil { + return err + } + + case "ScheduledTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ScheduledTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StepExecutions": + if err := awsAwsjson11_deserializeDocumentStepExecutionList(&sv.StepExecutions, value); err != nil { + return err + } + + case "StepExecutionsTruncated": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.StepExecutionsTruncated = jtv + } + + case "Target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + case "TargetLocations": + if err := awsAwsjson11_deserializeDocumentTargetLocations(&sv.TargetLocations, value); err != nil { + return err + } + + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "TargetParameterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationParameterKey to be of type string, got %T instead", value) + } + sv.TargetParameterName = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + case "Variables": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Variables, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationExecutionLimitExceededException(v **types.AutomationExecutionLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationExecutionLimitExceededException + if *v == nil { + sv = &types.AutomationExecutionLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationExecutionMetadata(v **types.AutomationExecutionMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationExecutionMetadata + if *v == nil { + sv = &types.AutomationExecutionMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AutomationExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionId to be of type string, got %T instead", value) + } + sv.AutomationExecutionId = ptr.String(jtv) + } + + case "AutomationExecutionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionStatus to be of type string, got %T instead", value) + } + sv.AutomationExecutionStatus = types.AutomationExecutionStatus(jtv) + } + + case "AutomationSubtype": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationSubtype to be of type string, got %T instead", value) + } + sv.AutomationSubtype = types.AutomationSubtype(jtv) + } + + case "AutomationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationType to be of type string, got %T instead", value) + } + sv.AutomationType = types.AutomationType(jtv) + } + + case "ChangeRequestName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeRequestName to be of type string, got %T instead", value) + } + sv.ChangeRequestName = ptr.String(jtv) + } + + case "CurrentAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentAction = ptr.String(jtv) + } + + case "CurrentStepName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentStepName = ptr.String(jtv) + } + + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "ExecutedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ExecutedBy = ptr.String(jtv) + } + + case "ExecutionEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "FailureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "LogFile": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LogFile = ptr.String(jtv) + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionMode to be of type string, got %T instead", value) + } + sv.Mode = types.ExecutionMode(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "Outputs": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Outputs, value); err != nil { + return err + } + + case "ParentAutomationExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionId to be of type string, got %T instead", value) + } + sv.ParentAutomationExecutionId = ptr.String(jtv) + } + + case "ResolvedTargets": + if err := awsAwsjson11_deserializeDocumentResolvedTargets(&sv.ResolvedTargets, value); err != nil { + return err + } + + case "Runbooks": + if err := awsAwsjson11_deserializeDocumentRunbooks(&sv.Runbooks, value); err != nil { + return err + } + + case "ScheduledTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ScheduledTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "TargetParameterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationParameterKey to be of type string, got %T instead", value) + } + sv.TargetParameterName = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationExecutionMetadataList(v *[]types.AutomationExecutionMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AutomationExecutionMetadata + if *v == nil { + cv = []types.AutomationExecutionMetadata{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutomationExecutionMetadata + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAutomationExecutionMetadata(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationExecutionNotFoundException(v **types.AutomationExecutionNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationExecutionNotFoundException + if *v == nil { + sv = &types.AutomationExecutionNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationExecutionPreview(v **types.AutomationExecutionPreview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationExecutionPreview + if *v == nil { + sv = &types.AutomationExecutionPreview{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Regions": + if err := awsAwsjson11_deserializeDocumentRegionList(&sv.Regions, value); err != nil { + return err + } + + case "StepPreviews": + if err := awsAwsjson11_deserializeDocumentStepPreviewMap(&sv.StepPreviews, value); err != nil { + return err + } + + case "TargetPreviews": + if err := awsAwsjson11_deserializeDocumentTargetPreviewList(&sv.TargetPreviews, value); err != nil { + return err + } + + case "TotalAccounts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalAccounts = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationParameterMap(v *map[string][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string][]string + if *v == nil { + mv = map[string][]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal []string + mapVar := parsedVal + if err := awsAwsjson11_deserializeDocumentAutomationParameterValueList(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationParameterValueList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationParameterValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAutomationStepNotFoundException(v **types.AutomationStepNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutomationStepNotFoundException + if *v == nil { + sv = &types.AutomationStepNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCalendarNameOrARNList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CalendarNameOrARN to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCategoryEnumList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Category to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCategoryList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Category to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCloudWatchOutputConfig(v **types.CloudWatchOutputConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CloudWatchOutputConfig + if *v == nil { + sv = &types.CloudWatchOutputConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchLogGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchLogGroupName to be of type string, got %T instead", value) + } + sv.CloudWatchLogGroupName = ptr.String(jtv) + } + + case "CloudWatchOutputEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected CloudWatchOutputEnabled to be of type *bool, got %T instead", value) + } + sv.CloudWatchOutputEnabled = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCommand(v **types.Command, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Command + if *v == nil { + sv = &types.Command{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "CloudWatchOutputConfig": + if err := awsAwsjson11_deserializeDocumentCloudWatchOutputConfig(&sv.CloudWatchOutputConfig, value); err != nil { + return err + } + + case "CommandId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandId to be of type string, got %T instead", value) + } + sv.CommandId = ptr.String(jtv) + } + + case "Comment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Comment to be of type string, got %T instead", value) + } + sv.Comment = ptr.String(jtv) + } + + case "CompletedCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CompletedCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CompletedCount = int32(i64) + } + + case "DeliveryTimedOutCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DeliveryTimedOutCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DeliveryTimedOutCount = int32(i64) + } + + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "ErrorCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ErrorCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ErrorCount = int32(i64) + } + + case "ExpiresAfter": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAfter = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "InstanceIds": + if err := awsAwsjson11_deserializeDocumentInstanceIdList(&sv.InstanceIds, value); err != nil { + return err + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "NotificationConfig": + if err := awsAwsjson11_deserializeDocumentNotificationConfig(&sv.NotificationConfig, value); err != nil { + return err + } + + case "OutputS3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.OutputS3BucketName = ptr.String(jtv) + } + + case "OutputS3KeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3KeyPrefix to be of type string, got %T instead", value) + } + sv.OutputS3KeyPrefix = ptr.String(jtv) + } + + case "OutputS3Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Region to be of type string, got %T instead", value) + } + sv.OutputS3Region = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameters(&sv.Parameters, value); err != nil { + return err + } + + case "RequestedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RequestedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ServiceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandStatus to be of type string, got %T instead", value) + } + sv.Status = types.CommandStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TargetCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TargetCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TargetCount = int32(i64) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TimeoutSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimeoutSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutSeconds = ptr.Int32(int32(i64)) + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandInvocation(v **types.CommandInvocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CommandInvocation + if *v == nil { + sv = &types.CommandInvocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchOutputConfig": + if err := awsAwsjson11_deserializeDocumentCloudWatchOutputConfig(&sv.CloudWatchOutputConfig, value); err != nil { + return err + } + + case "CommandId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandId to be of type string, got %T instead", value) + } + sv.CommandId = ptr.String(jtv) + } + + case "CommandPlugins": + if err := awsAwsjson11_deserializeDocumentCommandPluginList(&sv.CommandPlugins, value); err != nil { + return err + } + + case "Comment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Comment to be of type string, got %T instead", value) + } + sv.Comment = ptr.String(jtv) + } + + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "InstanceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceTagName to be of type string, got %T instead", value) + } + sv.InstanceName = ptr.String(jtv) + } + + case "NotificationConfig": + if err := awsAwsjson11_deserializeDocumentNotificationConfig(&sv.NotificationConfig, value); err != nil { + return err + } + + case "RequestedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RequestedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ServiceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "StandardErrorUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.StandardErrorUrl = ptr.String(jtv) + } + + case "StandardOutputUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.StandardOutputUrl = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandInvocationStatus to be of type string, got %T instead", value) + } + sv.Status = types.CommandInvocationStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TraceOutput": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvocationTraceOutput to be of type string, got %T instead", value) + } + sv.TraceOutput = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandInvocationList(v *[]types.CommandInvocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CommandInvocation + if *v == nil { + cv = []types.CommandInvocation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CommandInvocation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCommandInvocation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandList(v *[]types.Command, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Command + if *v == nil { + cv = []types.Command{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Command + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCommand(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandPlugin(v **types.CommandPlugin, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CommandPlugin + if *v == nil { + sv = &types.CommandPlugin{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandPluginName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Output": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandPluginOutput to be of type string, got %T instead", value) + } + sv.Output = ptr.String(jtv) + } + + case "OutputS3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.OutputS3BucketName = ptr.String(jtv) + } + + case "OutputS3KeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3KeyPrefix to be of type string, got %T instead", value) + } + sv.OutputS3KeyPrefix = ptr.String(jtv) + } + + case "OutputS3Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Region to be of type string, got %T instead", value) + } + sv.OutputS3Region = ptr.String(jtv) + } + + case "ResponseCode": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ResponseCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ResponseCode = int32(i64) + } + + case "ResponseFinishDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ResponseFinishDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ResponseStartDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ResponseStartDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StandardErrorUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.StandardErrorUrl = ptr.String(jtv) + } + + case "StandardOutputUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.StandardOutputUrl = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandPluginStatus to be of type string, got %T instead", value) + } + sv.Status = types.CommandPluginStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandPluginList(v *[]types.CommandPlugin, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CommandPlugin + if *v == nil { + cv = []types.CommandPlugin{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CommandPlugin + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCommandPlugin(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceExecutionSummary(v **types.ComplianceExecutionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComplianceExecutionSummary + if *v == nil { + sv = &types.ComplianceExecutionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "ExecutionTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceExecutionType to be of type string, got %T instead", value) + } + sv.ExecutionType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceItem(v **types.ComplianceItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComplianceItem + if *v == nil { + sv = &types.ComplianceItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceTypeName to be of type string, got %T instead", value) + } + sv.ComplianceType = ptr.String(jtv) + } + + case "Details": + if err := awsAwsjson11_deserializeDocumentComplianceItemDetails(&sv.Details, value); err != nil { + return err + } + + case "ExecutionSummary": + if err := awsAwsjson11_deserializeDocumentComplianceExecutionSummary(&sv.ExecutionSummary, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceItemId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceSeverity to be of type string, got %T instead", value) + } + sv.Severity = types.ComplianceSeverity(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + } + sv.Status = types.ComplianceStatus(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceItemTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceItemDetails(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceItemList(v *[]types.ComplianceItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ComplianceItem + if *v == nil { + cv = []types.ComplianceItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ComplianceItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentComplianceItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceSummaryItem(v **types.ComplianceSummaryItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComplianceSummaryItem + if *v == nil { + sv = &types.ComplianceSummaryItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceTypeName to be of type string, got %T instead", value) + } + sv.ComplianceType = ptr.String(jtv) + } + + case "CompliantSummary": + if err := awsAwsjson11_deserializeDocumentCompliantSummary(&sv.CompliantSummary, value); err != nil { + return err + } + + case "NonCompliantSummary": + if err := awsAwsjson11_deserializeDocumentNonCompliantSummary(&sv.NonCompliantSummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceSummaryItemList(v *[]types.ComplianceSummaryItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ComplianceSummaryItem + if *v == nil { + cv = []types.ComplianceSummaryItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ComplianceSummaryItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentComplianceSummaryItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentComplianceTypeCountLimitExceededException(v **types.ComplianceTypeCountLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComplianceTypeCountLimitExceededException + if *v == nil { + sv = &types.ComplianceTypeCountLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCompliantSummary(v **types.CompliantSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CompliantSummary + if *v == nil { + sv = &types.CompliantSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompliantCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CompliantCount = int32(i64) + } + + case "SeveritySummary": + if err := awsAwsjson11_deserializeDocumentSeveritySummary(&sv.SeveritySummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCreateAssociationBatchRequestEntry(v **types.CreateAssociationBatchRequestEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CreateAssociationBatchRequestEntry + if *v == nil { + sv = &types.CreateAssociationBatchRequestEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "ApplyOnlyAtCronInterval": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ApplyOnlyAtCronInterval to be of type *bool, got %T instead", value) + } + sv.ApplyOnlyAtCronInterval = jtv + } + + case "AssociationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationName to be of type string, got %T instead", value) + } + sv.AssociationName = ptr.String(jtv) + } + + case "AutomationTargetParameterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationTargetParameterName to be of type string, got %T instead", value) + } + sv.AutomationTargetParameterName = ptr.String(jtv) + } + + case "CalendarNames": + if err := awsAwsjson11_deserializeDocumentCalendarNameOrARNList(&sv.CalendarNames, value); err != nil { + return err + } + + case "ComplianceSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationComplianceSeverity to be of type string, got %T instead", value) + } + sv.ComplianceSeverity = types.AssociationComplianceSeverity(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Duration to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OutputLocation": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationOutputLocation(&sv.OutputLocation, value); err != nil { + return err + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameters(&sv.Parameters, value); err != nil { + return err + } + + case "ScheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ScheduleOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "SyncCompliance": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationSyncCompliance to be of type string, got %T instead", value) + } + sv.SyncCompliance = types.AssociationSyncCompliance(jtv) + } + + case "TargetLocations": + if err := awsAwsjson11_deserializeDocumentTargetLocations(&sv.TargetLocations, value); err != nil { + return err + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCredentials(v **types.Credentials, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Credentials + if *v == nil { + sv = &types.Credentials{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessKeyIdType to be of type string, got %T instead", value) + } + sv.AccessKeyId = ptr.String(jtv) + } + + case "ExpirationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpirationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "SecretAccessKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessKeySecretType to be of type string, got %T instead", value) + } + sv.SecretAccessKey = ptr.String(jtv) + } + + case "SessionToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionTokenType to be of type string, got %T instead", value) + } + sv.SessionToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCustomSchemaCountLimitExceededException(v **types.CustomSchemaCountLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CustomSchemaCountLimitExceededException + if *v == nil { + sv = &types.CustomSchemaCountLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentAlreadyExists(v **types.DocumentAlreadyExists, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentAlreadyExists + if *v == nil { + sv = &types.DocumentAlreadyExists{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentDefaultVersionDescription(v **types.DocumentDefaultVersionDescription, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentDefaultVersionDescription + if *v == nil { + sv = &types.DocumentDefaultVersionDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DefaultVersion = ptr.String(jtv) + } + + case "DefaultVersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersionName to be of type string, got %T instead", value) + } + sv.DefaultVersionName = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentDescription(v **types.DocumentDescription, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentDescription + if *v == nil { + sv = &types.DocumentDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApprovedVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.ApprovedVersion = ptr.String(jtv) + } + + case "AttachmentsInformation": + if err := awsAwsjson11_deserializeDocumentAttachmentInformationList(&sv.AttachmentsInformation, value); err != nil { + return err + } + + case "Author": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentAuthor to be of type string, got %T instead", value) + } + sv.Author = ptr.String(jtv) + } + + case "Category": + if err := awsAwsjson11_deserializeDocumentCategoryList(&sv.Category, value); err != nil { + return err + } + + case "CategoryEnum": + if err := awsAwsjson11_deserializeDocumentCategoryEnumList(&sv.CategoryEnum, value); err != nil { + return err + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DefaultVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DefaultVersion = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionInDocument to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "DocumentFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentFormat to be of type string, got %T instead", value) + } + sv.DocumentFormat = types.DocumentFormat(jtv) + } + + case "DocumentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentType to be of type string, got %T instead", value) + } + sv.DocumentType = types.DocumentType(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Hash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentHash to be of type string, got %T instead", value) + } + sv.Hash = ptr.String(jtv) + } + + case "HashType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentHashType to be of type string, got %T instead", value) + } + sv.HashType = types.DocumentHashType(jtv) + } + + case "LatestVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.LatestVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentOwner to be of type string, got %T instead", value) + } + sv.Owner = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentDocumentParameterList(&sv.Parameters, value); err != nil { + return err + } + + case "PendingReviewVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.PendingReviewVersion = ptr.String(jtv) + } + + case "PlatformTypes": + if err := awsAwsjson11_deserializeDocumentPlatformTypeList(&sv.PlatformTypes, value); err != nil { + return err + } + + case "Requires": + if err := awsAwsjson11_deserializeDocumentDocumentRequiresList(&sv.Requires, value); err != nil { + return err + } + + case "ReviewInformation": + if err := awsAwsjson11_deserializeDocumentReviewInformationList(&sv.ReviewInformation, value); err != nil { + return err + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "SchemaVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentSchemaVersion to be of type string, got %T instead", value) + } + sv.SchemaVersion = ptr.String(jtv) + } + + case "Sha1": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentSha1 to be of type string, got %T instead", value) + } + sv.Sha1 = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentStatus to be of type string, got %T instead", value) + } + sv.Status = types.DocumentStatus(jtv) + } + + case "StatusInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentStatusInformation to be of type string, got %T instead", value) + } + sv.StatusInformation = ptr.String(jtv) + } + + case "Tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "TargetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetType to be of type string, got %T instead", value) + } + sv.TargetType = ptr.String(jtv) + } + + case "VersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentIdentifier(v **types.DocumentIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentIdentifier + if *v == nil { + sv = &types.DocumentIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Author": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentAuthor to be of type string, got %T instead", value) + } + sv.Author = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "DocumentFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentFormat to be of type string, got %T instead", value) + } + sv.DocumentFormat = types.DocumentFormat(jtv) + } + + case "DocumentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentType to be of type string, got %T instead", value) + } + sv.DocumentType = types.DocumentType(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentOwner to be of type string, got %T instead", value) + } + sv.Owner = ptr.String(jtv) + } + + case "PlatformTypes": + if err := awsAwsjson11_deserializeDocumentPlatformTypeList(&sv.PlatformTypes, value); err != nil { + return err + } + + case "Requires": + if err := awsAwsjson11_deserializeDocumentDocumentRequiresList(&sv.Requires, value); err != nil { + return err + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "SchemaVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentSchemaVersion to be of type string, got %T instead", value) + } + sv.SchemaVersion = ptr.String(jtv) + } + + case "Tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "TargetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetType to be of type string, got %T instead", value) + } + sv.TargetType = ptr.String(jtv) + } + + case "VersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentIdentifierList(v *[]types.DocumentIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DocumentIdentifier + if *v == nil { + cv = []types.DocumentIdentifier{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DocumentIdentifier + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDocumentIdentifier(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentLimitExceeded(v **types.DocumentLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentLimitExceeded + if *v == nil { + sv = &types.DocumentLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentMetadataResponseInfo(v **types.DocumentMetadataResponseInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentMetadataResponseInfo + if *v == nil { + sv = &types.DocumentMetadataResponseInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReviewerResponse": + if err := awsAwsjson11_deserializeDocumentDocumentReviewerResponseList(&sv.ReviewerResponse, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentParameter(v **types.DocumentParameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentParameter + if *v == nil { + sv = &types.DocumentParameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentParameterDefaultValue to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentParameterDescrption to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentParameterType to be of type string, got %T instead", value) + } + sv.Type = types.DocumentParameterType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentParameterList(v *[]types.DocumentParameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DocumentParameter + if *v == nil { + cv = []types.DocumentParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DocumentParameter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDocumentParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentPermissionLimit(v **types.DocumentPermissionLimit, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentPermissionLimit + if *v == nil { + sv = &types.DocumentPermissionLimit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentRequires(v **types.DocumentRequires, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentRequires + if *v == nil { + sv = &types.DocumentRequires{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RequireType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RequireType to be of type string, got %T instead", value) + } + sv.RequireType = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentRequiresList(v *[]types.DocumentRequires, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DocumentRequires + if *v == nil { + cv = []types.DocumentRequires{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DocumentRequires + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDocumentRequires(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentReviewCommentList(v *[]types.DocumentReviewCommentSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DocumentReviewCommentSource + if *v == nil { + cv = []types.DocumentReviewCommentSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DocumentReviewCommentSource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDocumentReviewCommentSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentReviewCommentSource(v **types.DocumentReviewCommentSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentReviewCommentSource + if *v == nil { + sv = &types.DocumentReviewCommentSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentReviewComment to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentReviewCommentType to be of type string, got %T instead", value) + } + sv.Type = types.DocumentReviewCommentType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentReviewerResponseList(v *[]types.DocumentReviewerResponseSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DocumentReviewerResponseSource + if *v == nil { + cv = []types.DocumentReviewerResponseSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DocumentReviewerResponseSource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDocumentReviewerResponseSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentReviewerResponseSource(v **types.DocumentReviewerResponseSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentReviewerResponseSource + if *v == nil { + sv = &types.DocumentReviewerResponseSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Comment": + if err := awsAwsjson11_deserializeDocumentDocumentReviewCommentList(&sv.Comment, value); err != nil { + return err + } + + case "CreateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Reviewer": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Reviewer to be of type string, got %T instead", value) + } + sv.Reviewer = ptr.String(jtv) + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "UpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentVersionInfo(v **types.DocumentVersionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentVersionInfo + if *v == nil { + sv = &types.DocumentVersionInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "DocumentFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentFormat to be of type string, got %T instead", value) + } + sv.DocumentFormat = types.DocumentFormat(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "IsDefaultVersion": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsDefaultVersion = jtv + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentStatus to be of type string, got %T instead", value) + } + sv.Status = types.DocumentStatus(jtv) + } + + case "StatusInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentStatusInformation to be of type string, got %T instead", value) + } + sv.StatusInformation = ptr.String(jtv) + } + + case "VersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentVersionLimitExceeded(v **types.DocumentVersionLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentVersionLimitExceeded + if *v == nil { + sv = &types.DocumentVersionLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDocumentVersionList(v *[]types.DocumentVersionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DocumentVersionInfo + if *v == nil { + cv = []types.DocumentVersionInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DocumentVersionInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDocumentVersionInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDoesNotExistException(v **types.DoesNotExistException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DoesNotExistException + if *v == nil { + sv = &types.DoesNotExistException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDuplicateDocumentContent(v **types.DuplicateDocumentContent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DuplicateDocumentContent + if *v == nil { + sv = &types.DuplicateDocumentContent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDuplicateDocumentVersionName(v **types.DuplicateDocumentVersionName, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DuplicateDocumentVersionName + if *v == nil { + sv = &types.DuplicateDocumentVersionName{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDuplicateInstanceId(v **types.DuplicateInstanceId, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DuplicateInstanceId + if *v == nil { + sv = &types.DuplicateInstanceId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEffectivePatch(v **types.EffectivePatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EffectivePatch + if *v == nil { + sv = &types.EffectivePatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Patch": + if err := awsAwsjson11_deserializeDocumentPatch(&sv.Patch, value); err != nil { + return err + } + + case "PatchStatus": + if err := awsAwsjson11_deserializeDocumentPatchStatus(&sv.PatchStatus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEffectivePatchList(v *[]types.EffectivePatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EffectivePatch + if *v == nil { + cv = []types.EffectivePatch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EffectivePatch + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEffectivePatch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentExcludeAccounts(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExcludeAccount to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentExecutionPreview(v *types.ExecutionPreview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.ExecutionPreview +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "Automation": + var mv types.AutomationExecutionPreview + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentAutomationExecutionPreview(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ExecutionPreviewMemberAutomation{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson11_deserializeDocumentFailedCreateAssociation(v **types.FailedCreateAssociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FailedCreateAssociation + if *v == nil { + sv = &types.FailedCreateAssociation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Entry": + if err := awsAwsjson11_deserializeDocumentCreateAssociationBatchRequestEntry(&sv.Entry, value); err != nil { + return err + } + + case "Fault": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Fault to be of type string, got %T instead", value) + } + sv.Fault = types.Fault(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFailedCreateAssociationList(v *[]types.FailedCreateAssociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FailedCreateAssociation + if *v == nil { + cv = []types.FailedCreateAssociation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FailedCreateAssociation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentFailedCreateAssociation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFailureDetails(v **types.FailureDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FailureDetails + if *v == nil { + sv = &types.FailureDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Details": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Details, value); err != nil { + return err + } + + case "FailureStage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureStage = ptr.String(jtv) + } + + case "FailureType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFeatureNotAvailableException(v **types.FeatureNotAvailableException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FeatureNotAvailableException + if *v == nil { + sv = &types.FeatureNotAvailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntries(v *[]types.GetResourcePoliciesResponseEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.GetResourcePoliciesResponseEntry + if *v == nil { + cv = []types.GetResourcePoliciesResponseEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GetResourcePoliciesResponseEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntry(v **types.GetResourcePoliciesResponseEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GetResourcePoliciesResponseEntry + if *v == nil { + sv = &types.GetResourcePoliciesResponseEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Policy to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + case "PolicyHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyHash to be of type string, got %T instead", value) + } + sv.PolicyHash = ptr.String(jtv) + } + + case "PolicyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) + } + sv.PolicyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentHierarchyLevelLimitExceededException(v **types.HierarchyLevelLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.HierarchyLevelLimitExceededException + if *v == nil { + sv = &types.HierarchyLevelLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentHierarchyTypeMismatchException(v **types.HierarchyTypeMismatchException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.HierarchyTypeMismatchException + if *v == nil { + sv = &types.HierarchyTypeMismatchException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIdempotentParameterMismatch(v **types.IdempotentParameterMismatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IdempotentParameterMismatch + if *v == nil { + sv = &types.IdempotentParameterMismatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIncompatiblePolicyException(v **types.IncompatiblePolicyException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IncompatiblePolicyException + if *v == nil { + sv = &types.IncompatiblePolicyException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAggregatedAssociationOverview(v **types.InstanceAggregatedAssociationOverview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceAggregatedAssociationOverview + if *v == nil { + sv = &types.InstanceAggregatedAssociationOverview{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DetailedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.DetailedStatus = ptr.String(jtv) + } + + case "InstanceAssociationStatusAggregatedCount": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationStatusAggregatedCount(&sv.InstanceAssociationStatusAggregatedCount, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociation(v **types.InstanceAssociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceAssociation + if *v == nil { + sv = &types.InstanceAssociation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentContent to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociationList(v *[]types.InstanceAssociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstanceAssociation + if *v == nil { + cv = []types.InstanceAssociation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceAssociation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstanceAssociation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociationOutputLocation(v **types.InstanceAssociationOutputLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceAssociationOutputLocation + if *v == nil { + sv = &types.InstanceAssociationOutputLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Location": + if err := awsAwsjson11_deserializeDocumentS3OutputLocation(&sv.S3Location, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociationOutputUrl(v **types.InstanceAssociationOutputUrl, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceAssociationOutputUrl + if *v == nil { + sv = &types.InstanceAssociationOutputUrl{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3OutputUrl": + if err := awsAwsjson11_deserializeDocumentS3OutputUrl(&sv.S3OutputUrl, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociationStatusAggregatedCount(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstanceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociationStatusInfo(v **types.InstanceAssociationStatusInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceAssociationStatusInfo + if *v == nil { + sv = &types.InstanceAssociationStatusInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationName to be of type string, got %T instead", value) + } + sv.AssociationName = ptr.String(jtv) + } + + case "AssociationVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssociationVersion to be of type string, got %T instead", value) + } + sv.AssociationVersion = ptr.String(jtv) + } + + case "DetailedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.DetailedStatus = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "ExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionSummary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceAssociationExecutionSummary to be of type string, got %T instead", value) + } + sv.ExecutionSummary = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OutputUrl": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationOutputUrl(&sv.OutputUrl, value); err != nil { + return err + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceAssociationStatusInfos(v *[]types.InstanceAssociationStatusInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstanceAssociationStatusInfo + if *v == nil { + cv = []types.InstanceAssociationStatusInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceAssociationStatusInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstanceAssociationStatusInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceInfo(v **types.InstanceInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceInfo + if *v == nil { + sv = &types.InstanceInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentType to be of type string, got %T instead", value) + } + sv.AgentType = ptr.String(jtv) + } + + case "AgentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentVersion to be of type string, got %T instead", value) + } + sv.AgentVersion = ptr.String(jtv) + } + + case "ComputerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputerName to be of type string, got %T instead", value) + } + sv.ComputerName = ptr.String(jtv) + } + + case "InstanceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceStatus to be of type string, got %T instead", value) + } + sv.InstanceStatus = ptr.String(jtv) + } + + case "IpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "ManagedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedStatus to be of type string, got %T instead", value) + } + sv.ManagedStatus = types.ManagedStatus(jtv) + } + + case "PlatformName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformName to be of type string, got %T instead", value) + } + sv.PlatformName = ptr.String(jtv) + } + + case "PlatformType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + sv.PlatformType = types.PlatformType(jtv) + } + + case "PlatformVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformVersion to be of type string, got %T instead", value) + } + sv.PlatformVersion = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceInformation(v **types.InstanceInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceInformation + if *v == nil { + sv = &types.InstanceInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationId to be of type string, got %T instead", value) + } + sv.ActivationId = ptr.String(jtv) + } + + case "AgentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.AgentVersion = ptr.String(jtv) + } + + case "AssociationOverview": + if err := awsAwsjson11_deserializeDocumentInstanceAggregatedAssociationOverview(&sv.AssociationOverview, value); err != nil { + return err + } + + case "AssociationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.AssociationStatus = ptr.String(jtv) + } + + case "ComputerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputerName to be of type string, got %T instead", value) + } + sv.ComputerName = ptr.String(jtv) + } + + case "IamRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRole to be of type string, got %T instead", value) + } + sv.IamRole = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "IPAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.IPAddress = ptr.String(jtv) + } + + case "IsLatestVersion": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsLatestVersion = ptr.Bool(jtv) + } + + case "LastAssociationExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastAssociationExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastPingDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastPingDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastSuccessfulAssociationExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSuccessfulAssociationExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PingStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PingStatus to be of type string, got %T instead", value) + } + sv.PingStatus = types.PingStatus(jtv) + } + + case "PlatformName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlatformName = ptr.String(jtv) + } + + case "PlatformType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + sv.PlatformType = types.PlatformType(jtv) + } + + case "PlatformVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlatformVersion = ptr.String(jtv) + } + + case "RegistrationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RegistrationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "SourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceId to be of type string, got %T instead", value) + } + sv.SourceId = ptr.String(jtv) + } + + case "SourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceType to be of type string, got %T instead", value) + } + sv.SourceType = types.SourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceInformationList(v *[]types.InstanceInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstanceInformation + if *v == nil { + cv = []types.InstanceInformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceInformation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstanceInformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstancePatchState(v **types.InstancePatchState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstancePatchState + if *v == nil { + sv = &types.InstancePatchState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailableSecurityUpdateCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchAvailableSecurityUpdateCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AvailableSecurityUpdateCount = ptr.Int32(int32(i64)) + } + + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "CriticalNonCompliantCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchCriticalNonCompliantCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CriticalNonCompliantCount = ptr.Int32(int32(i64)) + } + + case "FailedCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchFailedCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedCount = int32(i64) + } + + case "InstalledCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchInstalledCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstalledCount = int32(i64) + } + + case "InstalledOtherCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchInstalledOtherCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstalledOtherCount = int32(i64) + } + + case "InstalledPendingRebootCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchInstalledPendingRebootCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstalledPendingRebootCount = ptr.Int32(int32(i64)) + } + + case "InstalledRejectedCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchInstalledRejectedCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstalledRejectedCount = ptr.Int32(int32(i64)) + } + + case "InstallOverrideList": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstallOverrideList to be of type string, got %T instead", value) + } + sv.InstallOverrideList = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "LastNoRebootInstallOperationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastNoRebootInstallOperationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "MissingCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchMissingCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MissingCount = int32(i64) + } + + case "NotApplicableCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchNotApplicableCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NotApplicableCount = int32(i64) + } + + case "Operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchOperationType to be of type string, got %T instead", value) + } + sv.Operation = types.PatchOperationType(jtv) + } + + case "OperationEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OperationEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "OperationStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OperationStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "OtherNonCompliantCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchOtherNonCompliantCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.OtherNonCompliantCount = ptr.Int32(int32(i64)) + } + + case "OwnerInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerInformation to be of type string, got %T instead", value) + } + sv.OwnerInformation = ptr.String(jtv) + } + + case "PatchGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchGroup to be of type string, got %T instead", value) + } + sv.PatchGroup = ptr.String(jtv) + } + + case "RebootOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RebootOption to be of type string, got %T instead", value) + } + sv.RebootOption = types.RebootOption(jtv) + } + + case "SecurityNonCompliantCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchSecurityNonCompliantCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SecurityNonCompliantCount = ptr.Int32(int32(i64)) + } + + case "SnapshotId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotId to be of type string, got %T instead", value) + } + sv.SnapshotId = ptr.String(jtv) + } + + case "UnreportedNotApplicableCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchUnreportedNotApplicableCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UnreportedNotApplicableCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInstancePatchStateList(v *[]types.InstancePatchState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstancePatchState + if *v == nil { + cv = []types.InstancePatchState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstancePatchState + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstancePatchState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstancePatchStatesList(v *[]types.InstancePatchState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstancePatchState + if *v == nil { + cv = []types.InstancePatchState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstancePatchState + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstancePatchState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceProperties(v *[]types.InstanceProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstanceProperty + if *v == nil { + cv = []types.InstanceProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceProperty + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstanceProperty(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceProperty(v **types.InstanceProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceProperty + if *v == nil { + sv = &types.InstanceProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationId to be of type string, got %T instead", value) + } + sv.ActivationId = ptr.String(jtv) + } + + case "AgentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.AgentVersion = ptr.String(jtv) + } + + case "Architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Architecture to be of type string, got %T instead", value) + } + sv.Architecture = ptr.String(jtv) + } + + case "AssociationOverview": + if err := awsAwsjson11_deserializeDocumentInstanceAggregatedAssociationOverview(&sv.AssociationOverview, value); err != nil { + return err + } + + case "AssociationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.AssociationStatus = ptr.String(jtv) + } + + case "ComputerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputerName to be of type string, got %T instead", value) + } + sv.ComputerName = ptr.String(jtv) + } + + case "IamRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRole to be of type string, got %T instead", value) + } + sv.IamRole = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "InstanceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceRole to be of type string, got %T instead", value) + } + sv.InstanceRole = ptr.String(jtv) + } + + case "InstanceState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceState to be of type string, got %T instead", value) + } + sv.InstanceState = ptr.String(jtv) + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = ptr.String(jtv) + } + + case "IPAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.IPAddress = ptr.String(jtv) + } + + case "KeyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyName to be of type string, got %T instead", value) + } + sv.KeyName = ptr.String(jtv) + } + + case "LastAssociationExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastAssociationExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastPingDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastPingDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastSuccessfulAssociationExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSuccessfulAssociationExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LaunchTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LaunchTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PingStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PingStatus to be of type string, got %T instead", value) + } + sv.PingStatus = types.PingStatus(jtv) + } + + case "PlatformName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformName to be of type string, got %T instead", value) + } + sv.PlatformName = ptr.String(jtv) + } + + case "PlatformType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + sv.PlatformType = types.PlatformType(jtv) + } + + case "PlatformVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformVersion to be of type string, got %T instead", value) + } + sv.PlatformVersion = ptr.String(jtv) + } + + case "RegistrationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RegistrationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "SourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceId to be of type string, got %T instead", value) + } + sv.SourceId = ptr.String(jtv) + } + + case "SourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceType to be of type string, got %T instead", value) + } + sv.SourceType = types.SourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInternalServerError(v **types.InternalServerError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerError + if *v == nil { + sv = &types.InternalServerError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidActivation(v **types.InvalidActivation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidActivation + if *v == nil { + sv = &types.InvalidActivation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidActivationId(v **types.InvalidActivationId, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidActivationId + if *v == nil { + sv = &types.InvalidActivationId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAggregatorException(v **types.InvalidAggregatorException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAggregatorException + if *v == nil { + sv = &types.InvalidAggregatorException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAllowedPatternException(v **types.InvalidAllowedPatternException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAllowedPatternException + if *v == nil { + sv = &types.InvalidAllowedPatternException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAssociation(v **types.InvalidAssociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAssociation + if *v == nil { + sv = &types.InvalidAssociation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAssociationVersion(v **types.InvalidAssociationVersion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAssociationVersion + if *v == nil { + sv = &types.InvalidAssociationVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAutomationExecutionParametersException(v **types.InvalidAutomationExecutionParametersException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAutomationExecutionParametersException + if *v == nil { + sv = &types.InvalidAutomationExecutionParametersException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAutomationSignalException(v **types.InvalidAutomationSignalException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAutomationSignalException + if *v == nil { + sv = &types.InvalidAutomationSignalException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(v **types.InvalidAutomationStatusUpdateException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidAutomationStatusUpdateException + if *v == nil { + sv = &types.InvalidAutomationStatusUpdateException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidCommandId(v **types.InvalidCommandId, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidCommandId + if *v == nil { + sv = &types.InvalidCommandId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(v **types.InvalidDeleteInventoryParametersException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDeleteInventoryParametersException + if *v == nil { + sv = &types.InvalidDeleteInventoryParametersException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDeletionIdException(v **types.InvalidDeletionIdException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDeletionIdException + if *v == nil { + sv = &types.InvalidDeletionIdException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDocument(v **types.InvalidDocument, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDocument + if *v == nil { + sv = &types.InvalidDocument{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDocumentContent(v **types.InvalidDocumentContent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDocumentContent + if *v == nil { + sv = &types.InvalidDocumentContent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDocumentOperation(v **types.InvalidDocumentOperation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDocumentOperation + if *v == nil { + sv = &types.InvalidDocumentOperation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(v **types.InvalidDocumentSchemaVersion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDocumentSchemaVersion + if *v == nil { + sv = &types.InvalidDocumentSchemaVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDocumentType(v **types.InvalidDocumentType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDocumentType + if *v == nil { + sv = &types.InvalidDocumentType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDocumentVersion(v **types.InvalidDocumentVersion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidDocumentVersion + if *v == nil { + sv = &types.InvalidDocumentVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidFilter(v **types.InvalidFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidFilter + if *v == nil { + sv = &types.InvalidFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidFilterKey(v **types.InvalidFilterKey, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidFilterKey + if *v == nil { + sv = &types.InvalidFilterKey{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidFilterOption(v **types.InvalidFilterOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidFilterOption + if *v == nil { + sv = &types.InvalidFilterOption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidFilterValue(v **types.InvalidFilterValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidFilterValue + if *v == nil { + sv = &types.InvalidFilterValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInstanceId(v **types.InvalidInstanceId, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInstanceId + if *v == nil { + sv = &types.InvalidInstanceId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInstanceInformationFilterValue(v **types.InvalidInstanceInformationFilterValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInstanceInformationFilterValue + if *v == nil { + sv = &types.InvalidInstanceInformationFilterValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInstancePropertyFilterValue(v **types.InvalidInstancePropertyFilterValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInstancePropertyFilterValue + if *v == nil { + sv = &types.InvalidInstancePropertyFilterValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInventoryGroupException(v **types.InvalidInventoryGroupException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInventoryGroupException + if *v == nil { + sv = &types.InvalidInventoryGroupException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInventoryItemContextException(v **types.InvalidInventoryItemContextException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInventoryItemContextException + if *v == nil { + sv = &types.InvalidInventoryItemContextException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInventoryRequestException(v **types.InvalidInventoryRequestException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInventoryRequestException + if *v == nil { + sv = &types.InvalidInventoryRequestException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidItemContentException(v **types.InvalidItemContentException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidItemContentException + if *v == nil { + sv = &types.InvalidItemContentException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidKeyId(v **types.InvalidKeyId, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidKeyId + if *v == nil { + sv = &types.InvalidKeyId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidNextToken(v **types.InvalidNextToken, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidNextToken + if *v == nil { + sv = &types.InvalidNextToken{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidNotificationConfig(v **types.InvalidNotificationConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidNotificationConfig + if *v == nil { + sv = &types.InvalidNotificationConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidOptionException(v **types.InvalidOptionException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidOptionException + if *v == nil { + sv = &types.InvalidOptionException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidOutputFolder(v **types.InvalidOutputFolder, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidOutputFolder + if *v == nil { + sv = &types.InvalidOutputFolder{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidOutputLocation(v **types.InvalidOutputLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidOutputLocation + if *v == nil { + sv = &types.InvalidOutputLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidParameters(v **types.InvalidParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidParameters + if *v == nil { + sv = &types.InvalidParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidPermissionType(v **types.InvalidPermissionType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidPermissionType + if *v == nil { + sv = &types.InvalidPermissionType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidPluginName(v **types.InvalidPluginName, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidPluginName + if *v == nil { + sv = &types.InvalidPluginName{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidPolicyAttributeException(v **types.InvalidPolicyAttributeException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidPolicyAttributeException + if *v == nil { + sv = &types.InvalidPolicyAttributeException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidPolicyTypeException(v **types.InvalidPolicyTypeException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidPolicyTypeException + if *v == nil { + sv = &types.InvalidPolicyTypeException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidResourceId(v **types.InvalidResourceId, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidResourceId + if *v == nil { + sv = &types.InvalidResourceId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidResourceType(v **types.InvalidResourceType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidResourceType + if *v == nil { + sv = &types.InvalidResourceType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidResultAttributeException(v **types.InvalidResultAttributeException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidResultAttributeException + if *v == nil { + sv = &types.InvalidResultAttributeException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidRole(v **types.InvalidRole, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidRole + if *v == nil { + sv = &types.InvalidRole{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidSchedule(v **types.InvalidSchedule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidSchedule + if *v == nil { + sv = &types.InvalidSchedule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidTag(v **types.InvalidTag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidTag + if *v == nil { + sv = &types.InvalidTag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidTarget(v **types.InvalidTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidTarget + if *v == nil { + sv = &types.InvalidTarget{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidTargetMaps(v **types.InvalidTargetMaps, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidTargetMaps + if *v == nil { + sv = &types.InvalidTargetMaps{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidTypeNameException(v **types.InvalidTypeNameException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidTypeNameException + if *v == nil { + sv = &types.InvalidTypeNameException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidUpdate(v **types.InvalidUpdate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidUpdate + if *v == nil { + sv = &types.InvalidUpdate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryDeletionsList(v *[]types.InventoryDeletionStatusItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InventoryDeletionStatusItem + if *v == nil { + cv = []types.InventoryDeletionStatusItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InventoryDeletionStatusItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInventoryDeletionStatusItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryDeletionStatusItem(v **types.InventoryDeletionStatusItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryDeletionStatusItem + if *v == nil { + sv = &types.InventoryDeletionStatusItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeletionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.DeletionId = ptr.String(jtv) + } + + case "DeletionStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DeletionStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected InventoryDeletionStartTime to be a JSON Number, got %T instead", value) + + } + } + + case "DeletionSummary": + if err := awsAwsjson11_deserializeDocumentInventoryDeletionSummary(&sv.DeletionSummary, value); err != nil { + return err + } + + case "LastStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryDeletionStatus to be of type string, got %T instead", value) + } + sv.LastStatus = types.InventoryDeletionStatus(jtv) + } + + case "LastStatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryDeletionLastStatusMessage to be of type string, got %T instead", value) + } + sv.LastStatusMessage = ptr.String(jtv) + } + + case "LastStatusUpdateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastStatusUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected InventoryDeletionLastStatusUpdateTime to be a JSON Number, got %T instead", value) + + } + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryDeletionSummary(v **types.InventoryDeletionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryDeletionSummary + if *v == nil { + sv = &types.InventoryDeletionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RemainingCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RemainingCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RemainingCount = int32(i64) + } + + case "SummaryItems": + if err := awsAwsjson11_deserializeDocumentInventoryDeletionSummaryItems(&sv.SummaryItems, value); err != nil { + return err + } + + case "TotalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TotalCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalCount = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryDeletionSummaryItem(v **types.InventoryDeletionSummaryItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryDeletionSummaryItem + if *v == nil { + sv = &types.InventoryDeletionSummaryItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ResourceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = int32(i64) + } + + case "RemainingCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RemainingCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RemainingCount = int32(i64) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemSchemaVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryDeletionSummaryItems(v *[]types.InventoryDeletionSummaryItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InventoryDeletionSummaryItem + if *v == nil { + cv = []types.InventoryDeletionSummaryItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InventoryDeletionSummaryItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInventoryDeletionSummaryItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryItemAttribute(v **types.InventoryItemAttribute, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryItemAttribute + if *v == nil { + sv = &types.InventoryItemAttribute{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryAttributeDataType to be of type string, got %T instead", value) + } + sv.DataType = types.InventoryAttributeDataType(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemAttributeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryItemAttributeList(v *[]types.InventoryItemAttribute, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InventoryItemAttribute + if *v == nil { + cv = []types.InventoryItemAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InventoryItemAttribute + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInventoryItemAttribute(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryItemEntry(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryItemEntryList(v *[]map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]string + if *v == nil { + cv = []map[string]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]string + if err := awsAwsjson11_deserializeDocumentInventoryItemEntry(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryItemSchema(v **types.InventoryItemSchema, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryItemSchema + if *v == nil { + sv = &types.InventoryItemSchema{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attributes": + if err := awsAwsjson11_deserializeDocumentInventoryItemAttributeList(&sv.Attributes, value); err != nil { + return err + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryTypeDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemSchemaVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryItemSchemaResultList(v *[]types.InventoryItemSchema, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InventoryItemSchema + if *v == nil { + cv = []types.InventoryItemSchema{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InventoryItemSchema + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInventoryItemSchema(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryResultEntity(v **types.InventoryResultEntity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryResultEntity + if *v == nil { + sv = &types.InventoryResultEntity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Data": + if err := awsAwsjson11_deserializeDocumentInventoryResultItemMap(&sv.Data, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryResultEntityId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryResultEntityList(v *[]types.InventoryResultEntity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InventoryResultEntity + if *v == nil { + cv = []types.InventoryResultEntity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InventoryResultEntity + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInventoryResultEntity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryResultItem(v **types.InventoryResultItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InventoryResultItem + if *v == nil { + sv = &types.InventoryResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CaptureTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemCaptureTime to be of type string, got %T instead", value) + } + sv.CaptureTime = ptr.String(jtv) + } + + case "Content": + if err := awsAwsjson11_deserializeDocumentInventoryItemEntryList(&sv.Content, value); err != nil { + return err + } + + case "ContentHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemContentHash to be of type string, got %T instead", value) + } + sv.ContentHash = ptr.String(jtv) + } + + case "SchemaVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemSchemaVersion to be of type string, got %T instead", value) + } + sv.SchemaVersion = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInventoryResultItemMap(v *map[string]types.InventoryResultItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.InventoryResultItem + if *v == nil { + mv = map[string]types.InventoryResultItem{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.InventoryResultItem + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentInventoryResultItem(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentInvocationDoesNotExist(v **types.InvocationDoesNotExist, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvocationDoesNotExist + if *v == nil { + sv = &types.InvocationDoesNotExist{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentItemContentMismatchException(v **types.ItemContentMismatchException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ItemContentMismatchException + if *v == nil { + sv = &types.ItemContentMismatchException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentItemSizeLimitExceededException(v **types.ItemSizeLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ItemSizeLimitExceededException + if *v == nil { + sv = &types.ItemSizeLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLoggingInfo(v **types.LoggingInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LoggingInfo + if *v == nil { + sv = &types.LoggingInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.S3BucketName = ptr.String(jtv) + } + + case "S3KeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3KeyPrefix to be of type string, got %T instead", value) + } + sv.S3KeyPrefix = ptr.String(jtv) + } + + case "S3Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Region to be of type string, got %T instead", value) + } + sv.S3Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowAutomationParameters(v **types.MaintenanceWindowAutomationParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowAutomationParameters + if *v == nil { + sv = &types.MaintenanceWindowAutomationParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Parameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecution(v **types.MaintenanceWindowExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowExecution + if *v == nil { + sv = &types.MaintenanceWindowExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.MaintenanceWindowExecutionStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionList(v *[]types.MaintenanceWindowExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowExecution + if *v == nil { + cv = []types.MaintenanceWindowExecution{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowExecution + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecution(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskIdentity(v **types.MaintenanceWindowExecutionTaskIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowExecutionTaskIdentity + if *v == nil { + sv = &types.MaintenanceWindowExecutionTaskIdentity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.MaintenanceWindowExecutionStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskId to be of type string, got %T instead", value) + } + sv.TaskExecutionId = ptr.String(jtv) + } + + case "TaskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskType to be of type string, got %T instead", value) + } + sv.TaskType = types.MaintenanceWindowTaskType(jtv) + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskIdentityList(v *[]types.MaintenanceWindowExecutionTaskIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowExecutionTaskIdentity + if *v == nil { + cv = []types.MaintenanceWindowExecutionTaskIdentity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowExecutionTaskIdentity + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskIdentity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskInvocationIdentity(v **types.MaintenanceWindowExecutionTaskInvocationIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowExecutionTaskInvocationIdentity + if *v == nil { + sv = &types.MaintenanceWindowExecutionTaskInvocationIdentity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "InvocationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskInvocationId to be of type string, got %T instead", value) + } + sv.InvocationId = ptr.String(jtv) + } + + case "OwnerInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerInformation to be of type string, got %T instead", value) + } + sv.OwnerInformation = ptr.String(jtv) + } + + case "Parameters": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskInvocationParameters to be of type string, got %T instead", value) + } + sv.Parameters = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.MaintenanceWindowExecutionStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TaskExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskId to be of type string, got %T instead", value) + } + sv.TaskExecutionId = ptr.String(jtv) + } + + case "TaskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskType to be of type string, got %T instead", value) + } + sv.TaskType = types.MaintenanceWindowTaskType(jtv) + } + + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + case "WindowTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskTargetId to be of type string, got %T instead", value) + } + sv.WindowTargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskInvocationIdentityList(v *[]types.MaintenanceWindowExecutionTaskInvocationIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowExecutionTaskInvocationIdentity + if *v == nil { + cv = []types.MaintenanceWindowExecutionTaskInvocationIdentity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowExecutionTaskInvocationIdentity + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskInvocationIdentity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowIdentity(v **types.MaintenanceWindowIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowIdentity + if *v == nil { + sv = &types.MaintenanceWindowIdentity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Cutoff": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowCutoff to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Cutoff = int32(i64) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDurationHours to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected MaintenanceWindowEnabled to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + + case "EndDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.EndDate = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NextExecutionTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.NextExecutionTime = ptr.String(jtv) + } + + case "Schedule": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowSchedule to be of type string, got %T instead", value) + } + sv.Schedule = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "ScheduleTimezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTimezone to be of type string, got %T instead", value) + } + sv.ScheduleTimezone = ptr.String(jtv) + } + + case "StartDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.StartDate = ptr.String(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowIdentityForTarget(v **types.MaintenanceWindowIdentityForTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowIdentityForTarget + if *v == nil { + sv = &types.MaintenanceWindowIdentityForTarget{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowIdentityList(v *[]types.MaintenanceWindowIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowIdentity + if *v == nil { + cv = []types.MaintenanceWindowIdentity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowIdentity + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowIdentity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowLambdaParameters(v **types.MaintenanceWindowLambdaParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowLambdaParameters + if *v == nil { + sv = &types.MaintenanceWindowLambdaParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClientContext": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowLambdaClientContext to be of type string, got %T instead", value) + } + sv.ClientContext = ptr.String(jtv) + } + + case "Payload": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowLambdaPayload to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode MaintenanceWindowLambdaPayload, %w", err) + } + sv.Payload = dv + } + + case "Qualifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowLambdaQualifier to be of type string, got %T instead", value) + } + sv.Qualifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowRunCommandParameters(v **types.MaintenanceWindowRunCommandParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowRunCommandParameters + if *v == nil { + sv = &types.MaintenanceWindowRunCommandParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchOutputConfig": + if err := awsAwsjson11_deserializeDocumentCloudWatchOutputConfig(&sv.CloudWatchOutputConfig, value); err != nil { + return err + } + + case "Comment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Comment to be of type string, got %T instead", value) + } + sv.Comment = ptr.String(jtv) + } + + case "DocumentHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentHash to be of type string, got %T instead", value) + } + sv.DocumentHash = ptr.String(jtv) + } + + case "DocumentHashType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentHashType to be of type string, got %T instead", value) + } + sv.DocumentHashType = types.DocumentHashType(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "NotificationConfig": + if err := awsAwsjson11_deserializeDocumentNotificationConfig(&sv.NotificationConfig, value); err != nil { + return err + } + + case "OutputS3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.OutputS3BucketName = ptr.String(jtv) + } + + case "OutputS3KeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3KeyPrefix to be of type string, got %T instead", value) + } + sv.OutputS3KeyPrefix = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameters(&sv.Parameters, value); err != nil { + return err + } + + case "ServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRoleArn = ptr.String(jtv) + } + + case "TimeoutSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimeoutSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowsForTargetList(v *[]types.MaintenanceWindowIdentityForTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowIdentityForTarget + if *v == nil { + cv = []types.MaintenanceWindowIdentityForTarget{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowIdentityForTarget + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowIdentityForTarget(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowStepFunctionsParameters(v **types.MaintenanceWindowStepFunctionsParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowStepFunctionsParameters + if *v == nil { + sv = &types.MaintenanceWindowStepFunctionsParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Input": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStepFunctionsInput to be of type string, got %T instead", value) + } + sv.Input = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStepFunctionsName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTarget(v **types.MaintenanceWindowTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowTarget + if *v == nil { + sv = &types.MaintenanceWindowTarget{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerInformation to be of type string, got %T instead", value) + } + sv.OwnerInformation = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.MaintenanceWindowResourceType(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTargetId to be of type string, got %T instead", value) + } + sv.WindowTargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTargetList(v *[]types.MaintenanceWindowTarget, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowTarget + if *v == nil { + cv = []types.MaintenanceWindowTarget{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowTarget + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTarget(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTask(v **types.MaintenanceWindowTask, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowTask + if *v == nil { + sv = &types.MaintenanceWindowTask{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "CutoffBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskCutoffBehavior to be of type string, got %T instead", value) + } + sv.CutoffBehavior = types.MaintenanceWindowTaskCutoffBehavior(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LoggingInfo": + if err := awsAwsjson11_deserializeDocumentLoggingInfo(&sv.LoggingInfo, value); err != nil { + return err + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = int32(i64) + } + + case "ServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRoleArn = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskParameters": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameters(&sv.TaskParameters, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskType to be of type string, got %T instead", value) + } + sv.Type = types.MaintenanceWindowTaskType(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskId to be of type string, got %T instead", value) + } + sv.WindowTaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTaskInvocationParameters(v **types.MaintenanceWindowTaskInvocationParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowTaskInvocationParameters + if *v == nil { + sv = &types.MaintenanceWindowTaskInvocationParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Automation": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowAutomationParameters(&sv.Automation, value); err != nil { + return err + } + + case "Lambda": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowLambdaParameters(&sv.Lambda, value); err != nil { + return err + } + + case "RunCommand": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowRunCommandParameters(&sv.RunCommand, value); err != nil { + return err + } + + case "StepFunctions": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowStepFunctionsParameters(&sv.StepFunctions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTaskList(v *[]types.MaintenanceWindowTask, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MaintenanceWindowTask + if *v == nil { + cv = []types.MaintenanceWindowTask{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MaintenanceWindowTask + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTask(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameters(v *map[string]types.MaintenanceWindowTaskParameterValueExpression, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.MaintenanceWindowTaskParameterValueExpression + if *v == nil { + mv = map[string]types.MaintenanceWindowTaskParameterValueExpression{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.MaintenanceWindowTaskParameterValueExpression + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameterValueExpression(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParametersList(v *[]map[string]types.MaintenanceWindowTaskParameterValueExpression, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]types.MaintenanceWindowTaskParameterValueExpression + if *v == nil { + cv = []map[string]types.MaintenanceWindowTaskParameterValueExpression{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]types.MaintenanceWindowTaskParameterValueExpression + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameters(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameterValueExpression(v **types.MaintenanceWindowTaskParameterValueExpression, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaintenanceWindowTaskParameterValueExpression + if *v == nil { + sv = &types.MaintenanceWindowTaskParameterValueExpression{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Values": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameterValueList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameterValueList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskParameterValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMalformedResourcePolicyDocumentException(v **types.MalformedResourcePolicyDocumentException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MalformedResourcePolicyDocumentException + if *v == nil { + sv = &types.MalformedResourcePolicyDocumentException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMaxDocumentSizeExceeded(v **types.MaxDocumentSizeExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MaxDocumentSizeExceeded + if *v == nil { + sv = &types.MaxDocumentSizeExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMetadataMap(v *map[string]types.MetadataValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.MetadataValue + if *v == nil { + mv = map[string]types.MetadataValue{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.MetadataValue + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentMetadataValue(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentMetadataValue(v **types.MetadataValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetadataValue + if *v == nil { + sv = &types.MetadataValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetadataValueString to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNode(v **types.Node, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Node + if *v == nil { + sv = &types.Node{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CaptureTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CaptureTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected NodeCaptureTime to be a JSON Number, got %T instead", value) + + } + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "NodeType": + if err := awsAwsjson11_deserializeDocumentNodeType(&sv.NodeType, value); err != nil { + return err + } + + case "Owner": + if err := awsAwsjson11_deserializeDocumentNodeOwnerInfo(&sv.Owner, value); err != nil { + return err + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeRegion to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeList(v *[]types.Node, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Node + if *v == nil { + cv = []types.Node{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Node + destAddr := &col + if err := awsAwsjson11_deserializeDocumentNode(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeOwnerInfo(v **types.NodeOwnerInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NodeOwnerInfo + if *v == nil { + sv = &types.NodeOwnerInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeAccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "OrganizationalUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeOrganizationalUnitId to be of type string, got %T instead", value) + } + sv.OrganizationalUnitId = ptr.String(jtv) + } + + case "OrganizationalUnitPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeOrganizationalUnitPath to be of type string, got %T instead", value) + } + sv.OrganizationalUnitPath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeSummary(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeSummaryList(v *[]map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]string + if *v == nil { + cv = []map[string]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]string + if err := awsAwsjson11_deserializeDocumentNodeSummary(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeType(v *types.NodeType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.NodeType +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "Instance": + var mv types.InstanceInfo + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentInstanceInfo(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.NodeTypeMemberInstance{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson11_deserializeDocumentNoLongerSupportedException(v **types.NoLongerSupportedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NoLongerSupportedException + if *v == nil { + sv = &types.NoLongerSupportedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNonCompliantSummary(v **types.NonCompliantSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NonCompliantSummary + if *v == nil { + sv = &types.NonCompliantSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NonCompliantCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NonCompliantCount = int32(i64) + } + + case "SeveritySummary": + if err := awsAwsjson11_deserializeDocumentSeveritySummary(&sv.SeveritySummary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNormalStringMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentNotificationConfig(v **types.NotificationConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NotificationConfig + if *v == nil { + sv = &types.NotificationConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NotificationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotificationArn to be of type string, got %T instead", value) + } + sv.NotificationArn = ptr.String(jtv) + } + + case "NotificationEvents": + if err := awsAwsjson11_deserializeDocumentNotificationEventList(&sv.NotificationEvents, value); err != nil { + return err + } + + case "NotificationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotificationType to be of type string, got %T instead", value) + } + sv.NotificationType = types.NotificationType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNotificationEventList(v *[]types.NotificationEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NotificationEvent + if *v == nil { + cv = []types.NotificationEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NotificationEvent + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NotificationEvent to be of type string, got %T instead", value) + } + col = types.NotificationEvent(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsEntity(v **types.OpsEntity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsEntity + if *v == nil { + sv = &types.OpsEntity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Data": + if err := awsAwsjson11_deserializeDocumentOpsEntityItemMap(&sv.Data, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsEntityId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsEntityItem(v **types.OpsEntityItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsEntityItem + if *v == nil { + sv = &types.OpsEntityItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CaptureTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsEntityItemCaptureTime to be of type string, got %T instead", value) + } + sv.CaptureTime = ptr.String(jtv) + } + + case "Content": + if err := awsAwsjson11_deserializeDocumentOpsEntityItemEntryList(&sv.Content, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsEntityItemEntry(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsEntityItemEntryList(v *[]map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]string + if *v == nil { + cv = []map[string]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]string + if err := awsAwsjson11_deserializeDocumentOpsEntityItemEntry(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsEntityItemMap(v *map[string]types.OpsEntityItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.OpsEntityItem + if *v == nil { + mv = map[string]types.OpsEntityItem{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.OpsEntityItem + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentOpsEntityItem(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsEntityList(v *[]types.OpsEntity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpsEntity + if *v == nil { + cv = []types.OpsEntity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsEntity + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsEntity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItem(v **types.OpsItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItem + if *v == nil { + sv = &types.OpsItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActualEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ActualEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ActualStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ActualStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemCategory to be of type string, got %T instead", value) + } + sv.Category = ptr.String(jtv) + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LastModifiedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastModifiedBy = ptr.String(jtv) + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Notifications": + if err := awsAwsjson11_deserializeDocumentOpsItemNotifications(&sv.Notifications, value); err != nil { + return err + } + + case "OperationalData": + if err := awsAwsjson11_deserializeDocumentOpsItemOperationalData(&sv.OperationalData, value); err != nil { + return err + } + + case "OpsItemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemArn to be of type string, got %T instead", value) + } + sv.OpsItemArn = ptr.String(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemId to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "OpsItemType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemType to be of type string, got %T instead", value) + } + sv.OpsItemType = ptr.String(jtv) + } + + case "PlannedEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PlannedEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "PlannedStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PlannedStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OpsItemPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = ptr.Int32(int32(i64)) + } + + case "RelatedOpsItems": + if err := awsAwsjson11_deserializeDocumentRelatedOpsItems(&sv.RelatedOpsItems, value); err != nil { + return err + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemSeverity to be of type string, got %T instead", value) + } + sv.Severity = ptr.String(jtv) + } + + case "Source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemSource to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemStatus to be of type string, got %T instead", value) + } + sv.Status = types.OpsItemStatus(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemAccessDeniedException(v **types.OpsItemAccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemAccessDeniedException + if *v == nil { + sv = &types.OpsItemAccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemAlreadyExistsException(v **types.OpsItemAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemAlreadyExistsException + if *v == nil { + sv = &types.OpsItemAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemConflictException(v **types.OpsItemConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemConflictException + if *v == nil { + sv = &types.OpsItemConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemDataValue(v **types.OpsItemDataValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemDataValue + if *v == nil { + sv = &types.OpsItemDataValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemDataType to be of type string, got %T instead", value) + } + sv.Type = types.OpsItemDataType(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemDataValueString to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemEventSummaries(v *[]types.OpsItemEventSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpsItemEventSummary + if *v == nil { + cv = []types.OpsItemEventSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsItemEventSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsItemEventSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemEventSummary(v **types.OpsItemEventSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemEventSummary + if *v == nil { + sv = &types.OpsItemEventSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedBy": + if err := awsAwsjson11_deserializeDocumentOpsItemIdentity(&sv.CreatedBy, value); err != nil { + return err + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Detail": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Detail = ptr.String(jtv) + } + + case "DetailType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DetailType = ptr.String(jtv) + } + + case "EventId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EventId = ptr.String(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "Source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemIdentity(v **types.OpsItemIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemIdentity + if *v == nil { + sv = &types.OpsItemIdentity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemInvalidParameterException(v **types.OpsItemInvalidParameterException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemInvalidParameterException + if *v == nil { + sv = &types.OpsItemInvalidParameterException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ParameterNames": + if err := awsAwsjson11_deserializeDocumentOpsItemParameterNamesList(&sv.ParameterNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemLimitExceededException(v **types.OpsItemLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemLimitExceededException + if *v == nil { + sv = &types.OpsItemLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Limit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Limit = int32(i64) + } + + case "LimitType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LimitType = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ResourceTypes": + if err := awsAwsjson11_deserializeDocumentOpsItemParameterNamesList(&sv.ResourceTypes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemNotFoundException(v **types.OpsItemNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemNotFoundException + if *v == nil { + sv = &types.OpsItemNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemNotification(v **types.OpsItemNotification, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemNotification + if *v == nil { + sv = &types.OpsItemNotification{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemNotifications(v *[]types.OpsItemNotification, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpsItemNotification + if *v == nil { + cv = []types.OpsItemNotification{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsItemNotification + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsItemNotification(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemOperationalData(v *map[string]types.OpsItemDataValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.OpsItemDataValue + if *v == nil { + mv = map[string]types.OpsItemDataValue{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.OpsItemDataValue + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentOpsItemDataValue(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemParameterNamesList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemAlreadyExistsException(v **types.OpsItemRelatedItemAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemRelatedItemAlreadyExistsException + if *v == nil { + sv = &types.OpsItemRelatedItemAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemId to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "ResourceUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationResourceUri to be of type string, got %T instead", value) + } + sv.ResourceUri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemAssociationNotFoundException(v **types.OpsItemRelatedItemAssociationNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemRelatedItemAssociationNotFoundException + if *v == nil { + sv = &types.OpsItemRelatedItemAssociationNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummaries(v *[]types.OpsItemRelatedItemSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpsItemRelatedItemSummary + if *v == nil { + cv = []types.OpsItemRelatedItemSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsItemRelatedItemSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummary(v **types.OpsItemRelatedItemSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemRelatedItemSummary + if *v == nil { + sv = &types.OpsItemRelatedItemSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationType to be of type string, got %T instead", value) + } + sv.AssociationType = ptr.String(jtv) + } + + case "CreatedBy": + if err := awsAwsjson11_deserializeDocumentOpsItemIdentity(&sv.CreatedBy, value); err != nil { + return err + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedBy": + if err := awsAwsjson11_deserializeDocumentOpsItemIdentity(&sv.LastModifiedBy, value); err != nil { + return err + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemId to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "ResourceUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationResourceUri to be of type string, got %T instead", value) + } + sv.ResourceUri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemSummaries(v *[]types.OpsItemSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpsItemSummary + if *v == nil { + cv = []types.OpsItemSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsItemSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsItemSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemSummary(v **types.OpsItemSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemSummary + if *v == nil { + sv = &types.OpsItemSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActualEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ActualEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ActualStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ActualStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemCategory to be of type string, got %T instead", value) + } + sv.Category = ptr.String(jtv) + } + + case "CreatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastModifiedBy = ptr.String(jtv) + } + + case "LastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "OperationalData": + if err := awsAwsjson11_deserializeDocumentOpsItemOperationalData(&sv.OperationalData, value); err != nil { + return err + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemId to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "OpsItemType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemType to be of type string, got %T instead", value) + } + sv.OpsItemType = ptr.String(jtv) + } + + case "PlannedEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PlannedEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "PlannedStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PlannedStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OpsItemPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = ptr.Int32(int32(i64)) + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemSeverity to be of type string, got %T instead", value) + } + sv.Severity = ptr.String(jtv) + } + + case "Source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemSource to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemStatus to be of type string, got %T instead", value) + } + sv.Status = types.OpsItemStatus(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadata(v **types.OpsMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadata + if *v == nil { + sv = &types.OpsMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedUser": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastModifiedUser = ptr.String(jtv) + } + + case "OpsMetadataArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsMetadataArn to be of type string, got %T instead", value) + } + sv.OpsMetadataArn = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsMetadataResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataAlreadyExistsException(v **types.OpsMetadataAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadataAlreadyExistsException + if *v == nil { + sv = &types.OpsMetadataAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataInvalidArgumentException(v **types.OpsMetadataInvalidArgumentException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadataInvalidArgumentException + if *v == nil { + sv = &types.OpsMetadataInvalidArgumentException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataKeyLimitExceededException(v **types.OpsMetadataKeyLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadataKeyLimitExceededException + if *v == nil { + sv = &types.OpsMetadataKeyLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataLimitExceededException(v **types.OpsMetadataLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadataLimitExceededException + if *v == nil { + sv = &types.OpsMetadataLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataList(v *[]types.OpsMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OpsMetadata + if *v == nil { + cv = []types.OpsMetadata{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsMetadata + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsMetadata(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataNotFoundException(v **types.OpsMetadataNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadataNotFoundException + if *v == nil { + sv = &types.OpsMetadataNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsMetadataTooManyUpdatesException(v **types.OpsMetadataTooManyUpdatesException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsMetadataTooManyUpdatesException + if *v == nil { + sv = &types.OpsMetadataTooManyUpdatesException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputSource(v **types.OutputSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OutputSource + if *v == nil { + sv = &types.OutputSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutputSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutputSourceId to be of type string, got %T instead", value) + } + sv.OutputSourceId = ptr.String(jtv) + } + + case "OutputSourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutputSourceType to be of type string, got %T instead", value) + } + sv.OutputSourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameter(v **types.Parameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Parameter + if *v == nil { + sv = &types.Parameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ARN = ptr.String(jtv) + } + + case "DataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterDataType to be of type string, got %T instead", value) + } + sv.DataType = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Selector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterSelector to be of type string, got %T instead", value) + } + sv.Selector = ptr.String(jtv) + } + + case "SourceResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceResult = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterType to be of type string, got %T instead", value) + } + sv.Type = types.ParameterType(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PSParameterVersion to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterAlreadyExists(v **types.ParameterAlreadyExists, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterAlreadyExists + if *v == nil { + sv = &types.ParameterAlreadyExists{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterHistory(v **types.ParameterHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterHistory + if *v == nil { + sv = &types.ParameterHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowedPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AllowedPattern to be of type string, got %T instead", value) + } + sv.AllowedPattern = ptr.String(jtv) + } + + case "DataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterDataType to be of type string, got %T instead", value) + } + sv.DataType = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "KeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterKeyId to be of type string, got %T instead", value) + } + sv.KeyId = ptr.String(jtv) + } + + case "Labels": + if err := awsAwsjson11_deserializeDocumentParameterLabelList(&sv.Labels, value); err != nil { + return err + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedUser": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastModifiedUser = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Policies": + if err := awsAwsjson11_deserializeDocumentParameterPolicyList(&sv.Policies, value); err != nil { + return err + } + + case "Tier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterTier to be of type string, got %T instead", value) + } + sv.Tier = types.ParameterTier(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterType to be of type string, got %T instead", value) + } + sv.Type = types.ParameterType(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PSParameterVersion to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterHistoryList(v *[]types.ParameterHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ParameterHistory + if *v == nil { + cv = []types.ParameterHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ParameterHistory + destAddr := &col + if err := awsAwsjson11_deserializeDocumentParameterHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterInlinePolicy(v **types.ParameterInlinePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterInlinePolicy + if *v == nil { + sv = &types.ParameterInlinePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PolicyStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PolicyStatus = ptr.String(jtv) + } + + case "PolicyText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PolicyText = ptr.String(jtv) + } + + case "PolicyType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PolicyType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterLabelList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterLabel to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterLimitExceeded(v **types.ParameterLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterLimitExceeded + if *v == nil { + sv = &types.ParameterLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterList(v *[]types.Parameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Parameter + if *v == nil { + cv = []types.Parameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Parameter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterMaxVersionLimitExceeded(v **types.ParameterMaxVersionLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterMaxVersionLimitExceeded + if *v == nil { + sv = &types.ParameterMaxVersionLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterMetadata(v **types.ParameterMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterMetadata + if *v == nil { + sv = &types.ParameterMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowedPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AllowedPattern to be of type string, got %T instead", value) + } + sv.AllowedPattern = ptr.String(jtv) + } + + case "ARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ARN = ptr.String(jtv) + } + + case "DataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterDataType to be of type string, got %T instead", value) + } + sv.DataType = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "KeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterKeyId to be of type string, got %T instead", value) + } + sv.KeyId = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedUser": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastModifiedUser = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Policies": + if err := awsAwsjson11_deserializeDocumentParameterPolicyList(&sv.Policies, value); err != nil { + return err + } + + case "Tier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterTier to be of type string, got %T instead", value) + } + sv.Tier = types.ParameterTier(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterType to be of type string, got %T instead", value) + } + sv.Type = types.ParameterType(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PSParameterVersion to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterMetadataList(v *[]types.ParameterMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ParameterMetadata + if *v == nil { + cv = []types.ParameterMetadata{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ParameterMetadata + destAddr := &col + if err := awsAwsjson11_deserializeDocumentParameterMetadata(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterNameList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PSParameterName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterNotFound(v **types.ParameterNotFound, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterNotFound + if *v == nil { + sv = &types.ParameterNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterPatternMismatchException(v **types.ParameterPatternMismatchException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterPatternMismatchException + if *v == nil { + sv = &types.ParameterPatternMismatchException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterPolicyList(v *[]types.ParameterInlinePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ParameterInlinePolicy + if *v == nil { + cv = []types.ParameterInlinePolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ParameterInlinePolicy + destAddr := &col + if err := awsAwsjson11_deserializeDocumentParameterInlinePolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameters(v *map[string][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string][]string + if *v == nil { + mv = map[string][]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal []string + mapVar := parsedVal + if err := awsAwsjson11_deserializeDocumentParameterValueList(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterValueList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterVersionLabelLimitExceeded(v **types.ParameterVersionLabelLimitExceeded, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterVersionLabelLimitExceeded + if *v == nil { + sv = &types.ParameterVersionLabelLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParameterVersionNotFound(v **types.ParameterVersionNotFound, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterVersionNotFound + if *v == nil { + sv = &types.ParameterVersionNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParentStepDetails(v **types.ParentStepDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParentStepDetails + if *v == nil { + sv = &types.ParentStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationActionName to be of type string, got %T instead", value) + } + sv.Action = ptr.String(jtv) + } + + case "Iteration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Iteration = ptr.Int32(int32(i64)) + } + + case "IteratorValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IteratorValue = ptr.String(jtv) + } + + case "StepExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StepExecutionId = ptr.String(jtv) + } + + case "StepName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StepName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatch(v **types.Patch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Patch + if *v == nil { + sv = &types.Patch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdvisoryIds": + if err := awsAwsjson11_deserializeDocumentPatchAdvisoryIdList(&sv.AdvisoryIds, value); err != nil { + return err + } + + case "Arch": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchArch to be of type string, got %T instead", value) + } + sv.Arch = ptr.String(jtv) + } + + case "BugzillaIds": + if err := awsAwsjson11_deserializeDocumentPatchBugzillaIdList(&sv.BugzillaIds, value); err != nil { + return err + } + + case "Classification": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchClassification to be of type string, got %T instead", value) + } + sv.Classification = ptr.String(jtv) + } + + case "ContentUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchContentUrl to be of type string, got %T instead", value) + } + sv.ContentUrl = ptr.String(jtv) + } + + case "CVEIds": + if err := awsAwsjson11_deserializeDocumentPatchCVEIdList(&sv.CVEIds, value); err != nil { + return err + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Epoch": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PatchEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Epoch = int32(i64) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "KbNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchKbNumber to be of type string, got %T instead", value) + } + sv.KbNumber = ptr.String(jtv) + } + + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchLanguage to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "MsrcNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchMsrcNumber to be of type string, got %T instead", value) + } + sv.MsrcNumber = ptr.String(jtv) + } + + case "MsrcSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchMsrcSeverity to be of type string, got %T instead", value) + } + sv.MsrcSeverity = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Product": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchProduct to be of type string, got %T instead", value) + } + sv.Product = ptr.String(jtv) + } + + case "ProductFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchProductFamily to be of type string, got %T instead", value) + } + sv.ProductFamily = ptr.String(jtv) + } + + case "Release": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchRelease to be of type string, got %T instead", value) + } + sv.Release = ptr.String(jtv) + } + + case "ReleaseDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReleaseDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Repository": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchRepository to be of type string, got %T instead", value) + } + sv.Repository = ptr.String(jtv) + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchSeverity to be of type string, got %T instead", value) + } + sv.Severity = ptr.String(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "Vendor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchVendor to be of type string, got %T instead", value) + } + sv.Vendor = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchAdvisoryIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchAdvisoryId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchBaselineIdentity(v **types.PatchBaselineIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchBaselineIdentity + if *v == nil { + sv = &types.PatchBaselineIdentity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineDescription to be of type string, got %T instead", value) + } + sv.BaselineDescription = ptr.String(jtv) + } + + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "BaselineName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineName to be of type string, got %T instead", value) + } + sv.BaselineName = ptr.String(jtv) + } + + case "DefaultBaseline": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected DefaultBaseline to be of type *bool, got %T instead", value) + } + sv.DefaultBaseline = jtv + } + + case "OperatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperatingSystem to be of type string, got %T instead", value) + } + sv.OperatingSystem = types.OperatingSystem(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchBaselineIdentityList(v *[]types.PatchBaselineIdentity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatchBaselineIdentity + if *v == nil { + cv = []types.PatchBaselineIdentity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatchBaselineIdentity + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatchBaselineIdentity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchBugzillaIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchBugzillaId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchComplianceData(v **types.PatchComplianceData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchComplianceData + if *v == nil { + sv = &types.PatchComplianceData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Classification": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchClassification to be of type string, got %T instead", value) + } + sv.Classification = ptr.String(jtv) + } + + case "CVEIds": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchCVEIds to be of type string, got %T instead", value) + } + sv.CVEIds = ptr.String(jtv) + } + + case "InstalledTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InstalledTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "KBId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchKbNumber to be of type string, got %T instead", value) + } + sv.KBId = ptr.String(jtv) + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchSeverity to be of type string, got %T instead", value) + } + sv.Severity = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceDataState to be of type string, got %T instead", value) + } + sv.State = types.PatchComplianceDataState(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchComplianceDataList(v *[]types.PatchComplianceData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatchComplianceData + if *v == nil { + cv = []types.PatchComplianceData{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatchComplianceData + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatchComplianceData(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchCVEIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchCVEId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchFilter(v **types.PatchFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchFilter + if *v == nil { + sv = &types.PatchFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchFilterKey to be of type string, got %T instead", value) + } + sv.Key = types.PatchFilterKey(jtv) + } + + case "Values": + if err := awsAwsjson11_deserializeDocumentPatchFilterValueList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchFilterGroup(v **types.PatchFilterGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchFilterGroup + if *v == nil { + sv = &types.PatchFilterGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PatchFilters": + if err := awsAwsjson11_deserializeDocumentPatchFilterList(&sv.PatchFilters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchFilterList(v *[]types.PatchFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatchFilter + if *v == nil { + cv = []types.PatchFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatchFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatchFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchFilterValueList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchFilterValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchGroupList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchGroup to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchGroupPatchBaselineMapping(v **types.PatchGroupPatchBaselineMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchGroupPatchBaselineMapping + if *v == nil { + sv = &types.PatchGroupPatchBaselineMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineIdentity": + if err := awsAwsjson11_deserializeDocumentPatchBaselineIdentity(&sv.BaselineIdentity, value); err != nil { + return err + } + + case "PatchGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchGroup to be of type string, got %T instead", value) + } + sv.PatchGroup = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchGroupPatchBaselineMappingList(v *[]types.PatchGroupPatchBaselineMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatchGroupPatchBaselineMapping + if *v == nil { + cv = []types.PatchGroupPatchBaselineMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatchGroupPatchBaselineMapping + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatchGroupPatchBaselineMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchList(v *[]types.Patch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Patch + if *v == nil { + cv = []types.Patch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Patch + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchPropertiesList(v *[]map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]string + if *v == nil { + cv = []map[string]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]string + if err := awsAwsjson11_deserializeDocumentPatchPropertyEntry(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchPropertyEntry(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchRule(v **types.PatchRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchRule + if *v == nil { + sv = &types.PatchRule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApproveAfterDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApproveAfterDays to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApproveAfterDays = ptr.Int32(int32(i64)) + } + + case "ApproveUntilDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchStringDateTime to be of type string, got %T instead", value) + } + sv.ApproveUntilDate = ptr.String(jtv) + } + + case "ComplianceLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceLevel to be of type string, got %T instead", value) + } + sv.ComplianceLevel = types.PatchComplianceLevel(jtv) + } + + case "EnableNonSecurity": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableNonSecurity = ptr.Bool(jtv) + } + + case "PatchFilterGroup": + if err := awsAwsjson11_deserializeDocumentPatchFilterGroup(&sv.PatchFilterGroup, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchRuleGroup(v **types.PatchRuleGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchRuleGroup + if *v == nil { + sv = &types.PatchRuleGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PatchRules": + if err := awsAwsjson11_deserializeDocumentPatchRuleList(&sv.PatchRules, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchRuleList(v *[]types.PatchRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatchRule + if *v == nil { + cv = []types.PatchRule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatchRule + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatchRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchSource(v **types.PatchSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchSource + if *v == nil { + sv = &types.PatchSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Configuration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchSourceConfiguration to be of type string, got %T instead", value) + } + sv.Configuration = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchSourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Products": + if err := awsAwsjson11_deserializeDocumentPatchSourceProductList(&sv.Products, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchSourceList(v *[]types.PatchSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatchSource + if *v == nil { + cv = []types.PatchSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatchSource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatchSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchSourceProductList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchSourceProduct to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPatchStatus(v **types.PatchStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatchStatus + if *v == nil { + sv = &types.PatchStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApprovalDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ApprovalDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ComplianceLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceLevel to be of type string, got %T instead", value) + } + sv.ComplianceLevel = types.PatchComplianceLevel(jtv) + } + + case "DeploymentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchDeploymentStatus to be of type string, got %T instead", value) + } + sv.DeploymentStatus = types.PatchDeploymentStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPlatformTypeList(v *[]types.PlatformType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PlatformType + if *v == nil { + cv = []types.PlatformType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PlatformType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + col = types.PlatformType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPoliciesLimitExceededException(v **types.PoliciesLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PoliciesLimitExceededException + if *v == nil { + sv = &types.PoliciesLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProgressCounters(v **types.ProgressCounters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProgressCounters + if *v == nil { + sv = &types.ProgressCounters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CancelledSteps": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CancelledSteps = int32(i64) + } + + case "FailedSteps": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedSteps = int32(i64) + } + + case "SuccessSteps": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SuccessSteps = int32(i64) + } + + case "TimedOutSteps": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimedOutSteps = int32(i64) + } + + case "TotalSteps": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalSteps = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRegionList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Region to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRegions(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Region to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRelatedOpsItem(v **types.RelatedOpsItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RelatedOpsItem + if *v == nil { + sv = &types.RelatedOpsItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRelatedOpsItems(v *[]types.RelatedOpsItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RelatedOpsItem + if *v == nil { + cv = []types.RelatedOpsItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RelatedOpsItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRelatedOpsItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedTargets(v **types.ResolvedTargets, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResolvedTargets + if *v == nil { + sv = &types.ResolvedTargets{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ParameterValues": + if err := awsAwsjson11_deserializeDocumentTargetParameterList(&sv.ParameterValues, value); err != nil { + return err + } + + case "Truncated": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Truncated = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceComplianceSummaryItem(v **types.ResourceComplianceSummaryItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceComplianceSummaryItem + if *v == nil { + sv = &types.ResourceComplianceSummaryItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceTypeName to be of type string, got %T instead", value) + } + sv.ComplianceType = ptr.String(jtv) + } + + case "CompliantSummary": + if err := awsAwsjson11_deserializeDocumentCompliantSummary(&sv.CompliantSummary, value); err != nil { + return err + } + + case "ExecutionSummary": + if err := awsAwsjson11_deserializeDocumentComplianceExecutionSummary(&sv.ExecutionSummary, value); err != nil { + return err + } + + case "NonCompliantSummary": + if err := awsAwsjson11_deserializeDocumentNonCompliantSummary(&sv.NonCompliantSummary, value); err != nil { + return err + } + + case "OverallSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceSeverity to be of type string, got %T instead", value) + } + sv.OverallSeverity = types.ComplianceSeverity(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + } + sv.Status = types.ComplianceStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceComplianceSummaryItemList(v *[]types.ResourceComplianceSummaryItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResourceComplianceSummaryItem + if *v == nil { + cv = []types.ResourceComplianceSummaryItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceComplianceSummaryItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceComplianceSummaryItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncAlreadyExistsException(v **types.ResourceDataSyncAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncAlreadyExistsException + if *v == nil { + sv = &types.ResourceDataSyncAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SyncName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncName to be of type string, got %T instead", value) + } + sv.SyncName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncAwsOrganizationsSource(v **types.ResourceDataSyncAwsOrganizationsSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncAwsOrganizationsSource + if *v == nil { + sv = &types.ResourceDataSyncAwsOrganizationsSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OrganizationalUnits": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncOrganizationalUnitList(&sv.OrganizationalUnits, value); err != nil { + return err + } + + case "OrganizationSourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncOrganizationSourceType to be of type string, got %T instead", value) + } + sv.OrganizationSourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncConflictException(v **types.ResourceDataSyncConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncConflictException + if *v == nil { + sv = &types.ResourceDataSyncConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncCountExceededException(v **types.ResourceDataSyncCountExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncCountExceededException + if *v == nil { + sv = &types.ResourceDataSyncCountExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncDestinationDataSharing(v **types.ResourceDataSyncDestinationDataSharing, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncDestinationDataSharing + if *v == nil { + sv = &types.ResourceDataSyncDestinationDataSharing{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DestinationDataSharingType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncDestinationDataSharingType to be of type string, got %T instead", value) + } + sv.DestinationDataSharingType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncInvalidConfigurationException(v **types.ResourceDataSyncInvalidConfigurationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncInvalidConfigurationException + if *v == nil { + sv = &types.ResourceDataSyncInvalidConfigurationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncItem(v **types.ResourceDataSyncItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncItem + if *v == nil { + sv = &types.ResourceDataSyncItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LastStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastResourceDataSyncStatus to be of type string, got %T instead", value) + } + sv.LastStatus = types.LastResourceDataSyncStatus(jtv) + } + + case "LastSuccessfulSyncTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSuccessfulSyncTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastSuccessfulResourceDataSyncTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastSyncStatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastResourceDataSyncMessage to be of type string, got %T instead", value) + } + sv.LastSyncStatusMessage = ptr.String(jtv) + } + + case "LastSyncTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSyncTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastResourceDataSyncTime to be a JSON Number, got %T instead", value) + + } + } + + case "S3Destination": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncS3Destination(&sv.S3Destination, value); err != nil { + return err + } + + case "SyncCreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SyncCreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ResourceDataSyncCreatedTime to be a JSON Number, got %T instead", value) + + } + } + + case "SyncLastModifiedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SyncLastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ResourceDataSyncLastModifiedTime to be a JSON Number, got %T instead", value) + + } + } + + case "SyncName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncName to be of type string, got %T instead", value) + } + sv.SyncName = ptr.String(jtv) + } + + case "SyncSource": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncSourceWithState(&sv.SyncSource, value); err != nil { + return err + } + + case "SyncType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncType to be of type string, got %T instead", value) + } + sv.SyncType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncItemList(v *[]types.ResourceDataSyncItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResourceDataSyncItem + if *v == nil { + cv = []types.ResourceDataSyncItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceDataSyncItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceDataSyncItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncNotFoundException(v **types.ResourceDataSyncNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncNotFoundException + if *v == nil { + sv = &types.ResourceDataSyncNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "SyncName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncName to be of type string, got %T instead", value) + } + sv.SyncName = ptr.String(jtv) + } + + case "SyncType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncType to be of type string, got %T instead", value) + } + sv.SyncType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncOrganizationalUnit(v **types.ResourceDataSyncOrganizationalUnit, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncOrganizationalUnit + if *v == nil { + sv = &types.ResourceDataSyncOrganizationalUnit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OrganizationalUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncOrganizationalUnitId to be of type string, got %T instead", value) + } + sv.OrganizationalUnitId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncOrganizationalUnitList(v *[]types.ResourceDataSyncOrganizationalUnit, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResourceDataSyncOrganizationalUnit + if *v == nil { + cv = []types.ResourceDataSyncOrganizationalUnit{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceDataSyncOrganizationalUnit + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceDataSyncOrganizationalUnit(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncS3Destination(v **types.ResourceDataSyncS3Destination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncS3Destination + if *v == nil { + sv = &types.ResourceDataSyncS3Destination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AWSKMSKeyARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncAWSKMSKeyARN to be of type string, got %T instead", value) + } + sv.AWSKMSKeyARN = ptr.String(jtv) + } + + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncS3BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "DestinationDataSharing": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncDestinationDataSharing(&sv.DestinationDataSharing, value); err != nil { + return err + } + + case "Prefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncS3Prefix to be of type string, got %T instead", value) + } + sv.Prefix = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncS3Region to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "SyncFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncS3Format to be of type string, got %T instead", value) + } + sv.SyncFormat = types.ResourceDataSyncS3Format(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncSourceRegionList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncSourceRegion to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceDataSyncSourceWithState(v **types.ResourceDataSyncSourceWithState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDataSyncSourceWithState + if *v == nil { + sv = &types.ResourceDataSyncSourceWithState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AwsOrganizationsSource": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncAwsOrganizationsSource(&sv.AwsOrganizationsSource, value); err != nil { + return err + } + + case "EnableAllOpsDataSources": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ResourceDataSyncEnableAllOpsDataSources to be of type *bool, got %T instead", value) + } + sv.EnableAllOpsDataSources = jtv + } + + case "IncludeFutureRegions": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ResourceDataSyncIncludeFutureRegions to be of type *bool, got %T instead", value) + } + sv.IncludeFutureRegions = jtv + } + + case "SourceRegions": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncSourceRegionList(&sv.SourceRegions, value); err != nil { + return err + } + + case "SourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncSourceType to be of type string, got %T instead", value) + } + sv.SourceType = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceDataSyncState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceInUseException + if *v == nil { + sv = &types.ResourceInUseException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceLimitExceededException + if *v == nil { + sv = &types.ResourceLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicyConflictException(v **types.ResourcePolicyConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePolicyConflictException + if *v == nil { + sv = &types.ResourcePolicyConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicyInvalidParameterException(v **types.ResourcePolicyInvalidParameterException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePolicyInvalidParameterException + if *v == nil { + sv = &types.ResourcePolicyInvalidParameterException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ParameterNames": + if err := awsAwsjson11_deserializeDocumentResourcePolicyParameterNamesList(&sv.ParameterNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicyLimitExceededException(v **types.ResourcePolicyLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePolicyLimitExceededException + if *v == nil { + sv = &types.ResourcePolicyLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Limit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Limit = int32(i64) + } + + case "LimitType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LimitType = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicyNotFoundException(v **types.ResourcePolicyNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePolicyNotFoundException + if *v == nil { + sv = &types.ResourcePolicyNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicyParameterNamesList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentReviewInformation(v **types.ReviewInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ReviewInformation + if *v == nil { + sv = &types.ReviewInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReviewedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReviewedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Reviewer": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Reviewer to be of type string, got %T instead", value) + } + sv.Reviewer = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReviewStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReviewInformationList(v *[]types.ReviewInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ReviewInformation + if *v == nil { + cv = []types.ReviewInformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReviewInformation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentReviewInformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRunbook(v **types.Runbook, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Runbook + if *v == nil { + sv = &types.Runbook{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Parameters, value); err != nil { + return err + } + + case "TargetLocations": + if err := awsAwsjson11_deserializeDocumentTargetLocations(&sv.TargetLocations, value); err != nil { + return err + } + + case "TargetMaps": + if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { + return err + } + + case "TargetParameterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationParameterKey to be of type string, got %T instead", value) + } + sv.TargetParameterName = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRunbooks(v *[]types.Runbook, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Runbook + if *v == nil { + cv = []types.Runbook{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Runbook + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRunbook(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentS3OutputLocation(v **types.S3OutputLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3OutputLocation + if *v == nil { + sv = &types.S3OutputLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutputS3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.OutputS3BucketName = ptr.String(jtv) + } + + case "OutputS3KeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3KeyPrefix to be of type string, got %T instead", value) + } + sv.OutputS3KeyPrefix = ptr.String(jtv) + } + + case "OutputS3Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Region to be of type string, got %T instead", value) + } + sv.OutputS3Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentS3OutputUrl(v **types.S3OutputUrl, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3OutputUrl + if *v == nil { + sv = &types.S3OutputUrl{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutputUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.OutputUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledWindowExecution(v **types.ScheduledWindowExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduledWindowExecution + if *v == nil { + sv = &types.ScheduledWindowExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExecutionTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.ExecutionTime = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledWindowExecutionList(v *[]types.ScheduledWindowExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ScheduledWindowExecution + if *v == nil { + cv = []types.ScheduledWindowExecution{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledWindowExecution + destAddr := &col + if err := awsAwsjson11_deserializeDocumentScheduledWindowExecution(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "QuotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "ServiceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceSetting(v **types.ServiceSetting, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceSetting + if *v == nil { + sv = &types.ServiceSetting{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ARN = ptr.String(jtv) + } + + case "LastModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastModifiedUser": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastModifiedUser = ptr.String(jtv) + } + + case "SettingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceSettingId to be of type string, got %T instead", value) + } + sv.SettingId = ptr.String(jtv) + } + + case "SettingValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceSettingValue to be of type string, got %T instead", value) + } + sv.SettingValue = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceSettingNotFound(v **types.ServiceSettingNotFound, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceSettingNotFound + if *v == nil { + sv = &types.ServiceSettingNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSession(v **types.Session, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Session + if *v == nil { + sv = &types.Session{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessType to be of type string, got %T instead", value) + } + sv.AccessType = types.AccessType(jtv) + } + + case "Details": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionDetails to be of type string, got %T instead", value) + } + sv.Details = ptr.String(jtv) + } + + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "EndDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "MaxSessionDuration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxSessionDuration to be of type string, got %T instead", value) + } + sv.MaxSessionDuration = ptr.String(jtv) + } + + case "OutputUrl": + if err := awsAwsjson11_deserializeDocumentSessionManagerOutputUrl(&sv.OutputUrl, value); err != nil { + return err + } + + case "Owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionOwner to be of type string, got %T instead", value) + } + sv.Owner = ptr.String(jtv) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionReason to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + case "StartDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionStatus to be of type string, got %T instead", value) + } + sv.Status = types.SessionStatus(jtv) + } + + case "Target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionTarget to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSessionList(v *[]types.Session, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Session + if *v == nil { + cv = []types.Session{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Session + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSession(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSessionManagerOutputUrl(v **types.SessionManagerOutputUrl, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SessionManagerOutputUrl + if *v == nil { + sv = &types.SessionManagerOutputUrl{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchOutputUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionManagerCloudWatchOutputUrl to be of type string, got %T instead", value) + } + sv.CloudWatchOutputUrl = ptr.String(jtv) + } + + case "S3OutputUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionManagerS3OutputUrl to be of type string, got %T instead", value) + } + sv.S3OutputUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSeveritySummary(v **types.SeveritySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SeveritySummary + if *v == nil { + sv = &types.SeveritySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CriticalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CriticalCount = int32(i64) + } + + case "HighCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.HighCount = int32(i64) + } + + case "InformationalCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InformationalCount = int32(i64) + } + + case "LowCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LowCount = int32(i64) + } + + case "MediumCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MediumCount = int32(i64) + } + + case "UnspecifiedCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ComplianceSummaryCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UnspecifiedCount = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStatusUnchanged(v **types.StatusUnchanged, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.StatusUnchanged + if *v == nil { + sv = &types.StatusUnchanged{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStepExecution(v **types.StepExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.StepExecution + if *v == nil { + sv = &types.StepExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationActionName to be of type string, got %T instead", value) + } + sv.Action = ptr.String(jtv) + } + + case "ExecutionEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExecutionStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "FailureDetails": + if err := awsAwsjson11_deserializeDocumentFailureDetails(&sv.FailureDetails, value); err != nil { + return err + } + + case "FailureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "Inputs": + if err := awsAwsjson11_deserializeDocumentNormalStringMap(&sv.Inputs, value); err != nil { + return err + } + + case "IsCritical": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsCritical = ptr.Bool(jtv) + } + + case "IsEnd": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsEnd = ptr.Bool(jtv) + } + + case "MaxAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxAttempts = ptr.Int32(int32(i64)) + } + + case "NextStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextStep = ptr.String(jtv) + } + + case "OnFailure": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OnFailure = ptr.String(jtv) + } + + case "Outputs": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.Outputs, value); err != nil { + return err + } + + case "OverriddenParameters": + if err := awsAwsjson11_deserializeDocumentAutomationParameterMap(&sv.OverriddenParameters, value); err != nil { + return err + } + + case "ParentStepDetails": + if err := awsAwsjson11_deserializeDocumentParentStepDetails(&sv.ParentStepDetails, value); err != nil { + return err + } + + case "Response": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Response = ptr.String(jtv) + } + + case "ResponseCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResponseCode = ptr.String(jtv) + } + + case "StepExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StepExecutionId = ptr.String(jtv) + } + + case "StepName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StepName = ptr.String(jtv) + } + + case "StepStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionStatus to be of type string, got %T instead", value) + } + sv.StepStatus = types.AutomationExecutionStatus(jtv) + } + + case "TargetLocation": + if err := awsAwsjson11_deserializeDocumentTargetLocation(&sv.TargetLocation, value); err != nil { + return err + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TimeoutSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutSeconds = ptr.Int64(i64) + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + case "ValidNextSteps": + if err := awsAwsjson11_deserializeDocumentValidNextStepList(&sv.ValidNextSteps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStepExecutionList(v *[]types.StepExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.StepExecution + if *v == nil { + cv = []types.StepExecution{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StepExecution + destAddr := &col + if err := awsAwsjson11_deserializeDocumentStepExecution(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentStepPreviewMap(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentSubTypeCountLimitExceededException(v **types.SubTypeCountLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SubTypeCountLimitExceededException + if *v == nil { + sv = &types.SubTypeCountLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTarget(v **types.Target, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Target + if *v == nil { + sv = &types.Target{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "Values": + if err := awsAwsjson11_deserializeDocumentTargetValues(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetInUseException(v **types.TargetInUseException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TargetInUseException + if *v == nil { + sv = &types.TargetInUseException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TargetLocation + if *v == nil { + sv = &types.TargetLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Accounts": + if err := awsAwsjson11_deserializeDocumentAccounts(&sv.Accounts, value); err != nil { + return err + } + + case "ExcludeAccounts": + if err := awsAwsjson11_deserializeDocumentExcludeAccounts(&sv.ExcludeAccounts, value); err != nil { + return err + } + + case "ExecutionRoleName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionRoleName to be of type string, got %T instead", value) + } + sv.ExecutionRoleName = ptr.String(jtv) + } + + case "IncludeChildOrganizationUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildOrganizationUnits = jtv + } + + case "Regions": + if err := awsAwsjson11_deserializeDocumentRegions(&sv.Regions, value); err != nil { + return err + } + + case "TargetLocationAlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.TargetLocationAlarmConfiguration, value); err != nil { + return err + } + + case "TargetLocationMaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.TargetLocationMaxConcurrency = ptr.String(jtv) + } + + case "TargetLocationMaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.TargetLocationMaxErrors = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TargetsMaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.TargetsMaxConcurrency = ptr.String(jtv) + } + + case "TargetsMaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.TargetsMaxErrors = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetLocations(v *[]types.TargetLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TargetLocation + if *v == nil { + cv = []types.TargetLocation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TargetLocation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTargetLocation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetMap(v *map[string][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string][]string + if *v == nil { + mv = map[string][]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal []string + mapVar := parsedVal + if err := awsAwsjson11_deserializeDocumentTargetMapValueList(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetMaps(v *[]map[string][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string][]string + if *v == nil { + cv = []map[string][]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string][]string + if err := awsAwsjson11_deserializeDocumentTargetMap(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetMapValueList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetMapValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetNotConnected(v **types.TargetNotConnected, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TargetNotConnected + if *v == nil { + sv = &types.TargetNotConnected{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetParameterList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetPreview(v **types.TargetPreview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TargetPreview + if *v == nil { + sv = &types.TargetPreview{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = int32(i64) + } + + case "TargetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetPreviewList(v *[]types.TargetPreview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TargetPreview + if *v == nil { + cv = []types.TargetPreview{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TargetPreview + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTargetPreview(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargets(v *[]types.Target, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Target + if *v == nil { + cv = []types.Target{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Target + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTarget(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetValues(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "QuotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "ServiceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTooManyTagsError(v **types.TooManyTagsError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TooManyTagsError + if *v == nil { + sv = &types.TooManyTagsError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTooManyUpdates(v **types.TooManyUpdates, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TooManyUpdates + if *v == nil { + sv = &types.TooManyUpdates{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTotalSizeLimitExceededException(v **types.TotalSizeLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TotalSizeLimitExceededException + if *v == nil { + sv = &types.TotalSizeLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedCalendarException(v **types.UnsupportedCalendarException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedCalendarException + if *v == nil { + sv = &types.UnsupportedCalendarException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(v **types.UnsupportedFeatureRequiredException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedFeatureRequiredException + if *v == nil { + sv = &types.UnsupportedFeatureRequiredException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v **types.UnsupportedInventoryItemContextException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedInventoryItemContextException + if *v == nil { + sv = &types.UnsupportedInventoryItemContextException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedInventorySchemaVersionException(v **types.UnsupportedInventorySchemaVersionException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedInventorySchemaVersionException + if *v == nil { + sv = &types.UnsupportedInventorySchemaVersionException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedOperatingSystem(v **types.UnsupportedOperatingSystem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedOperatingSystem + if *v == nil { + sv = &types.UnsupportedOperatingSystem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedOperationException + if *v == nil { + sv = &types.UnsupportedOperationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.UnsupportedParameterType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedParameterType + if *v == nil { + sv = &types.UnsupportedParameterType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedPlatformType(v **types.UnsupportedPlatformType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedPlatformType + if *v == nil { + sv = &types.UnsupportedPlatformType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReasonCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentValidNextStepList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidNextStep to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeOpDocumentAddTagsToResourceOutput(v **AddTagsToResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AddTagsToResourceOutput + if *v == nil { + sv = &AddTagsToResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentAssociateOpsItemRelatedItemOutput(v **AssociateOpsItemRelatedItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AssociateOpsItemRelatedItemOutput + if *v == nil { + sv = &AssociateOpsItemRelatedItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCancelCommandOutput(v **CancelCommandOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CancelCommandOutput + if *v == nil { + sv = &CancelCommandOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCancelMaintenanceWindowExecutionOutput(v **CancelMaintenanceWindowExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CancelMaintenanceWindowExecutionOutput + if *v == nil { + sv = &CancelMaintenanceWindowExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateActivationOutput(v **CreateActivationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateActivationOutput + if *v == nil { + sv = &CreateActivationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationCode to be of type string, got %T instead", value) + } + sv.ActivationCode = ptr.String(jtv) + } + + case "ActivationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationId to be of type string, got %T instead", value) + } + sv.ActivationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateAssociationBatchOutput(v **CreateAssociationBatchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateAssociationBatchOutput + if *v == nil { + sv = &CreateAssociationBatchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Failed": + if err := awsAwsjson11_deserializeDocumentFailedCreateAssociationList(&sv.Failed, value); err != nil { + return err + } + + case "Successful": + if err := awsAwsjson11_deserializeDocumentAssociationDescriptionList(&sv.Successful, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateAssociationOutput(v **CreateAssociationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateAssociationOutput + if *v == nil { + sv = &CreateAssociationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationDescription": + if err := awsAwsjson11_deserializeDocumentAssociationDescription(&sv.AssociationDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateDocumentOutput(v **CreateDocumentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateDocumentOutput + if *v == nil { + sv = &CreateDocumentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentDescription": + if err := awsAwsjson11_deserializeDocumentDocumentDescription(&sv.DocumentDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateMaintenanceWindowOutput(v **CreateMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateMaintenanceWindowOutput + if *v == nil { + sv = &CreateMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateOpsItemOutput(v **CreateOpsItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateOpsItemOutput + if *v == nil { + sv = &CreateOpsItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OpsItemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemArn to be of type string, got %T instead", value) + } + sv.OpsItemArn = ptr.String(jtv) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateOpsMetadataOutput(v **CreateOpsMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateOpsMetadataOutput + if *v == nil { + sv = &CreateOpsMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OpsMetadataArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsMetadataArn to be of type string, got %T instead", value) + } + sv.OpsMetadataArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreatePatchBaselineOutput(v **CreatePatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreatePatchBaselineOutput + if *v == nil { + sv = &CreatePatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateResourceDataSyncOutput(v **CreateResourceDataSyncOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateResourceDataSyncOutput + if *v == nil { + sv = &CreateResourceDataSyncOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteActivationOutput(v **DeleteActivationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteActivationOutput + if *v == nil { + sv = &DeleteActivationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteAssociationOutput(v **DeleteAssociationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteAssociationOutput + if *v == nil { + sv = &DeleteAssociationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteDocumentOutput(v **DeleteDocumentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteDocumentOutput + if *v == nil { + sv = &DeleteDocumentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteInventoryOutput(v **DeleteInventoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteInventoryOutput + if *v == nil { + sv = &DeleteInventoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeletionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.DeletionId = ptr.String(jtv) + } + + case "DeletionSummary": + if err := awsAwsjson11_deserializeDocumentInventoryDeletionSummary(&sv.DeletionSummary, value); err != nil { + return err + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteMaintenanceWindowOutput(v **DeleteMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteMaintenanceWindowOutput + if *v == nil { + sv = &DeleteMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteOpsItemOutput(v **DeleteOpsItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteOpsItemOutput + if *v == nil { + sv = &DeleteOpsItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteOpsMetadataOutput(v **DeleteOpsMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteOpsMetadataOutput + if *v == nil { + sv = &DeleteOpsMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteParameterOutput(v **DeleteParameterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteParameterOutput + if *v == nil { + sv = &DeleteParameterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteParametersOutput(v **DeleteParametersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteParametersOutput + if *v == nil { + sv = &DeleteParametersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeletedParameters": + if err := awsAwsjson11_deserializeDocumentParameterNameList(&sv.DeletedParameters, value); err != nil { + return err + } + + case "InvalidParameters": + if err := awsAwsjson11_deserializeDocumentParameterNameList(&sv.InvalidParameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeletePatchBaselineOutput(v **DeletePatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeletePatchBaselineOutput + if *v == nil { + sv = &DeletePatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteResourceDataSyncOutput(v **DeleteResourceDataSyncOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteResourceDataSyncOutput + if *v == nil { + sv = &DeleteResourceDataSyncOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(v **DeleteResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteResourcePolicyOutput + if *v == nil { + sv = &DeleteResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeregisterManagedInstanceOutput(v **DeregisterManagedInstanceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeregisterManagedInstanceOutput + if *v == nil { + sv = &DeregisterManagedInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeregisterPatchBaselineForPatchGroupOutput(v **DeregisterPatchBaselineForPatchGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeregisterPatchBaselineForPatchGroupOutput + if *v == nil { + sv = &DeregisterPatchBaselineForPatchGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "PatchGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchGroup to be of type string, got %T instead", value) + } + sv.PatchGroup = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeregisterTargetFromMaintenanceWindowOutput(v **DeregisterTargetFromMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeregisterTargetFromMaintenanceWindowOutput + if *v == nil { + sv = &DeregisterTargetFromMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTargetId to be of type string, got %T instead", value) + } + sv.WindowTargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeregisterTaskFromMaintenanceWindowOutput(v **DeregisterTaskFromMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeregisterTaskFromMaintenanceWindowOutput + if *v == nil { + sv = &DeregisterTaskFromMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskId to be of type string, got %T instead", value) + } + sv.WindowTaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeActivationsOutput(v **DescribeActivationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeActivationsOutput + if *v == nil { + sv = &DescribeActivationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationList": + if err := awsAwsjson11_deserializeDocumentActivationList(&sv.ActivationList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAssociationExecutionsOutput(v **DescribeAssociationExecutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAssociationExecutionsOutput + if *v == nil { + sv = &DescribeAssociationExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationExecutions": + if err := awsAwsjson11_deserializeDocumentAssociationExecutionsList(&sv.AssociationExecutions, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAssociationExecutionTargetsOutput(v **DescribeAssociationExecutionTargetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAssociationExecutionTargetsOutput + if *v == nil { + sv = &DescribeAssociationExecutionTargetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationExecutionTargets": + if err := awsAwsjson11_deserializeDocumentAssociationExecutionTargetsList(&sv.AssociationExecutionTargets, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAssociationOutput(v **DescribeAssociationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAssociationOutput + if *v == nil { + sv = &DescribeAssociationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationDescription": + if err := awsAwsjson11_deserializeDocumentAssociationDescription(&sv.AssociationDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAutomationExecutionsOutput(v **DescribeAutomationExecutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAutomationExecutionsOutput + if *v == nil { + sv = &DescribeAutomationExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomationExecutionMetadataList": + if err := awsAwsjson11_deserializeDocumentAutomationExecutionMetadataList(&sv.AutomationExecutionMetadataList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAutomationStepExecutionsOutput(v **DescribeAutomationStepExecutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAutomationStepExecutionsOutput + if *v == nil { + sv = &DescribeAutomationStepExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "StepExecutions": + if err := awsAwsjson11_deserializeDocumentStepExecutionList(&sv.StepExecutions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAvailablePatchesOutput(v **DescribeAvailablePatchesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAvailablePatchesOutput + if *v == nil { + sv = &DescribeAvailablePatchesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Patches": + if err := awsAwsjson11_deserializeDocumentPatchList(&sv.Patches, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeDocumentOutput(v **DescribeDocumentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDocumentOutput + if *v == nil { + sv = &DescribeDocumentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Document": + if err := awsAwsjson11_deserializeDocumentDocumentDescription(&sv.Document, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeDocumentPermissionOutput(v **DescribeDocumentPermissionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDocumentPermissionOutput + if *v == nil { + sv = &DescribeDocumentPermissionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountIds": + if err := awsAwsjson11_deserializeDocumentAccountIdList(&sv.AccountIds, value); err != nil { + return err + } + + case "AccountSharingInfoList": + if err := awsAwsjson11_deserializeDocumentAccountSharingInfoList(&sv.AccountSharingInfoList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeEffectiveInstanceAssociationsOutput(v **DescribeEffectiveInstanceAssociationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeEffectiveInstanceAssociationsOutput + if *v == nil { + sv = &DescribeEffectiveInstanceAssociationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Associations": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationList(&sv.Associations, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeEffectivePatchesForPatchBaselineOutput(v **DescribeEffectivePatchesForPatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeEffectivePatchesForPatchBaselineOutput + if *v == nil { + sv = &DescribeEffectivePatchesForPatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EffectivePatches": + if err := awsAwsjson11_deserializeDocumentEffectivePatchList(&sv.EffectivePatches, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInstanceAssociationsStatusOutput(v **DescribeInstanceAssociationsStatusOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstanceAssociationsStatusOutput + if *v == nil { + sv = &DescribeInstanceAssociationsStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceAssociationStatusInfos": + if err := awsAwsjson11_deserializeDocumentInstanceAssociationStatusInfos(&sv.InstanceAssociationStatusInfos, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInstanceInformationOutput(v **DescribeInstanceInformationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstanceInformationOutput + if *v == nil { + sv = &DescribeInstanceInformationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceInformationList": + if err := awsAwsjson11_deserializeDocumentInstanceInformationList(&sv.InstanceInformationList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInstancePatchesOutput(v **DescribeInstancePatchesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstancePatchesOutput + if *v == nil { + sv = &DescribeInstancePatchesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Patches": + if err := awsAwsjson11_deserializeDocumentPatchComplianceDataList(&sv.Patches, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInstancePatchStatesForPatchGroupOutput(v **DescribeInstancePatchStatesForPatchGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstancePatchStatesForPatchGroupOutput + if *v == nil { + sv = &DescribeInstancePatchStatesForPatchGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstancePatchStates": + if err := awsAwsjson11_deserializeDocumentInstancePatchStatesList(&sv.InstancePatchStates, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInstancePatchStatesOutput(v **DescribeInstancePatchStatesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstancePatchStatesOutput + if *v == nil { + sv = &DescribeInstancePatchStatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstancePatchStates": + if err := awsAwsjson11_deserializeDocumentInstancePatchStateList(&sv.InstancePatchStates, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInstancePropertiesOutput(v **DescribeInstancePropertiesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstancePropertiesOutput + if *v == nil { + sv = &DescribeInstancePropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceProperties": + if err := awsAwsjson11_deserializeDocumentInstanceProperties(&sv.InstanceProperties, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeInventoryDeletionsOutput(v **DescribeInventoryDeletionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInventoryDeletionsOutput + if *v == nil { + sv = &DescribeInventoryDeletionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InventoryDeletions": + if err := awsAwsjson11_deserializeDocumentInventoryDeletionsList(&sv.InventoryDeletions, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionsOutput(v **DescribeMaintenanceWindowExecutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowExecutionsOutput + if *v == nil { + sv = &DescribeMaintenanceWindowExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "WindowExecutions": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionList(&sv.WindowExecutions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTaskInvocationsOutput(v **DescribeMaintenanceWindowExecutionTaskInvocationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowExecutionTaskInvocationsOutput + if *v == nil { + sv = &DescribeMaintenanceWindowExecutionTaskInvocationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "WindowExecutionTaskInvocationIdentities": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskInvocationIdentityList(&sv.WindowExecutionTaskInvocationIdentities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTasksOutput(v **DescribeMaintenanceWindowExecutionTasksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowExecutionTasksOutput + if *v == nil { + sv = &DescribeMaintenanceWindowExecutionTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "WindowExecutionTaskIdentities": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskIdentityList(&sv.WindowExecutionTaskIdentities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowScheduleOutput(v **DescribeMaintenanceWindowScheduleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowScheduleOutput + if *v == nil { + sv = &DescribeMaintenanceWindowScheduleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ScheduledWindowExecutions": + if err := awsAwsjson11_deserializeDocumentScheduledWindowExecutionList(&sv.ScheduledWindowExecutions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsForTargetOutput(v **DescribeMaintenanceWindowsForTargetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowsForTargetOutput + if *v == nil { + sv = &DescribeMaintenanceWindowsForTargetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "WindowIdentities": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowsForTargetList(&sv.WindowIdentities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsOutput(v **DescribeMaintenanceWindowsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowsOutput + if *v == nil { + sv = &DescribeMaintenanceWindowsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "WindowIdentities": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowIdentityList(&sv.WindowIdentities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTargetsOutput(v **DescribeMaintenanceWindowTargetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowTargetsOutput + if *v == nil { + sv = &DescribeMaintenanceWindowTargetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTargetList(&sv.Targets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTasksOutput(v **DescribeMaintenanceWindowTasksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMaintenanceWindowTasksOutput + if *v == nil { + sv = &DescribeMaintenanceWindowTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Tasks": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskList(&sv.Tasks, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeOpsItemsOutput(v **DescribeOpsItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeOpsItemsOutput + if *v == nil { + sv = &DescribeOpsItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "OpsItemSummaries": + if err := awsAwsjson11_deserializeDocumentOpsItemSummaries(&sv.OpsItemSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeParametersOutput(v **DescribeParametersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeParametersOutput + if *v == nil { + sv = &DescribeParametersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameterMetadataList(&sv.Parameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribePatchBaselinesOutput(v **DescribePatchBaselinesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribePatchBaselinesOutput + if *v == nil { + sv = &DescribePatchBaselinesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineIdentities": + if err := awsAwsjson11_deserializeDocumentPatchBaselineIdentityList(&sv.BaselineIdentities, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribePatchGroupsOutput(v **DescribePatchGroupsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribePatchGroupsOutput + if *v == nil { + sv = &DescribePatchGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Mappings": + if err := awsAwsjson11_deserializeDocumentPatchGroupPatchBaselineMappingList(&sv.Mappings, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribePatchGroupStateOutput(v **DescribePatchGroupStateOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribePatchGroupStateOutput + if *v == nil { + sv = &DescribePatchGroupStateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Instances": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Instances = int32(i64) + } + + case "InstancesWithAvailableSecurityUpdates": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithAvailableSecurityUpdates = ptr.Int32(int32(i64)) + } + + case "InstancesWithCriticalNonCompliantPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstancesCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithCriticalNonCompliantPatches = ptr.Int32(int32(i64)) + } + + case "InstancesWithFailedPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithFailedPatches = int32(i64) + } + + case "InstancesWithInstalledOtherPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithInstalledOtherPatches = int32(i64) + } + + case "InstancesWithInstalledPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithInstalledPatches = int32(i64) + } + + case "InstancesWithInstalledPendingRebootPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstancesCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithInstalledPendingRebootPatches = ptr.Int32(int32(i64)) + } + + case "InstancesWithInstalledRejectedPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstancesCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithInstalledRejectedPatches = ptr.Int32(int32(i64)) + } + + case "InstancesWithMissingPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithMissingPatches = int32(i64) + } + + case "InstancesWithNotApplicablePatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithNotApplicablePatches = int32(i64) + } + + case "InstancesWithOtherNonCompliantPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstancesCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithOtherNonCompliantPatches = ptr.Int32(int32(i64)) + } + + case "InstancesWithSecurityNonCompliantPatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstancesCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithSecurityNonCompliantPatches = ptr.Int32(int32(i64)) + } + + case "InstancesWithUnreportedNotApplicablePatches": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstancesWithUnreportedNotApplicablePatches = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribePatchPropertiesOutput(v **DescribePatchPropertiesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribePatchPropertiesOutput + if *v == nil { + sv = &DescribePatchPropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Properties": + if err := awsAwsjson11_deserializeDocumentPatchPropertiesList(&sv.Properties, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeSessionsOutput(v **DescribeSessionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeSessionsOutput + if *v == nil { + sv = &DescribeSessionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Sessions": + if err := awsAwsjson11_deserializeDocumentSessionList(&sv.Sessions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDisassociateOpsItemRelatedItemOutput(v **DisassociateOpsItemRelatedItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisassociateOpsItemRelatedItemOutput + if *v == nil { + sv = &DisassociateOpsItemRelatedItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetAccessTokenOutput(v **GetAccessTokenOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAccessTokenOutput + if *v == nil { + sv = &GetAccessTokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessRequestStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessRequestStatus to be of type string, got %T instead", value) + } + sv.AccessRequestStatus = types.AccessRequestStatus(jtv) + } + + case "Credentials": + if err := awsAwsjson11_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(v **GetAutomationExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAutomationExecutionOutput + if *v == nil { + sv = &GetAutomationExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomationExecution": + if err := awsAwsjson11_deserializeDocumentAutomationExecution(&sv.AutomationExecution, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetCalendarStateOutput(v **GetCalendarStateOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetCalendarStateOutput + if *v == nil { + sv = &GetCalendarStateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AtTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601String to be of type string, got %T instead", value) + } + sv.AtTime = ptr.String(jtv) + } + + case "NextTransitionTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601String to be of type string, got %T instead", value) + } + sv.NextTransitionTime = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CalendarState to be of type string, got %T instead", value) + } + sv.State = types.CalendarState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetCommandInvocationOutput(v **GetCommandInvocationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetCommandInvocationOutput + if *v == nil { + sv = &GetCommandInvocationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchOutputConfig": + if err := awsAwsjson11_deserializeDocumentCloudWatchOutputConfig(&sv.CloudWatchOutputConfig, value); err != nil { + return err + } + + case "CommandId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandId to be of type string, got %T instead", value) + } + sv.CommandId = ptr.String(jtv) + } + + case "Comment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Comment to be of type string, got %T instead", value) + } + sv.Comment = ptr.String(jtv) + } + + case "DocumentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "ExecutionElapsedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringDateTime to be of type string, got %T instead", value) + } + sv.ExecutionElapsedTime = ptr.String(jtv) + } + + case "ExecutionEndDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringDateTime to be of type string, got %T instead", value) + } + sv.ExecutionEndDateTime = ptr.String(jtv) + } + + case "ExecutionStartDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringDateTime to be of type string, got %T instead", value) + } + sv.ExecutionStartDateTime = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "PluginName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandPluginName to be of type string, got %T instead", value) + } + sv.PluginName = ptr.String(jtv) + } + + case "ResponseCode": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ResponseCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ResponseCode = int32(i64) + } + + case "StandardErrorContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StandardErrorContent to be of type string, got %T instead", value) + } + sv.StandardErrorContent = ptr.String(jtv) + } + + case "StandardErrorUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.StandardErrorUrl = ptr.String(jtv) + } + + case "StandardOutputContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StandardOutputContent to be of type string, got %T instead", value) + } + sv.StandardOutputContent = ptr.String(jtv) + } + + case "StandardOutputUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.StandardOutputUrl = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandInvocationStatus to be of type string, got %T instead", value) + } + sv.Status = types.CommandInvocationStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetConnectionStatusOutput(v **GetConnectionStatusOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetConnectionStatusOutput + if *v == nil { + sv = &GetConnectionStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ConnectionStatus(jtv) + } + + case "Target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionTarget to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDefaultPatchBaselineOutput(v **GetDefaultPatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDefaultPatchBaselineOutput + if *v == nil { + sv = &GetDefaultPatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "OperatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperatingSystem to be of type string, got %T instead", value) + } + sv.OperatingSystem = types.OperatingSystem(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDeployablePatchSnapshotForInstanceOutput(v **GetDeployablePatchSnapshotForInstanceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDeployablePatchSnapshotForInstanceOutput + if *v == nil { + sv = &GetDeployablePatchSnapshotForInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "Product": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Product to be of type string, got %T instead", value) + } + sv.Product = ptr.String(jtv) + } + + case "SnapshotDownloadUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotDownloadUrl to be of type string, got %T instead", value) + } + sv.SnapshotDownloadUrl = ptr.String(jtv) + } + + case "SnapshotId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotId to be of type string, got %T instead", value) + } + sv.SnapshotId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDocumentOutput(v **GetDocumentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDocumentOutput + if *v == nil { + sv = &GetDocumentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AttachmentsContent": + if err := awsAwsjson11_deserializeDocumentAttachmentContentList(&sv.AttachmentsContent, value); err != nil { + return err + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentContent to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "DocumentFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentFormat to be of type string, got %T instead", value) + } + sv.DocumentFormat = types.DocumentFormat(jtv) + } + + case "DocumentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentType to be of type string, got %T instead", value) + } + sv.DocumentType = types.DocumentType(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentARN to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Requires": + if err := awsAwsjson11_deserializeDocumentDocumentRequiresList(&sv.Requires, value); err != nil { + return err + } + + case "ReviewStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReviewStatus to be of type string, got %T instead", value) + } + sv.ReviewStatus = types.ReviewStatus(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentStatus to be of type string, got %T instead", value) + } + sv.Status = types.DocumentStatus(jtv) + } + + case "StatusInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentStatusInformation to be of type string, got %T instead", value) + } + sv.StatusInformation = ptr.String(jtv) + } + + case "VersionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetExecutionPreviewOutput(v **GetExecutionPreviewOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetExecutionPreviewOutput + if *v == nil { + sv = &GetExecutionPreviewOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionPreview": + if err := awsAwsjson11_deserializeDocumentExecutionPreview(&sv.ExecutionPreview, value); err != nil { + return err + } + + case "ExecutionPreviewId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionPreviewId to be of type string, got %T instead", value) + } + sv.ExecutionPreviewId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionPreviewStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExecutionPreviewStatus(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetInventoryOutput(v **GetInventoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetInventoryOutput + if *v == nil { + sv = &GetInventoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Entities": + if err := awsAwsjson11_deserializeDocumentInventoryResultEntityList(&sv.Entities, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetInventorySchemaOutput(v **GetInventorySchemaOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetInventorySchemaOutput + if *v == nil { + sv = &GetInventorySchemaOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Schemas": + if err := awsAwsjson11_deserializeDocumentInventoryItemSchemaResultList(&sv.Schemas, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionOutput(v **GetMaintenanceWindowExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMaintenanceWindowExecutionOutput + if *v == nil { + sv = &GetMaintenanceWindowExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.MaintenanceWindowExecutionStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TaskIds": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowExecutionTaskIdList(&sv.TaskIds, value); err != nil { + return err + } + + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationOutput(v **GetMaintenanceWindowExecutionTaskInvocationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMaintenanceWindowExecutionTaskInvocationOutput + if *v == nil { + sv = &GetMaintenanceWindowExecutionTaskInvocationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskExecutionId to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "InvocationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskInvocationId to be of type string, got %T instead", value) + } + sv.InvocationId = ptr.String(jtv) + } + + case "OwnerInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerInformation to be of type string, got %T instead", value) + } + sv.OwnerInformation = ptr.String(jtv) + } + + case "Parameters": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskInvocationParameters to be of type string, got %T instead", value) + } + sv.Parameters = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.MaintenanceWindowExecutionStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TaskExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskId to be of type string, got %T instead", value) + } + sv.TaskExecutionId = ptr.String(jtv) + } + + case "TaskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskType to be of type string, got %T instead", value) + } + sv.TaskType = types.MaintenanceWindowTaskType(jtv) + } + + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + case "WindowTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskTargetId to be of type string, got %T instead", value) + } + sv.WindowTargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskOutput(v **GetMaintenanceWindowExecutionTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMaintenanceWindowExecutionTaskOutput + if *v == nil { + sv = &GetMaintenanceWindowExecutionTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = int32(i64) + } + + case "ServiceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.MaintenanceWindowExecutionStatus(jtv) + } + + case "StatusDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionStatusDetails to be of type string, got %T instead", value) + } + sv.StatusDetails = ptr.String(jtv) + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionTaskId to be of type string, got %T instead", value) + } + sv.TaskExecutionId = ptr.String(jtv) + } + + case "TaskParameters": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParametersList(&sv.TaskParameters, value); err != nil { + return err + } + + case "TriggeredAlarms": + if err := awsAwsjson11_deserializeDocumentAlarmStateInformationList(&sv.TriggeredAlarms, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskType to be of type string, got %T instead", value) + } + sv.Type = types.MaintenanceWindowTaskType(jtv) + } + + case "WindowExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowExecutionId to be of type string, got %T instead", value) + } + sv.WindowExecutionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowOutput(v **GetMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMaintenanceWindowOutput + if *v == nil { + sv = &GetMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowUnassociatedTargets": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected MaintenanceWindowAllowUnassociatedTargets to be of type *bool, got %T instead", value) + } + sv.AllowUnassociatedTargets = jtv + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Cutoff": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowCutoff to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Cutoff = int32(i64) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDurationHours to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected MaintenanceWindowEnabled to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + + case "EndDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.EndDate = ptr.String(jtv) + } + + case "ModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NextExecutionTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.NextExecutionTime = ptr.String(jtv) + } + + case "Schedule": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowSchedule to be of type string, got %T instead", value) + } + sv.Schedule = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "ScheduleTimezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTimezone to be of type string, got %T instead", value) + } + sv.ScheduleTimezone = ptr.String(jtv) + } + + case "StartDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.StartDate = ptr.String(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowTaskOutput(v **GetMaintenanceWindowTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMaintenanceWindowTaskOutput + if *v == nil { + sv = &GetMaintenanceWindowTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "CutoffBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskCutoffBehavior to be of type string, got %T instead", value) + } + sv.CutoffBehavior = types.MaintenanceWindowTaskCutoffBehavior(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LoggingInfo": + if err := awsAwsjson11_deserializeDocumentLoggingInfo(&sv.LoggingInfo, value); err != nil { + return err + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = int32(i64) + } + + case "ServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRoleArn = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskInvocationParameters": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskInvocationParameters(&sv.TaskInvocationParameters, value); err != nil { + return err + } + + case "TaskParameters": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameters(&sv.TaskParameters, value); err != nil { + return err + } + + case "TaskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskType to be of type string, got %T instead", value) + } + sv.TaskType = types.MaintenanceWindowTaskType(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskId to be of type string, got %T instead", value) + } + sv.WindowTaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetOpsItemOutput(v **GetOpsItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetOpsItemOutput + if *v == nil { + sv = &GetOpsItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OpsItem": + if err := awsAwsjson11_deserializeDocumentOpsItem(&sv.OpsItem, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetOpsMetadataOutput(v **GetOpsMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetOpsMetadataOutput + if *v == nil { + sv = &GetOpsMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Metadata": + if err := awsAwsjson11_deserializeDocumentMetadataMap(&sv.Metadata, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsMetadataResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetOpsSummaryOutput(v **GetOpsSummaryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetOpsSummaryOutput + if *v == nil { + sv = &GetOpsSummaryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Entities": + if err := awsAwsjson11_deserializeDocumentOpsEntityList(&sv.Entities, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetParameterHistoryOutput(v **GetParameterHistoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetParameterHistoryOutput + if *v == nil { + sv = &GetParameterHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameterHistoryList(&sv.Parameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetParameterOutput(v **GetParameterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetParameterOutput + if *v == nil { + sv = &GetParameterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Parameter": + if err := awsAwsjson11_deserializeDocumentParameter(&sv.Parameter, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetParametersByPathOutput(v **GetParametersByPathOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetParametersByPathOutput + if *v == nil { + sv = &GetParametersByPathOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameterList(&sv.Parameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetParametersOutput(v **GetParametersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetParametersOutput + if *v == nil { + sv = &GetParametersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InvalidParameters": + if err := awsAwsjson11_deserializeDocumentParameterNameList(&sv.InvalidParameters, value); err != nil { + return err + } + + case "Parameters": + if err := awsAwsjson11_deserializeDocumentParameterList(&sv.Parameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetPatchBaselineForPatchGroupOutput(v **GetPatchBaselineForPatchGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetPatchBaselineForPatchGroupOutput + if *v == nil { + sv = &GetPatchBaselineForPatchGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "OperatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperatingSystem to be of type string, got %T instead", value) + } + sv.OperatingSystem = types.OperatingSystem(jtv) + } + + case "PatchGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchGroup to be of type string, got %T instead", value) + } + sv.PatchGroup = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(v **GetPatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetPatchBaselineOutput + if *v == nil { + sv = &GetPatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApprovalRules": + if err := awsAwsjson11_deserializeDocumentPatchRuleGroup(&sv.ApprovalRules, value); err != nil { + return err + } + + case "ApprovedPatches": + if err := awsAwsjson11_deserializeDocumentPatchIdList(&sv.ApprovedPatches, value); err != nil { + return err + } + + case "ApprovedPatchesComplianceLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceLevel to be of type string, got %T instead", value) + } + sv.ApprovedPatchesComplianceLevel = types.PatchComplianceLevel(jtv) + } + + case "ApprovedPatchesEnableNonSecurity": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ApprovedPatchesEnableNonSecurity = ptr.Bool(jtv) + } + + case "AvailableSecurityUpdatesComplianceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceStatus to be of type string, got %T instead", value) + } + sv.AvailableSecurityUpdatesComplianceStatus = types.PatchComplianceStatus(jtv) + } + + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "GlobalFilters": + if err := awsAwsjson11_deserializeDocumentPatchFilterGroup(&sv.GlobalFilters, value); err != nil { + return err + } + + case "ModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OperatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperatingSystem to be of type string, got %T instead", value) + } + sv.OperatingSystem = types.OperatingSystem(jtv) + } + + case "PatchGroups": + if err := awsAwsjson11_deserializeDocumentPatchGroupList(&sv.PatchGroups, value); err != nil { + return err + } + + case "RejectedPatches": + if err := awsAwsjson11_deserializeDocumentPatchIdList(&sv.RejectedPatches, value); err != nil { + return err + } + + case "RejectedPatchesAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchAction to be of type string, got %T instead", value) + } + sv.RejectedPatchesAction = types.PatchAction(jtv) + } + + case "Sources": + if err := awsAwsjson11_deserializeDocumentPatchSourceList(&sv.Sources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResourcePoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResourcePoliciesOutput + if *v == nil { + sv = &GetResourcePoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Policies": + if err := awsAwsjson11_deserializeDocumentGetResourcePoliciesResponseEntries(&sv.Policies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetServiceSettingOutput(v **GetServiceSettingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetServiceSettingOutput + if *v == nil { + sv = &GetServiceSettingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ServiceSetting": + if err := awsAwsjson11_deserializeDocumentServiceSetting(&sv.ServiceSetting, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentLabelParameterVersionOutput(v **LabelParameterVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *LabelParameterVersionOutput + if *v == nil { + sv = &LabelParameterVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InvalidLabels": + if err := awsAwsjson11_deserializeDocumentParameterLabelList(&sv.InvalidLabels, value); err != nil { + return err + } + + case "ParameterVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PSParameterVersion to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ParameterVersion = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListAssociationsOutput(v **ListAssociationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAssociationsOutput + if *v == nil { + sv = &ListAssociationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Associations": + if err := awsAwsjson11_deserializeDocumentAssociationList(&sv.Associations, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListAssociationVersionsOutput(v **ListAssociationVersionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAssociationVersionsOutput + if *v == nil { + sv = &ListAssociationVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationVersions": + if err := awsAwsjson11_deserializeDocumentAssociationVersionList(&sv.AssociationVersions, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListCommandInvocationsOutput(v **ListCommandInvocationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCommandInvocationsOutput + if *v == nil { + sv = &ListCommandInvocationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CommandInvocations": + if err := awsAwsjson11_deserializeDocumentCommandInvocationList(&sv.CommandInvocations, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListCommandsOutput(v **ListCommandsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCommandsOutput + if *v == nil { + sv = &ListCommandsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Commands": + if err := awsAwsjson11_deserializeDocumentCommandList(&sv.Commands, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(v **ListComplianceItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListComplianceItemsOutput + if *v == nil { + sv = &ListComplianceItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceItems": + if err := awsAwsjson11_deserializeDocumentComplianceItemList(&sv.ComplianceItems, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListComplianceSummariesOutput(v **ListComplianceSummariesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListComplianceSummariesOutput + if *v == nil { + sv = &ListComplianceSummariesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceSummaryItems": + if err := awsAwsjson11_deserializeDocumentComplianceSummaryItemList(&sv.ComplianceSummaryItems, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(v **ListDocumentMetadataHistoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDocumentMetadataHistoryOutput + if *v == nil { + sv = &ListDocumentMetadataHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Author": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentAuthor to be of type string, got %T instead", value) + } + sv.Author = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Metadata": + if err := awsAwsjson11_deserializeDocumentDocumentMetadataResponseInfo(&sv.Metadata, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListDocumentsOutput(v **ListDocumentsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDocumentsOutput + if *v == nil { + sv = &ListDocumentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentIdentifiers": + if err := awsAwsjson11_deserializeDocumentDocumentIdentifierList(&sv.DocumentIdentifiers, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(v **ListDocumentVersionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDocumentVersionsOutput + if *v == nil { + sv = &ListDocumentVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentVersions": + if err := awsAwsjson11_deserializeDocumentDocumentVersionList(&sv.DocumentVersions, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(v **ListInventoryEntriesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListInventoryEntriesOutput + if *v == nil { + sv = &ListInventoryEntriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CaptureTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemCaptureTime to be of type string, got %T instead", value) + } + sv.CaptureTime = ptr.String(jtv) + } + + case "Entries": + if err := awsAwsjson11_deserializeDocumentInventoryItemEntryList(&sv.Entries, value); err != nil { + return err + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "SchemaVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemSchemaVersion to be of type string, got %T instead", value) + } + sv.SchemaVersion = ptr.String(jtv) + } + + case "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListNodesOutput(v **ListNodesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListNodesOutput + if *v == nil { + sv = &ListNodesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Nodes": + if err := awsAwsjson11_deserializeDocumentNodeList(&sv.Nodes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListNodesSummaryOutput(v **ListNodesSummaryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListNodesSummaryOutput + if *v == nil { + sv = &ListNodesSummaryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Summary": + if err := awsAwsjson11_deserializeDocumentNodeSummaryList(&sv.Summary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(v **ListOpsItemEventsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOpsItemEventsOutput + if *v == nil { + sv = &ListOpsItemEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Summaries": + if err := awsAwsjson11_deserializeDocumentOpsItemEventSummaries(&sv.Summaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(v **ListOpsItemRelatedItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOpsItemRelatedItemsOutput + if *v == nil { + sv = &ListOpsItemRelatedItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Summaries": + if err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummaries(&sv.Summaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(v **ListOpsMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOpsMetadataOutput + if *v == nil { + sv = &ListOpsMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "OpsMetadataList": + if err := awsAwsjson11_deserializeDocumentOpsMetadataList(&sv.OpsMetadataList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListResourceComplianceSummariesOutput(v **ListResourceComplianceSummariesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListResourceComplianceSummariesOutput + if *v == nil { + sv = &ListResourceComplianceSummariesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ResourceComplianceSummaryItems": + if err := awsAwsjson11_deserializeDocumentResourceComplianceSummaryItemList(&sv.ResourceComplianceSummaryItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListResourceDataSyncOutput(v **ListResourceDataSyncOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListResourceDataSyncOutput + if *v == nil { + sv = &ListResourceDataSyncOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ResourceDataSyncItems": + if err := awsAwsjson11_deserializeDocumentResourceDataSyncItemList(&sv.ResourceDataSyncItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TagList": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.TagList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentModifyDocumentPermissionOutput(v **ModifyDocumentPermissionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ModifyDocumentPermissionOutput + if *v == nil { + sv = &ModifyDocumentPermissionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutComplianceItemsOutput(v **PutComplianceItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutComplianceItemsOutput + if *v == nil { + sv = &PutComplianceItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutInventoryOutput(v **PutInventoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutInventoryOutput + if *v == nil { + sv = &PutInventoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PutInventoryMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutParameterOutput(v **PutParameterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutParameterOutput + if *v == nil { + sv = &PutParameterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Tier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterTier to be of type string, got %T instead", value) + } + sv.Tier = types.ParameterTier(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PSParameterVersion to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutResourcePolicyOutput + if *v == nil { + sv = &PutResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PolicyHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyHash to be of type string, got %T instead", value) + } + sv.PolicyHash = ptr.String(jtv) + } + + case "PolicyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) + } + sv.PolicyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(v **RegisterDefaultPatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterDefaultPatchBaselineOutput + if *v == nil { + sv = &RegisterDefaultPatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRegisterPatchBaselineForPatchGroupOutput(v **RegisterPatchBaselineForPatchGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterPatchBaselineForPatchGroupOutput + if *v == nil { + sv = &RegisterPatchBaselineForPatchGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "PatchGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchGroup to be of type string, got %T instead", value) + } + sv.PatchGroup = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRegisterTargetWithMaintenanceWindowOutput(v **RegisterTargetWithMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterTargetWithMaintenanceWindowOutput + if *v == nil { + sv = &RegisterTargetWithMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTargetId to be of type string, got %T instead", value) + } + sv.WindowTargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRegisterTaskWithMaintenanceWindowOutput(v **RegisterTaskWithMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterTaskWithMaintenanceWindowOutput + if *v == nil { + sv = &RegisterTaskWithMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskId to be of type string, got %T instead", value) + } + sv.WindowTaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRemoveTagsFromResourceOutput(v **RemoveTagsFromResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RemoveTagsFromResourceOutput + if *v == nil { + sv = &RemoveTagsFromResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentResetServiceSettingOutput(v **ResetServiceSettingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ResetServiceSettingOutput + if *v == nil { + sv = &ResetServiceSettingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ServiceSetting": + if err := awsAwsjson11_deserializeDocumentServiceSetting(&sv.ServiceSetting, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentResumeSessionOutput(v **ResumeSessionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ResumeSessionOutput + if *v == nil { + sv = &ResumeSessionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + case "StreamUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StreamUrl to be of type string, got %T instead", value) + } + sv.StreamUrl = ptr.String(jtv) + } + + case "TokenValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TokenValue to be of type string, got %T instead", value) + } + sv.TokenValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentSendAutomationSignalOutput(v **SendAutomationSignalOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SendAutomationSignalOutput + if *v == nil { + sv = &SendAutomationSignalOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentSendCommandOutput(v **SendCommandOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SendCommandOutput + if *v == nil { + sv = &SendCommandOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Command": + if err := awsAwsjson11_deserializeDocumentCommand(&sv.Command, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartAccessRequestOutput(v **StartAccessRequestOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartAccessRequestOutput + if *v == nil { + sv = &StartAccessRequestOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessRequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessRequestId to be of type string, got %T instead", value) + } + sv.AccessRequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartAssociationsOnceOutput(v **StartAssociationsOnceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartAssociationsOnceOutput + if *v == nil { + sv = &StartAssociationsOnceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartAutomationExecutionOutput(v **StartAutomationExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartAutomationExecutionOutput + if *v == nil { + sv = &StartAutomationExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomationExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionId to be of type string, got %T instead", value) + } + sv.AutomationExecutionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartChangeRequestExecutionOutput(v **StartChangeRequestExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartChangeRequestExecutionOutput + if *v == nil { + sv = &StartChangeRequestExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomationExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutomationExecutionId to be of type string, got %T instead", value) + } + sv.AutomationExecutionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartExecutionPreviewOutput(v **StartExecutionPreviewOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartExecutionPreviewOutput + if *v == nil { + sv = &StartExecutionPreviewOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExecutionPreviewId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionPreviewId to be of type string, got %T instead", value) + } + sv.ExecutionPreviewId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartSessionOutput(v **StartSessionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartSessionOutput + if *v == nil { + sv = &StartSessionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + case "StreamUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StreamUrl to be of type string, got %T instead", value) + } + sv.StreamUrl = ptr.String(jtv) + } + + case "TokenValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TokenValue to be of type string, got %T instead", value) + } + sv.TokenValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStopAutomationExecutionOutput(v **StopAutomationExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopAutomationExecutionOutput + if *v == nil { + sv = &StopAutomationExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentTerminateSessionOutput(v **TerminateSessionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TerminateSessionOutput + if *v == nil { + sv = &TerminateSessionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUnlabelParameterVersionOutput(v **UnlabelParameterVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UnlabelParameterVersionOutput + if *v == nil { + sv = &UnlabelParameterVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InvalidLabels": + if err := awsAwsjson11_deserializeDocumentParameterLabelList(&sv.InvalidLabels, value); err != nil { + return err + } + + case "RemovedLabels": + if err := awsAwsjson11_deserializeDocumentParameterLabelList(&sv.RemovedLabels, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateAssociationOutput(v **UpdateAssociationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAssociationOutput + if *v == nil { + sv = &UpdateAssociationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationDescription": + if err := awsAwsjson11_deserializeDocumentAssociationDescription(&sv.AssociationDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateAssociationStatusOutput(v **UpdateAssociationStatusOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAssociationStatusOutput + if *v == nil { + sv = &UpdateAssociationStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationDescription": + if err := awsAwsjson11_deserializeDocumentAssociationDescription(&sv.AssociationDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateDocumentDefaultVersionOutput(v **UpdateDocumentDefaultVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateDocumentDefaultVersionOutput + if *v == nil { + sv = &UpdateDocumentDefaultVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if err := awsAwsjson11_deserializeDocumentDocumentDefaultVersionDescription(&sv.Description, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateDocumentMetadataOutput(v **UpdateDocumentMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateDocumentMetadataOutput + if *v == nil { + sv = &UpdateDocumentMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateDocumentOutput(v **UpdateDocumentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateDocumentOutput + if *v == nil { + sv = &UpdateDocumentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentDescription": + if err := awsAwsjson11_deserializeDocumentDocumentDescription(&sv.DocumentDescription, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowOutput(v **UpdateMaintenanceWindowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateMaintenanceWindowOutput + if *v == nil { + sv = &UpdateMaintenanceWindowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowUnassociatedTargets": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected MaintenanceWindowAllowUnassociatedTargets to be of type *bool, got %T instead", value) + } + sv.AllowUnassociatedTargets = jtv + } + + case "Cutoff": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowCutoff to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Cutoff = int32(i64) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDurationHours to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected MaintenanceWindowEnabled to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + + case "EndDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.EndDate = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Schedule": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowSchedule to be of type string, got %T instead", value) + } + sv.Schedule = ptr.String(jtv) + } + + case "ScheduleOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleOffset = ptr.Int32(int32(i64)) + } + + case "ScheduleTimezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTimezone to be of type string, got %T instead", value) + } + sv.ScheduleTimezone = ptr.String(jtv) + } + + case "StartDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowStringDateTime to be of type string, got %T instead", value) + } + sv.StartDate = ptr.String(jtv) + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTargetOutput(v **UpdateMaintenanceWindowTargetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateMaintenanceWindowTargetOutput + if *v == nil { + sv = &UpdateMaintenanceWindowTargetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerInformation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerInformation to be of type string, got %T instead", value) + } + sv.OwnerInformation = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTargetId to be of type string, got %T instead", value) + } + sv.WindowTargetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTaskOutput(v **UpdateMaintenanceWindowTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateMaintenanceWindowTaskOutput + if *v == nil { + sv = &UpdateMaintenanceWindowTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AlarmConfiguration": + if err := awsAwsjson11_deserializeDocumentAlarmConfiguration(&sv.AlarmConfiguration, value); err != nil { + return err + } + + case "CutoffBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskCutoffBehavior to be of type string, got %T instead", value) + } + sv.CutoffBehavior = types.MaintenanceWindowTaskCutoffBehavior(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LoggingInfo": + if err := awsAwsjson11_deserializeDocumentLoggingInfo(&sv.LoggingInfo, value); err != nil { + return err + } + + case "MaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.MaxConcurrency = ptr.String(jtv) + } + + case "MaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.MaxErrors = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Priority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskPriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Priority = int32(i64) + } + + case "ServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceRole to be of type string, got %T instead", value) + } + sv.ServiceRoleArn = ptr.String(jtv) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskArn to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + case "TaskInvocationParameters": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskInvocationParameters(&sv.TaskInvocationParameters, value); err != nil { + return err + } + + case "TaskParameters": + if err := awsAwsjson11_deserializeDocumentMaintenanceWindowTaskParameters(&sv.TaskParameters, value); err != nil { + return err + } + + case "WindowId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowId to be of type string, got %T instead", value) + } + sv.WindowId = ptr.String(jtv) + } + + case "WindowTaskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaintenanceWindowTaskId to be of type string, got %T instead", value) + } + sv.WindowTaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateManagedInstanceRoleOutput(v **UpdateManagedInstanceRoleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateManagedInstanceRoleOutput + if *v == nil { + sv = &UpdateManagedInstanceRoleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateOpsItemOutput(v **UpdateOpsItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateOpsItemOutput + if *v == nil { + sv = &UpdateOpsItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateOpsMetadataOutput(v **UpdateOpsMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateOpsMetadataOutput + if *v == nil { + sv = &UpdateOpsMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OpsMetadataArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsMetadataArn to be of type string, got %T instead", value) + } + sv.OpsMetadataArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdatePatchBaselineOutput(v **UpdatePatchBaselineOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdatePatchBaselineOutput + if *v == nil { + sv = &UpdatePatchBaselineOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApprovalRules": + if err := awsAwsjson11_deserializeDocumentPatchRuleGroup(&sv.ApprovalRules, value); err != nil { + return err + } + + case "ApprovedPatches": + if err := awsAwsjson11_deserializeDocumentPatchIdList(&sv.ApprovedPatches, value); err != nil { + return err + } + + case "ApprovedPatchesComplianceLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceLevel to be of type string, got %T instead", value) + } + sv.ApprovedPatchesComplianceLevel = types.PatchComplianceLevel(jtv) + } + + case "ApprovedPatchesEnableNonSecurity": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ApprovedPatchesEnableNonSecurity = ptr.Bool(jtv) + } + + case "AvailableSecurityUpdatesComplianceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchComplianceStatus to be of type string, got %T instead", value) + } + sv.AvailableSecurityUpdatesComplianceStatus = types.PatchComplianceStatus(jtv) + } + + case "BaselineId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineId to be of type string, got %T instead", value) + } + sv.BaselineId = ptr.String(jtv) + } + + case "CreatedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "GlobalFilters": + if err := awsAwsjson11_deserializeDocumentPatchFilterGroup(&sv.GlobalFilters, value); err != nil { + return err + } + + case "ModifiedDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ModifiedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaselineName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OperatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OperatingSystem to be of type string, got %T instead", value) + } + sv.OperatingSystem = types.OperatingSystem(jtv) + } + + case "RejectedPatches": + if err := awsAwsjson11_deserializeDocumentPatchIdList(&sv.RejectedPatches, value); err != nil { + return err + } + + case "RejectedPatchesAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatchAction to be of type string, got %T instead", value) + } + sv.RejectedPatchesAction = types.PatchAction(jtv) + } + + case "Sources": + if err := awsAwsjson11_deserializeDocumentPatchSourceList(&sv.Sources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateResourceDataSyncOutput(v **UpdateResourceDataSyncOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateResourceDataSyncOutput + if *v == nil { + sv = &UpdateResourceDataSyncOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateServiceSettingOutput(v **UpdateServiceSettingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateServiceSettingOutput + if *v == nil { + sv = &UpdateServiceSettingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/doc.go new file mode 100644 index 00000000000..f4cc4e73cc1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/doc.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package ssm provides the API client, operations, and parameter types for Amazon +// Simple Systems Manager (SSM). +// +// Amazon Web Services Systems Manager is the operations hub for your Amazon Web +// Services applications and resources and a secure end-to-end management solution +// for hybrid cloud environments that enables safe and secure operations at scale. +// +// This reference is intended to be used with the [Amazon Web Services Systems Manager User Guide]. To get started, see [Setting up Amazon Web Services Systems Manager]. +// +// Related resources +// +// - For information about each of the tools that comprise Systems Manager, see [Using Systems Manager tools] +// in the Amazon Web Services Systems Manager User Guide. +// +// - For details about predefined runbooks for Automation, a tool in Amazon Web +// Services Systems Manager, see the [Systems Manager Automation Runbook Reference]. +// +// - For information about AppConfig, a tool in Systems Manager, see the [AppConfig User Guide]and the [AppConfig API Reference] +// . +// +// - For information about Incident Manager, a tool in Systems Manager, see the [Systems Manager Incident Manager User Guide] +// and the [Systems Manager Incident Manager API Reference]. +// +// [Amazon Web Services Systems Manager User Guide]: https://docs.aws.amazon.com/systems-manager/latest/userguide/ +// [AppConfig User Guide]: https://docs.aws.amazon.com/appconfig/latest/userguide/ +// [Systems Manager Automation Runbook Reference]: https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-runbook-reference.html +// [AppConfig API Reference]: https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/ +// [Systems Manager Incident Manager API Reference]: https://docs.aws.amazon.com/incident-manager/latest/APIReference/ +// [Setting up Amazon Web Services Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up-console.html +// [Systems Manager Incident Manager User Guide]: https://docs.aws.amazon.com/incident-manager/latest/userguide/ +// [Using Systems Manager tools]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-tools.html +package ssm diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go new file mode 100644 index 00000000000..333d9306539 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go @@ -0,0 +1,571 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "ssm" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_SSM") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "SSM", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) (*string, error) { + if region == "" { + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) + } + + return aws.String(endpoints.MapFIPSRegion(region)), nil +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string + + // When true, use the dual-stack endpoint. If the configured endpoint does not + // support dual-stack, dispatching the request MAY return an error. + // + // Defaults to + // false if no value is provided. + // + // AWS::UseDualStack + UseDualStack *bool + + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _ = _UseDualStack + _UseFIPS := *params.UseFIPS + _ = _UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ssm-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if _PartitionResult.SupportsFIPS == true { + if _PartitionResult.Name == "aws-us-gov" { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ssm.") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://ssm-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + } + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ssm.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://ssm.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { + params := &EndpointParameters{} + + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params, nil +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json new file mode 100644 index 00000000000..ffae3d297bf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json @@ -0,0 +1,179 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_AddTagsToResource.go", + "api_op_AssociateOpsItemRelatedItem.go", + "api_op_CancelCommand.go", + "api_op_CancelMaintenanceWindowExecution.go", + "api_op_CreateActivation.go", + "api_op_CreateAssociation.go", + "api_op_CreateAssociationBatch.go", + "api_op_CreateDocument.go", + "api_op_CreateMaintenanceWindow.go", + "api_op_CreateOpsItem.go", + "api_op_CreateOpsMetadata.go", + "api_op_CreatePatchBaseline.go", + "api_op_CreateResourceDataSync.go", + "api_op_DeleteActivation.go", + "api_op_DeleteAssociation.go", + "api_op_DeleteDocument.go", + "api_op_DeleteInventory.go", + "api_op_DeleteMaintenanceWindow.go", + "api_op_DeleteOpsItem.go", + "api_op_DeleteOpsMetadata.go", + "api_op_DeleteParameter.go", + "api_op_DeleteParameters.go", + "api_op_DeletePatchBaseline.go", + "api_op_DeleteResourceDataSync.go", + "api_op_DeleteResourcePolicy.go", + "api_op_DeregisterManagedInstance.go", + "api_op_DeregisterPatchBaselineForPatchGroup.go", + "api_op_DeregisterTargetFromMaintenanceWindow.go", + "api_op_DeregisterTaskFromMaintenanceWindow.go", + "api_op_DescribeActivations.go", + "api_op_DescribeAssociation.go", + "api_op_DescribeAssociationExecutionTargets.go", + "api_op_DescribeAssociationExecutions.go", + "api_op_DescribeAutomationExecutions.go", + "api_op_DescribeAutomationStepExecutions.go", + "api_op_DescribeAvailablePatches.go", + "api_op_DescribeDocument.go", + "api_op_DescribeDocumentPermission.go", + "api_op_DescribeEffectiveInstanceAssociations.go", + "api_op_DescribeEffectivePatchesForPatchBaseline.go", + "api_op_DescribeInstanceAssociationsStatus.go", + "api_op_DescribeInstanceInformation.go", + "api_op_DescribeInstancePatchStates.go", + "api_op_DescribeInstancePatchStatesForPatchGroup.go", + "api_op_DescribeInstancePatches.go", + "api_op_DescribeInstanceProperties.go", + "api_op_DescribeInventoryDeletions.go", + "api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go", + "api_op_DescribeMaintenanceWindowExecutionTasks.go", + "api_op_DescribeMaintenanceWindowExecutions.go", + "api_op_DescribeMaintenanceWindowSchedule.go", + "api_op_DescribeMaintenanceWindowTargets.go", + "api_op_DescribeMaintenanceWindowTasks.go", + "api_op_DescribeMaintenanceWindows.go", + "api_op_DescribeMaintenanceWindowsForTarget.go", + "api_op_DescribeOpsItems.go", + "api_op_DescribeParameters.go", + "api_op_DescribePatchBaselines.go", + "api_op_DescribePatchGroupState.go", + "api_op_DescribePatchGroups.go", + "api_op_DescribePatchProperties.go", + "api_op_DescribeSessions.go", + "api_op_DisassociateOpsItemRelatedItem.go", + "api_op_GetAccessToken.go", + "api_op_GetAutomationExecution.go", + "api_op_GetCalendarState.go", + "api_op_GetCommandInvocation.go", + "api_op_GetConnectionStatus.go", + "api_op_GetDefaultPatchBaseline.go", + "api_op_GetDeployablePatchSnapshotForInstance.go", + "api_op_GetDocument.go", + "api_op_GetExecutionPreview.go", + "api_op_GetInventory.go", + "api_op_GetInventorySchema.go", + "api_op_GetMaintenanceWindow.go", + "api_op_GetMaintenanceWindowExecution.go", + "api_op_GetMaintenanceWindowExecutionTask.go", + "api_op_GetMaintenanceWindowExecutionTaskInvocation.go", + "api_op_GetMaintenanceWindowTask.go", + "api_op_GetOpsItem.go", + "api_op_GetOpsMetadata.go", + "api_op_GetOpsSummary.go", + "api_op_GetParameter.go", + "api_op_GetParameterHistory.go", + "api_op_GetParameters.go", + "api_op_GetParametersByPath.go", + "api_op_GetPatchBaseline.go", + "api_op_GetPatchBaselineForPatchGroup.go", + "api_op_GetResourcePolicies.go", + "api_op_GetServiceSetting.go", + "api_op_LabelParameterVersion.go", + "api_op_ListAssociationVersions.go", + "api_op_ListAssociations.go", + "api_op_ListCommandInvocations.go", + "api_op_ListCommands.go", + "api_op_ListComplianceItems.go", + "api_op_ListComplianceSummaries.go", + "api_op_ListDocumentMetadataHistory.go", + "api_op_ListDocumentVersions.go", + "api_op_ListDocuments.go", + "api_op_ListInventoryEntries.go", + "api_op_ListNodes.go", + "api_op_ListNodesSummary.go", + "api_op_ListOpsItemEvents.go", + "api_op_ListOpsItemRelatedItems.go", + "api_op_ListOpsMetadata.go", + "api_op_ListResourceComplianceSummaries.go", + "api_op_ListResourceDataSync.go", + "api_op_ListTagsForResource.go", + "api_op_ModifyDocumentPermission.go", + "api_op_PutComplianceItems.go", + "api_op_PutInventory.go", + "api_op_PutParameter.go", + "api_op_PutResourcePolicy.go", + "api_op_RegisterDefaultPatchBaseline.go", + "api_op_RegisterPatchBaselineForPatchGroup.go", + "api_op_RegisterTargetWithMaintenanceWindow.go", + "api_op_RegisterTaskWithMaintenanceWindow.go", + "api_op_RemoveTagsFromResource.go", + "api_op_ResetServiceSetting.go", + "api_op_ResumeSession.go", + "api_op_SendAutomationSignal.go", + "api_op_SendCommand.go", + "api_op_StartAccessRequest.go", + "api_op_StartAssociationsOnce.go", + "api_op_StartAutomationExecution.go", + "api_op_StartChangeRequestExecution.go", + "api_op_StartExecutionPreview.go", + "api_op_StartSession.go", + "api_op_StopAutomationExecution.go", + "api_op_TerminateSession.go", + "api_op_UnlabelParameterVersion.go", + "api_op_UpdateAssociation.go", + "api_op_UpdateAssociationStatus.go", + "api_op_UpdateDocument.go", + "api_op_UpdateDocumentDefaultVersion.go", + "api_op_UpdateDocumentMetadata.go", + "api_op_UpdateMaintenanceWindow.go", + "api_op_UpdateMaintenanceWindowTarget.go", + "api_op_UpdateMaintenanceWindowTask.go", + "api_op_UpdateManagedInstanceRole.go", + "api_op_UpdateOpsItem.go", + "api_op_UpdateOpsMetadata.go", + "api_op_UpdatePatchBaseline.go", + "api_op_UpdateResourceDataSync.go", + "api_op_UpdateServiceSetting.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "serializers.go", + "snapshot_test.go", + "sra_operation_order_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.24", + "module": "github.com/aws/aws-sdk-go-v2/service/ssm", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go new file mode 100644 index 00000000000..69d95cc9cf8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package ssm + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.68.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..52ee1b9c1f5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go @@ -0,0 +1,607 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver SSM endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsEusc *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "ssm.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "ssm-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-6", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.ca-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.ca-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "fips-ca-central-1", + }: endpoints.Endpoint{ + Hostname: "ssm-fips.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ca-west-1", + }: endpoints.Endpoint{ + Hostname: "ssm-fips.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "ssm-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "ssm-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-1", + }: endpoints.Endpoint{ + Hostname: "ssm-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-2", + }: endpoints.Endpoint{ + Hostname: "ssm-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "mx-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.us-west-2.amazonaws.com", + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "ssm.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "ssm-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-eusc", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "ssm.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "ssm-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsEusc, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eusc-de-east-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-iso-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isob-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eu-isoe-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isof-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "ssm.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "ssm-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "ssm.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-gov-east-1", + }: endpoints.Endpoint{ + Hostname: "ssm.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-gov-west-1", + }: endpoints.Endpoint{ + Hostname: "ssm.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm.us-gov-west-1.amazonaws.com", + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go new file mode 100644 index 00000000000..5add4229ef1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go @@ -0,0 +1,242 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // The optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. + // + // To migrate an EndpointResolver implementation that uses a custom endpoint, set + // the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. + EndpointResolverV2 EndpointResolverV2 + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // Client registry of operation interceptors. + Interceptors smithyhttp.InterceptorRegistry + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme + + // Priority list of preferred auth scheme names (e.g. sigv4a). + AuthSchemePreference []string +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + to.Interceptors = o.Interceptors.Copy() + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go new file mode 100644 index 00000000000..d791c8ec0e9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go @@ -0,0 +1,16677 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "path" +) + +type awsAwsjson11_serializeOpAddTagsToResource struct { +} + +func (*awsAwsjson11_serializeOpAddTagsToResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AddTagsToResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.AddTagsToResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAddTagsToResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpAssociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateOpsItemRelatedItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.AssociateOpsItemRelatedItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAssociateOpsItemRelatedItemInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCancelCommand struct { +} + +func (*awsAwsjson11_serializeOpCancelCommand) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCancelCommand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelCommandInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CancelCommand") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCancelCommandInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCancelMaintenanceWindowExecution struct { +} + +func (*awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelMaintenanceWindowExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CancelMaintenanceWindowExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCancelMaintenanceWindowExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateActivation struct { +} + +func (*awsAwsjson11_serializeOpCreateActivation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateActivation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateActivationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateActivation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateActivationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateAssociation struct { +} + +func (*awsAwsjson11_serializeOpCreateAssociation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateAssociationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateAssociation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateAssociationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateAssociationBatch struct { +} + +func (*awsAwsjson11_serializeOpCreateAssociationBatch) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateAssociationBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateAssociationBatchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateAssociationBatch") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateAssociationBatchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateDocument struct { +} + +func (*awsAwsjson11_serializeOpCreateDocument) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateDocumentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateDocument") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateDocumentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpCreateMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateOpsItem struct { +} + +func (*awsAwsjson11_serializeOpCreateOpsItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateOpsItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateOpsItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateOpsItemInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateOpsMetadata struct { +} + +func (*awsAwsjson11_serializeOpCreateOpsMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateOpsMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateOpsMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateOpsMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreatePatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpCreatePatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreatePatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreatePatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreatePatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreatePatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateResourceDataSync struct { +} + +func (*awsAwsjson11_serializeOpCreateResourceDataSync) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateResourceDataSyncInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.CreateResourceDataSync") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateResourceDataSyncInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteActivation struct { +} + +func (*awsAwsjson11_serializeOpDeleteActivation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteActivation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteActivationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteActivation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteActivationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteAssociation struct { +} + +func (*awsAwsjson11_serializeOpDeleteAssociation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteAssociationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteAssociation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteAssociationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDocument struct { +} + +func (*awsAwsjson11_serializeOpDeleteDocument) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDocumentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteDocument") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDocumentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteInventory struct { +} + +func (*awsAwsjson11_serializeOpDeleteInventory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteInventory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteInventoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteInventory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteInventoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpDeleteMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteOpsItem struct { +} + +func (*awsAwsjson11_serializeOpDeleteOpsItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteOpsItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteOpsItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteOpsItemInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteOpsMetadata struct { +} + +func (*awsAwsjson11_serializeOpDeleteOpsMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteOpsMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteOpsMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteOpsMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteParameter struct { +} + +func (*awsAwsjson11_serializeOpDeleteParameter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteParameter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteParameterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteParameter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteParameterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteParameters struct { +} + +func (*awsAwsjson11_serializeOpDeleteParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteParameters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteParametersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeletePatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpDeletePatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeletePatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeletePatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeletePatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeletePatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteResourceDataSync struct { +} + +func (*awsAwsjson11_serializeOpDeleteResourceDataSync) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourceDataSyncInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteResourceDataSync") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteResourceDataSyncInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeleteResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeregisterManagedInstance struct { +} + +func (*awsAwsjson11_serializeOpDeregisterManagedInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeregisterManagedInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeregisterManagedInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeregisterManagedInstance") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeregisterManagedInstanceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup struct { +} + +func (*awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeregisterPatchBaselineForPatchGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeregisterPatchBaselineForPatchGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeregisterPatchBaselineForPatchGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeregisterTargetFromMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeregisterTargetFromMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeregisterTargetFromMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeregisterTaskFromMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DeregisterTaskFromMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeregisterTaskFromMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeActivations struct { +} + +func (*awsAwsjson11_serializeOpDescribeActivations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeActivations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeActivationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeActivations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeActivationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAssociation struct { +} + +func (*awsAwsjson11_serializeOpDescribeAssociation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAssociationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeAssociation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAssociationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAssociationExecutions struct { +} + +func (*awsAwsjson11_serializeOpDescribeAssociationExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAssociationExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAssociationExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeAssociationExecutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAssociationExecutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAssociationExecutionTargets struct { +} + +func (*awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAssociationExecutionTargetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeAssociationExecutionTargets") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAssociationExecutionTargetsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAutomationExecutions struct { +} + +func (*awsAwsjson11_serializeOpDescribeAutomationExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAutomationExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAutomationExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeAutomationExecutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAutomationExecutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAutomationStepExecutions struct { +} + +func (*awsAwsjson11_serializeOpDescribeAutomationStepExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAutomationStepExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAutomationStepExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeAutomationStepExecutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAutomationStepExecutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAvailablePatches struct { +} + +func (*awsAwsjson11_serializeOpDescribeAvailablePatches) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAvailablePatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAvailablePatchesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeAvailablePatches") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAvailablePatchesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeDocument struct { +} + +func (*awsAwsjson11_serializeOpDescribeDocument) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeDocumentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeDocument") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeDocumentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeDocumentPermission struct { +} + +func (*awsAwsjson11_serializeOpDescribeDocumentPermission) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeDocumentPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeDocumentPermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeDocumentPermission") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeDocumentPermissionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations struct { +} + +func (*awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeEffectiveInstanceAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeEffectiveInstanceAssociations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeEffectiveInstanceAssociationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeEffectivePatchesForPatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeEffectivePatchesForPatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeEffectivePatchesForPatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstanceAssociationsStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstanceAssociationsStatus") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstanceAssociationsStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInstanceInformation struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstanceInformation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstanceInformation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstanceInformationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstanceInformation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstanceInformationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInstancePatches struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstancePatches) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstancePatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstancePatchesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstancePatches") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstancePatchesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInstancePatchStates struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstancePatchStates) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstancePatchStates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstancePatchStatesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstancePatchStates") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstancePatchStatesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstancePatchStatesForPatchGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstancePatchStatesForPatchGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstancePatchStatesForPatchGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInstanceProperties struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstanceProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstanceProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInstancePropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstanceProperties") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstancePropertiesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeInventoryDeletions struct { +} + +func (*awsAwsjson11_serializeOpDescribeInventoryDeletions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInventoryDeletions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInventoryDeletionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInventoryDeletions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInventoryDeletionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowExecutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowExecutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowExecutionTaskInvocationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowExecutionTaskInvocations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowExecutionTaskInvocationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowExecutionTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowExecutionTasks") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowExecutionTasksInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindows struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindows) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindows") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowSchedule") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowScheduleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowsForTargetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowsForTarget") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowsForTargetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowTargetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowTargets") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowTargetsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks struct { +} + +func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMaintenanceWindowTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeMaintenanceWindowTasks") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowTasksInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeOpsItems struct { +} + +func (*awsAwsjson11_serializeOpDescribeOpsItems) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeOpsItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeOpsItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeOpsItems") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeOpsItemsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeParameters struct { +} + +func (*awsAwsjson11_serializeOpDescribeParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeParameters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeParametersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribePatchBaselines struct { +} + +func (*awsAwsjson11_serializeOpDescribePatchBaselines) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribePatchBaselines) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribePatchBaselinesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribePatchBaselines") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribePatchBaselinesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribePatchGroups struct { +} + +func (*awsAwsjson11_serializeOpDescribePatchGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribePatchGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribePatchGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribePatchGroups") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribePatchGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribePatchGroupState struct { +} + +func (*awsAwsjson11_serializeOpDescribePatchGroupState) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribePatchGroupState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribePatchGroupStateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribePatchGroupState") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribePatchGroupStateInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribePatchProperties struct { +} + +func (*awsAwsjson11_serializeOpDescribePatchProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribePatchProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribePatchPropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribePatchProperties") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribePatchPropertiesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeSessions struct { +} + +func (*awsAwsjson11_serializeOpDescribeSessions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeSessionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeSessions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeSessionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateOpsItemRelatedItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DisassociateOpsItemRelatedItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDisassociateOpsItemRelatedItemInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetAccessToken struct { +} + +func (*awsAwsjson11_serializeOpGetAccessToken) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetAccessToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAccessTokenInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetAccessToken") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetAccessTokenInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetAutomationExecution struct { +} + +func (*awsAwsjson11_serializeOpGetAutomationExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetAutomationExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAutomationExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetAutomationExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetAutomationExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetCalendarState struct { +} + +func (*awsAwsjson11_serializeOpGetCalendarState) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetCalendarState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCalendarStateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetCalendarState") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetCalendarStateInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetCommandInvocation struct { +} + +func (*awsAwsjson11_serializeOpGetCommandInvocation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetCommandInvocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCommandInvocationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetCommandInvocation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetCommandInvocationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetConnectionStatus struct { +} + +func (*awsAwsjson11_serializeOpGetConnectionStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetConnectionStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetConnectionStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetConnectionStatus") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetConnectionStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDefaultPatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpGetDefaultPatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDefaultPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDefaultPatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetDefaultPatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDefaultPatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance struct { +} + +func (*awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDeployablePatchSnapshotForInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetDeployablePatchSnapshotForInstance") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDeployablePatchSnapshotForInstanceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDocument struct { +} + +func (*awsAwsjson11_serializeOpGetDocument) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDocumentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetDocument") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDocumentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetExecutionPreview struct { +} + +func (*awsAwsjson11_serializeOpGetExecutionPreview) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetExecutionPreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetExecutionPreviewInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetExecutionPreview") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetExecutionPreviewInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetInventory struct { +} + +func (*awsAwsjson11_serializeOpGetInventory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetInventory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetInventoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetInventory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetInventoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetInventorySchema struct { +} + +func (*awsAwsjson11_serializeOpGetInventorySchema) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetInventorySchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetInventorySchemaInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetInventorySchema") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetInventorySchemaInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpGetMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetMaintenanceWindowExecution struct { +} + +func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMaintenanceWindowExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetMaintenanceWindowExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetMaintenanceWindowExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask struct { +} + +func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMaintenanceWindowExecutionTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetMaintenanceWindowExecutionTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetMaintenanceWindowExecutionTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation struct { +} + +func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMaintenanceWindowExecutionTaskInvocationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetMaintenanceWindowExecutionTaskInvocation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetMaintenanceWindowTask struct { +} + +func (*awsAwsjson11_serializeOpGetMaintenanceWindowTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetMaintenanceWindowTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMaintenanceWindowTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetMaintenanceWindowTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetMaintenanceWindowTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetOpsItem struct { +} + +func (*awsAwsjson11_serializeOpGetOpsItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetOpsItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetOpsItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetOpsItemInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetOpsMetadata struct { +} + +func (*awsAwsjson11_serializeOpGetOpsMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetOpsMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetOpsMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetOpsMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetOpsSummary struct { +} + +func (*awsAwsjson11_serializeOpGetOpsSummary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetOpsSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetOpsSummaryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetOpsSummary") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetOpsSummaryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetParameter struct { +} + +func (*awsAwsjson11_serializeOpGetParameter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetParameter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetParameterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetParameter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetParameterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetParameterHistory struct { +} + +func (*awsAwsjson11_serializeOpGetParameterHistory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetParameterHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetParameterHistoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetParameterHistory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetParameterHistoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetParameters struct { +} + +func (*awsAwsjson11_serializeOpGetParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetParameters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetParametersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetParametersByPath struct { +} + +func (*awsAwsjson11_serializeOpGetParametersByPath) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetParametersByPath) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetParametersByPathInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetParametersByPath") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetParametersByPathInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetPatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpGetPatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetPatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetPatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetPatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup struct { +} + +func (*awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetPatchBaselineForPatchGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetPatchBaselineForPatchGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetPatchBaselineForPatchGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetResourcePolicies struct { +} + +func (*awsAwsjson11_serializeOpGetResourcePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetResourcePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetResourcePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetResourcePolicies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetResourcePoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetServiceSetting struct { +} + +func (*awsAwsjson11_serializeOpGetServiceSetting) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetServiceSetting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetServiceSettingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetServiceSetting") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetServiceSettingInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpLabelParameterVersion struct { +} + +func (*awsAwsjson11_serializeOpLabelParameterVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpLabelParameterVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*LabelParameterVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.LabelParameterVersion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentLabelParameterVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListAssociations struct { +} + +func (*awsAwsjson11_serializeOpListAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListAssociations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListAssociationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListAssociationVersions struct { +} + +func (*awsAwsjson11_serializeOpListAssociationVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListAssociationVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAssociationVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListAssociationVersions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListAssociationVersionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListCommandInvocations struct { +} + +func (*awsAwsjson11_serializeOpListCommandInvocations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListCommandInvocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCommandInvocationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListCommandInvocations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListCommandInvocationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListCommands struct { +} + +func (*awsAwsjson11_serializeOpListCommands) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListCommands) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCommandsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListCommands") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListCommandsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListComplianceItems struct { +} + +func (*awsAwsjson11_serializeOpListComplianceItems) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListComplianceItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListComplianceItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListComplianceItems") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListComplianceItemsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListComplianceSummaries struct { +} + +func (*awsAwsjson11_serializeOpListComplianceSummaries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListComplianceSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListComplianceSummariesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListComplianceSummaries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListComplianceSummariesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListDocumentMetadataHistory struct { +} + +func (*awsAwsjson11_serializeOpListDocumentMetadataHistory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListDocumentMetadataHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDocumentMetadataHistoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListDocumentMetadataHistory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListDocumentMetadataHistoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListDocuments struct { +} + +func (*awsAwsjson11_serializeOpListDocuments) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListDocuments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDocumentsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListDocuments") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListDocumentsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListDocumentVersions struct { +} + +func (*awsAwsjson11_serializeOpListDocumentVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListDocumentVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDocumentVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListDocumentVersions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListDocumentVersionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListInventoryEntries struct { +} + +func (*awsAwsjson11_serializeOpListInventoryEntries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListInventoryEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListInventoryEntriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListInventoryEntries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListInventoryEntriesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListNodes struct { +} + +func (*awsAwsjson11_serializeOpListNodes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListNodes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNodesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListNodes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListNodesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListNodesSummary struct { +} + +func (*awsAwsjson11_serializeOpListNodesSummary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListNodesSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNodesSummaryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListNodesSummary") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListNodesSummaryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListOpsItemEvents struct { +} + +func (*awsAwsjson11_serializeOpListOpsItemEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListOpsItemEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOpsItemEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListOpsItemEvents") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListOpsItemEventsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListOpsItemRelatedItems struct { +} + +func (*awsAwsjson11_serializeOpListOpsItemRelatedItems) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOpsItemRelatedItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListOpsItemRelatedItems") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListOpsItemRelatedItemsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListOpsMetadata struct { +} + +func (*awsAwsjson11_serializeOpListOpsMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOpsMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListOpsMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListOpsMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListResourceComplianceSummaries struct { +} + +func (*awsAwsjson11_serializeOpListResourceComplianceSummaries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListResourceComplianceSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListResourceComplianceSummariesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListResourceComplianceSummaries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListResourceComplianceSummariesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListResourceDataSync struct { +} + +func (*awsAwsjson11_serializeOpListResourceDataSync) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListResourceDataSyncInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListResourceDataSync") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListResourceDataSyncInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpModifyDocumentPermission struct { +} + +func (*awsAwsjson11_serializeOpModifyDocumentPermission) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpModifyDocumentPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ModifyDocumentPermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ModifyDocumentPermission") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentModifyDocumentPermissionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutComplianceItems struct { +} + +func (*awsAwsjson11_serializeOpPutComplianceItems) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutComplianceItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutComplianceItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.PutComplianceItems") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutComplianceItemsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutInventory struct { +} + +func (*awsAwsjson11_serializeOpPutInventory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutInventory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutInventoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.PutInventory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutInventoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutParameter struct { +} + +func (*awsAwsjson11_serializeOpPutParameter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutParameter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutParameterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.PutParameter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutParameterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.PutResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRegisterDefaultPatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RegisterDefaultPatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.RegisterDefaultPatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRegisterDefaultPatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup struct { +} + +func (*awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RegisterPatchBaselineForPatchGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.RegisterPatchBaselineForPatchGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRegisterPatchBaselineForPatchGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RegisterTargetWithMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.RegisterTargetWithMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRegisterTargetWithMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RegisterTaskWithMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.RegisterTaskWithMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRegisterTaskWithMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRemoveTagsFromResource struct { +} + +func (*awsAwsjson11_serializeOpRemoveTagsFromResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RemoveTagsFromResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.RemoveTagsFromResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRemoveTagsFromResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpResetServiceSetting struct { +} + +func (*awsAwsjson11_serializeOpResetServiceSetting) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpResetServiceSetting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ResetServiceSettingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ResetServiceSetting") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentResetServiceSettingInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpResumeSession struct { +} + +func (*awsAwsjson11_serializeOpResumeSession) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpResumeSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ResumeSessionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ResumeSession") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentResumeSessionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpSendAutomationSignal struct { +} + +func (*awsAwsjson11_serializeOpSendAutomationSignal) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpSendAutomationSignal) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SendAutomationSignalInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.SendAutomationSignal") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentSendAutomationSignalInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpSendCommand struct { +} + +func (*awsAwsjson11_serializeOpSendCommand) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpSendCommand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SendCommandInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.SendCommand") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentSendCommandInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartAccessRequest struct { +} + +func (*awsAwsjson11_serializeOpStartAccessRequest) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartAccessRequest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartAccessRequestInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartAccessRequest") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartAccessRequestInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartAssociationsOnce struct { +} + +func (*awsAwsjson11_serializeOpStartAssociationsOnce) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartAssociationsOnce) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartAssociationsOnceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartAssociationsOnce") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartAssociationsOnceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartAutomationExecution struct { +} + +func (*awsAwsjson11_serializeOpStartAutomationExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartAutomationExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartAutomationExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartAutomationExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartAutomationExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartChangeRequestExecution struct { +} + +func (*awsAwsjson11_serializeOpStartChangeRequestExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartChangeRequestExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartChangeRequestExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartChangeRequestExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartExecutionPreview struct { +} + +func (*awsAwsjson11_serializeOpStartExecutionPreview) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartExecutionPreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartExecutionPreviewInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartExecutionPreview") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartExecutionPreviewInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartSession struct { +} + +func (*awsAwsjson11_serializeOpStartSession) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartSessionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartSession") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartSessionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStopAutomationExecution struct { +} + +func (*awsAwsjson11_serializeOpStopAutomationExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopAutomationExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopAutomationExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StopAutomationExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopAutomationExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpTerminateSession struct { +} + +func (*awsAwsjson11_serializeOpTerminateSession) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpTerminateSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TerminateSessionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.TerminateSession") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentTerminateSessionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUnlabelParameterVersion struct { +} + +func (*awsAwsjson11_serializeOpUnlabelParameterVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUnlabelParameterVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UnlabelParameterVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UnlabelParameterVersion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUnlabelParameterVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateAssociation struct { +} + +func (*awsAwsjson11_serializeOpUpdateAssociation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAssociationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateAssociation") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateAssociationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateAssociationStatus struct { +} + +func (*awsAwsjson11_serializeOpUpdateAssociationStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateAssociationStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAssociationStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateAssociationStatus") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateAssociationStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateDocument struct { +} + +func (*awsAwsjson11_serializeOpUpdateDocument) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateDocumentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateDocument") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateDocumentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateDocumentDefaultVersion struct { +} + +func (*awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateDocumentDefaultVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateDocumentDefaultVersion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateDocumentDefaultVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateDocumentMetadata struct { +} + +func (*awsAwsjson11_serializeOpUpdateDocumentMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateDocumentMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateDocumentMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateDocumentMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateDocumentMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateMaintenanceWindow struct { +} + +func (*awsAwsjson11_serializeOpUpdateMaintenanceWindow) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateMaintenanceWindowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateMaintenanceWindow") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateMaintenanceWindowInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget struct { +} + +func (*awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateMaintenanceWindowTargetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateMaintenanceWindowTarget") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateMaintenanceWindowTargetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateMaintenanceWindowTask struct { +} + +func (*awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateMaintenanceWindowTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateMaintenanceWindowTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateMaintenanceWindowTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateManagedInstanceRole struct { +} + +func (*awsAwsjson11_serializeOpUpdateManagedInstanceRole) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateManagedInstanceRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateManagedInstanceRoleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateManagedInstanceRole") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateManagedInstanceRoleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateOpsItem struct { +} + +func (*awsAwsjson11_serializeOpUpdateOpsItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateOpsItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateOpsItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateOpsItemInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateOpsMetadata struct { +} + +func (*awsAwsjson11_serializeOpUpdateOpsMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateOpsMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateOpsMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateOpsMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdatePatchBaseline struct { +} + +func (*awsAwsjson11_serializeOpUpdatePatchBaseline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdatePatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdatePatchBaselineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdatePatchBaseline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdatePatchBaselineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateResourceDataSync struct { +} + +func (*awsAwsjson11_serializeOpUpdateResourceDataSync) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateResourceDataSyncInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateResourceDataSync") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateResourceDataSyncInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateServiceSetting struct { +} + +func (*awsAwsjson11_serializeOpUpdateServiceSetting) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateServiceSetting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateServiceSettingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.UpdateServiceSetting") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateServiceSettingInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsAwsjson11_serializeDocumentAccountIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentAccounts(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentAlarm(v *types.Alarm, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAlarmConfiguration(v *types.AlarmConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Alarms != nil { + ok := object.Key("Alarms") + if err := awsAwsjson11_serializeDocumentAlarmList(v.Alarms, ok); err != nil { + return err + } + } + + if v.IgnorePollAlarmFailure { + ok := object.Key("IgnorePollAlarmFailure") + ok.Boolean(v.IgnorePollAlarmFailure) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAlarmList(v []types.Alarm, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAlarm(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAssociationExecutionFilter(v *types.AssociationExecutionFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAssociationExecutionFilterList(v []types.AssociationExecutionFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAssociationExecutionFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAssociationExecutionTargetsFilter(v *types.AssociationExecutionTargetsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAssociationExecutionTargetsFilterList(v []types.AssociationExecutionTargetsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAssociationExecutionTargetsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAssociationFilter(v *types.AssociationFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAssociationFilterList(v []types.AssociationFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAssociationFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAssociationIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentAssociationStatus(v *types.AssociationStatus, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalInfo != nil { + ok := object.Key("AdditionalInfo") + ok.String(*v.AdditionalInfo) + } + + if v.Date != nil { + ok := object.Key("Date") + ok.Double(smithytime.FormatEpochSeconds(*v.Date)) + } + + if v.Message != nil { + ok := object.Key("Message") + ok.String(*v.Message) + } + + if len(v.Name) > 0 { + ok := object.Key("Name") + ok.String(string(v.Name)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAttachmentsSource(v *types.AttachmentsSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentAttachmentsSourceValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentAttachmentsSourceList(v []types.AttachmentsSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAttachmentsSource(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAttachmentsSourceValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentAutomationExecutionFilter(v *types.AutomationExecutionFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentAutomationExecutionFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentAutomationExecutionFilterList(v []types.AutomationExecutionFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAutomationExecutionFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAutomationExecutionFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentAutomationExecutionInputs(v *types.AutomationExecutionInputs, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetLocationsURL != nil { + ok := object.Key("TargetLocationsURL") + ok.String(*v.TargetLocationsURL) + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.TargetParameterName != nil { + ok := object.Key("TargetParameterName") + ok.String(*v.TargetParameterName) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentAutomationParameterMap(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentAutomationParameterValueList(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAutomationParameterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentBaselineOverride(v *types.BaselineOverride, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApprovalRules != nil { + ok := object.Key("ApprovalRules") + if err := awsAwsjson11_serializeDocumentPatchRuleGroup(v.ApprovalRules, ok); err != nil { + return err + } + } + + if v.ApprovedPatches != nil { + ok := object.Key("ApprovedPatches") + if err := awsAwsjson11_serializeDocumentPatchIdList(v.ApprovedPatches, ok); err != nil { + return err + } + } + + if len(v.ApprovedPatchesComplianceLevel) > 0 { + ok := object.Key("ApprovedPatchesComplianceLevel") + ok.String(string(v.ApprovedPatchesComplianceLevel)) + } + + if v.ApprovedPatchesEnableNonSecurity { + ok := object.Key("ApprovedPatchesEnableNonSecurity") + ok.Boolean(v.ApprovedPatchesEnableNonSecurity) + } + + if len(v.AvailableSecurityUpdatesComplianceStatus) > 0 { + ok := object.Key("AvailableSecurityUpdatesComplianceStatus") + ok.String(string(v.AvailableSecurityUpdatesComplianceStatus)) + } + + if v.GlobalFilters != nil { + ok := object.Key("GlobalFilters") + if err := awsAwsjson11_serializeDocumentPatchFilterGroup(v.GlobalFilters, ok); err != nil { + return err + } + } + + if len(v.OperatingSystem) > 0 { + ok := object.Key("OperatingSystem") + ok.String(string(v.OperatingSystem)) + } + + if v.RejectedPatches != nil { + ok := object.Key("RejectedPatches") + if err := awsAwsjson11_serializeDocumentPatchIdList(v.RejectedPatches, ok); err != nil { + return err + } + } + + if len(v.RejectedPatchesAction) > 0 { + ok := object.Key("RejectedPatchesAction") + ok.String(string(v.RejectedPatchesAction)) + } + + if v.Sources != nil { + ok := object.Key("Sources") + if err := awsAwsjson11_serializeDocumentPatchSourceList(v.Sources, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentCalendarNameOrARNList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentCloudWatchOutputConfig(v *types.CloudWatchOutputConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchLogGroupName != nil { + ok := object.Key("CloudWatchLogGroupName") + ok.String(*v.CloudWatchLogGroupName) + } + + if v.CloudWatchOutputEnabled { + ok := object.Key("CloudWatchOutputEnabled") + ok.Boolean(v.CloudWatchOutputEnabled) + } + + return nil +} + +func awsAwsjson11_serializeDocumentCommandFilter(v *types.CommandFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentCommandFilterList(v []types.CommandFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentCommandFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentComplianceExecutionSummary(v *types.ComplianceExecutionSummary, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExecutionId != nil { + ok := object.Key("ExecutionId") + ok.String(*v.ExecutionId) + } + + if v.ExecutionTime != nil { + ok := object.Key("ExecutionTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ExecutionTime)) + } + + if v.ExecutionType != nil { + ok := object.Key("ExecutionType") + ok.String(*v.ExecutionType) + } + + return nil +} + +func awsAwsjson11_serializeDocumentComplianceItemDetails(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentComplianceItemEntry(v *types.ComplianceItemEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Details != nil { + ok := object.Key("Details") + if err := awsAwsjson11_serializeDocumentComplianceItemDetails(v.Details, ok); err != nil { + return err + } + } + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if len(v.Severity) > 0 { + ok := object.Key("Severity") + ok.String(string(v.Severity)) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) + } + + return nil +} + +func awsAwsjson11_serializeDocumentComplianceItemEntryList(v []types.ComplianceItemEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentComplianceItemEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentComplianceResourceIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentComplianceResourceTypeList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentComplianceStringFilter(v *types.ComplianceStringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentComplianceStringFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentComplianceStringFilterList(v []types.ComplianceStringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentComplianceStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentComplianceStringFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentCreateAssociationBatchRequestEntries(v []types.CreateAssociationBatchRequestEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentCreateAssociationBatchRequestEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentCreateAssociationBatchRequestEntry(v *types.CreateAssociationBatchRequestEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if v.ApplyOnlyAtCronInterval { + ok := object.Key("ApplyOnlyAtCronInterval") + ok.Boolean(v.ApplyOnlyAtCronInterval) + } + + if v.AssociationName != nil { + ok := object.Key("AssociationName") + ok.String(*v.AssociationName) + } + + if v.AutomationTargetParameterName != nil { + ok := object.Key("AutomationTargetParameterName") + ok.String(*v.AutomationTargetParameterName) + } + + if v.CalendarNames != nil { + ok := object.Key("CalendarNames") + if err := awsAwsjson11_serializeDocumentCalendarNameOrARNList(v.CalendarNames, ok); err != nil { + return err + } + } + + if len(v.ComplianceSeverity) > 0 { + ok := object.Key("ComplianceSeverity") + ok.String(string(v.ComplianceSeverity)) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Duration != nil { + ok := object.Key("Duration") + ok.Integer(*v.Duration) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.OutputLocation != nil { + ok := object.Key("OutputLocation") + if err := awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v.OutputLocation, ok); err != nil { + return err + } + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.ScheduleExpression != nil { + ok := object.Key("ScheduleExpression") + ok.String(*v.ScheduleExpression) + } + + if v.ScheduleOffset != nil { + ok := object.Key("ScheduleOffset") + ok.Integer(*v.ScheduleOffset) + } + + if len(v.SyncCompliance) > 0 { + ok := object.Key("SyncCompliance") + ok.String(string(v.SyncCompliance)) + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDescribeActivationsFilter(v *types.DescribeActivationsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FilterKey) > 0 { + ok := object.Key("FilterKey") + ok.String(string(v.FilterKey)) + } + + if v.FilterValues != nil { + ok := object.Key("FilterValues") + if err := awsAwsjson11_serializeDocumentStringList(v.FilterValues, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDescribeActivationsFilterList(v []types.DescribeActivationsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDescribeActivationsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDocumentFilter(v *types.DocumentFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDocumentFilterList(v []types.DocumentFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDocumentFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDocumentKeyValuesFilter(v *types.DocumentKeyValuesFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentDocumentKeyValuesFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDocumentKeyValuesFilterList(v []types.DocumentKeyValuesFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDocumentKeyValuesFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDocumentKeyValuesFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDocumentRequires(v *types.DocumentRequires, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.RequireType != nil { + ok := object.Key("RequireType") + ok.String(*v.RequireType) + } + + if v.Version != nil { + ok := object.Key("Version") + ok.String(*v.Version) + } + + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDocumentRequiresList(v []types.DocumentRequires, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDocumentRequires(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDocumentReviewCommentList(v []types.DocumentReviewCommentSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDocumentReviewCommentSource(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDocumentReviewCommentSource(v *types.DocumentReviewCommentSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDocumentReviews(v *types.DocumentReviews, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Action) > 0 { + ok := object.Key("Action") + ok.String(string(v.Action)) + } + + if v.Comment != nil { + ok := object.Key("Comment") + if err := awsAwsjson11_serializeDocumentDocumentReviewCommentList(v.Comment, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentExcludeAccounts(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentExecutionInputs(v types.ExecutionInputs, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ExecutionInputsMemberAutomation: + av := object.Key("Automation") + if err := awsAwsjson11_serializeDocumentAutomationExecutionInputs(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v *types.InstanceAssociationOutputLocation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Location != nil { + ok := object.Key("S3Location") + if err := awsAwsjson11_serializeDocumentS3OutputLocation(v.S3Location, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstanceIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInstanceInformationFilter(v *types.InstanceInformationFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.ValueSet != nil { + ok := object.Key("valueSet") + if err := awsAwsjson11_serializeDocumentInstanceInformationFilterValueSet(v.ValueSet, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstanceInformationFilterList(v []types.InstanceInformationFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstanceInformationFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInstanceInformationFilterValueSet(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInstanceInformationStringFilter(v *types.InstanceInformationStringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentInstanceInformationFilterValueSet(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstanceInformationStringFilterList(v []types.InstanceInformationStringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstanceInformationStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInstancePatchStateFilter(v *types.InstancePatchStateFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentInstancePatchStateFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstancePatchStateFilterList(v []types.InstancePatchStateFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstancePatchStateFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInstancePatchStateFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyFilter(v *types.InstancePropertyFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.ValueSet != nil { + ok := object.Key("valueSet") + if err := awsAwsjson11_serializeDocumentInstancePropertyFilterValueSet(v.ValueSet, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyFilterList(v []types.InstancePropertyFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstancePropertyFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyFilterValueSet(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyStringFilter(v *types.InstancePropertyStringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentInstancePropertyFilterValueSet(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyStringFilterList(v []types.InstancePropertyStringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstancePropertyStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryAggregator(v *types.InventoryAggregator, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentInventoryAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if v.Expression != nil { + ok := object.Key("Expression") + ok.String(*v.Expression) + } + + if v.Groups != nil { + ok := object.Key("Groups") + if err := awsAwsjson11_serializeDocumentInventoryGroupList(v.Groups, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInventoryAggregatorList(v []types.InventoryAggregator, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInventoryAggregator(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryFilter(v *types.InventoryFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentInventoryFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInventoryFilterList(v []types.InventoryFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInventoryFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryGroup(v *types.InventoryGroup, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentInventoryFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeDocumentInventoryGroupList(v []types.InventoryGroup, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInventoryGroup(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryItem(v *types.InventoryItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CaptureTime != nil { + ok := object.Key("CaptureTime") + ok.String(*v.CaptureTime) + } + + if v.Content != nil { + ok := object.Key("Content") + if err := awsAwsjson11_serializeDocumentInventoryItemEntryList(v.Content, ok); err != nil { + return err + } + } + + if v.ContentHash != nil { + ok := object.Key("ContentHash") + ok.String(*v.ContentHash) + } + + if v.Context != nil { + ok := object.Key("Context") + if err := awsAwsjson11_serializeDocumentInventoryItemContentContext(v.Context, ok); err != nil { + return err + } + } + + if v.SchemaVersion != nil { + ok := object.Key("SchemaVersion") + ok.String(*v.SchemaVersion) + } + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentInventoryItemContentContext(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryItemEntry(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryItemEntryList(v []map[string]string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentInventoryItemEntry(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInventoryItemList(v []types.InventoryItem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInventoryItem(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentKeyList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentLoggingInfo(v *types.LoggingInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3BucketName != nil { + ok := object.Key("S3BucketName") + ok.String(*v.S3BucketName) + } + + if v.S3KeyPrefix != nil { + ok := object.Key("S3KeyPrefix") + ok.String(*v.S3KeyPrefix) + } + + if v.S3Region != nil { + ok := object.Key("S3Region") + ok.String(*v.S3Region) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowAutomationParameters(v *types.MaintenanceWindowAutomationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowFilter(v *types.MaintenanceWindowFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v []types.MaintenanceWindowFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowLambdaParameters(v *types.MaintenanceWindowLambdaParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientContext != nil { + ok := object.Key("ClientContext") + ok.String(*v.ClientContext) + } + + if v.Payload != nil { + ok := object.Key("Payload") + ok.Base64EncodeBytes(v.Payload) + } + + if v.Qualifier != nil { + ok := object.Key("Qualifier") + ok.String(*v.Qualifier) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowRunCommandParameters(v *types.MaintenanceWindowRunCommandParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchOutputConfig != nil { + ok := object.Key("CloudWatchOutputConfig") + if err := awsAwsjson11_serializeDocumentCloudWatchOutputConfig(v.CloudWatchOutputConfig, ok); err != nil { + return err + } + } + + if v.Comment != nil { + ok := object.Key("Comment") + ok.String(*v.Comment) + } + + if v.DocumentHash != nil { + ok := object.Key("DocumentHash") + ok.String(*v.DocumentHash) + } + + if len(v.DocumentHashType) > 0 { + ok := object.Key("DocumentHashType") + ok.String(string(v.DocumentHashType)) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.NotificationConfig != nil { + ok := object.Key("NotificationConfig") + if err := awsAwsjson11_serializeDocumentNotificationConfig(v.NotificationConfig, ok); err != nil { + return err + } + } + + if v.OutputS3BucketName != nil { + ok := object.Key("OutputS3BucketName") + ok.String(*v.OutputS3BucketName) + } + + if v.OutputS3KeyPrefix != nil { + ok := object.Key("OutputS3KeyPrefix") + ok.String(*v.OutputS3KeyPrefix) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.ServiceRoleArn != nil { + ok := object.Key("ServiceRoleArn") + ok.String(*v.ServiceRoleArn) + } + + if v.TimeoutSeconds != nil { + ok := object.Key("TimeoutSeconds") + ok.Integer(*v.TimeoutSeconds) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowStepFunctionsParameters(v *types.MaintenanceWindowStepFunctionsParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Input != nil { + ok := object.Key("Input") + ok.String(*v.Input) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowTaskInvocationParameters(v *types.MaintenanceWindowTaskInvocationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Automation != nil { + ok := object.Key("Automation") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowAutomationParameters(v.Automation, ok); err != nil { + return err + } + } + + if v.Lambda != nil { + ok := object.Key("Lambda") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowLambdaParameters(v.Lambda, ok); err != nil { + return err + } + } + + if v.RunCommand != nil { + ok := object.Key("RunCommand") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowRunCommandParameters(v.RunCommand, ok); err != nil { + return err + } + } + + if v.StepFunctions != nil { + ok := object.Key("StepFunctions") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowStepFunctionsParameters(v.StepFunctions, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameters(v map[string]types.MaintenanceWindowTaskParameterValueExpression, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameterValueExpression(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameterValueExpression(v *types.MaintenanceWindowTaskParameterValueExpression, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentMetadataKeysToDeleteList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentMetadataMap(v map[string]types.MetadataValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsAwsjson11_serializeDocumentMetadataValue(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentMetadataValue(v *types.MetadataValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentNodeAggregator(v *types.NodeAggregator, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentNodeAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if len(v.AggregatorType) > 0 { + ok := object.Key("AggregatorType") + ok.String(string(v.AggregatorType)) + } + + if len(v.AttributeName) > 0 { + ok := object.Key("AttributeName") + ok.String(string(v.AttributeName)) + } + + if len(v.TypeName) > 0 { + ok := object.Key("TypeName") + ok.String(string(v.TypeName)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentNodeAggregatorList(v []types.NodeAggregator, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentNodeAggregator(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentNodeFilter(v *types.NodeFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentNodeFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentNodeFilterList(v []types.NodeFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentNodeFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentNodeFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentNotificationConfig(v *types.NotificationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NotificationArn != nil { + ok := object.Key("NotificationArn") + ok.String(*v.NotificationArn) + } + + if v.NotificationEvents != nil { + ok := object.Key("NotificationEvents") + if err := awsAwsjson11_serializeDocumentNotificationEventList(v.NotificationEvents, ok); err != nil { + return err + } + } + + if len(v.NotificationType) > 0 { + ok := object.Key("NotificationType") + ok.String(string(v.NotificationType)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentNotificationEventList(v []types.NotificationEvent, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsAggregator(v *types.OpsAggregator, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentOpsAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if v.AggregatorType != nil { + ok := object.Key("AggregatorType") + ok.String(*v.AggregatorType) + } + + if v.AttributeName != nil { + ok := object.Key("AttributeName") + ok.String(*v.AttributeName) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentOpsFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsAggregatorValueMap(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsAggregatorList(v []types.OpsAggregator, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsAggregator(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsAggregatorValueMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsFilter(v *types.OpsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsFilterList(v []types.OpsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemDataValue(v *types.OpsItemDataValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemEventFilter(v *types.OpsItemEventFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsItemEventFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemEventFilters(v []types.OpsItemEventFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsItemEventFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemEventFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemFilter(v *types.OpsItemFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsItemFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemFilters(v []types.OpsItemFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsItemFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemNotification(v *types.OpsItemNotification, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("Arn") + ok.String(*v.Arn) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemNotifications(v []types.OpsItemNotification, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsItemNotification(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemOperationalData(v map[string]types.OpsItemDataValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsAwsjson11_serializeDocumentOpsItemDataValue(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemOpsDataKeysList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilter(v *types.OpsItemRelatedItemsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilters(v []types.OpsItemRelatedItemsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsMetadataFilter(v *types.OpsMetadataFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsMetadataFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsMetadataFilterList(v []types.OpsMetadataFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsMetadataFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsMetadataFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsResultAttribute(v *types.OpsResultAttribute, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsResultAttributeList(v []types.OpsResultAttribute, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsResultAttribute(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentParameterLabelList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentParameterNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentParameters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentParameterValueList(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentParametersFilter(v *types.ParametersFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentParametersFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentParametersFilterList(v []types.ParametersFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentParametersFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentParametersFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentParameterStringFilter(v *types.ParameterStringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Option != nil { + ok := object.Key("Option") + ok.String(*v.Option) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentParameterStringFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentParameterStringFilterList(v []types.ParameterStringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentParameterStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentParameterStringFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentParameterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchFilter(v *types.PatchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentPatchFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPatchFilterGroup(v *types.PatchFilterGroup, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PatchFilters != nil { + ok := object.Key("PatchFilters") + if err := awsAwsjson11_serializeDocumentPatchFilterList(v.PatchFilters, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPatchFilterList(v []types.PatchFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPatchFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchOrchestratorFilter(v *types.PatchOrchestratorFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPatchOrchestratorFilterList(v []types.PatchOrchestratorFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchOrchestratorFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchRule(v *types.PatchRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApproveAfterDays != nil { + ok := object.Key("ApproveAfterDays") + ok.Integer(*v.ApproveAfterDays) + } + + if v.ApproveUntilDate != nil { + ok := object.Key("ApproveUntilDate") + ok.String(*v.ApproveUntilDate) + } + + if len(v.ComplianceLevel) > 0 { + ok := object.Key("ComplianceLevel") + ok.String(string(v.ComplianceLevel)) + } + + if v.EnableNonSecurity != nil { + ok := object.Key("EnableNonSecurity") + ok.Boolean(*v.EnableNonSecurity) + } + + if v.PatchFilterGroup != nil { + ok := object.Key("PatchFilterGroup") + if err := awsAwsjson11_serializeDocumentPatchFilterGroup(v.PatchFilterGroup, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPatchRuleGroup(v *types.PatchRuleGroup, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PatchRules != nil { + ok := object.Key("PatchRules") + if err := awsAwsjson11_serializeDocumentPatchRuleList(v.PatchRules, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPatchRuleList(v []types.PatchRule, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPatchRule(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchSource(v *types.PatchSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("Configuration") + ok.String(*v.Configuration) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Products != nil { + ok := object.Key("Products") + if err := awsAwsjson11_serializeDocumentPatchSourceProductList(v.Products, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPatchSourceList(v []types.PatchSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPatchSource(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentPatchSourceProductList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentRegions(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentRegistrationMetadataItem(v *types.RegistrationMetadataItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRegistrationMetadataList(v []types.RegistrationMetadataItem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRegistrationMetadataItem(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentRelatedOpsItem(v *types.RelatedOpsItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRelatedOpsItems(v []types.RelatedOpsItem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRelatedOpsItem(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncAwsOrganizationsSource(v *types.ResourceDataSyncAwsOrganizationsSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrganizationalUnits != nil { + ok := object.Key("OrganizationalUnits") + if err := awsAwsjson11_serializeDocumentResourceDataSyncOrganizationalUnitList(v.OrganizationalUnits, ok); err != nil { + return err + } + } + + if v.OrganizationSourceType != nil { + ok := object.Key("OrganizationSourceType") + ok.String(*v.OrganizationSourceType) + } + + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncDestinationDataSharing(v *types.ResourceDataSyncDestinationDataSharing, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationDataSharingType != nil { + ok := object.Key("DestinationDataSharingType") + ok.String(*v.DestinationDataSharingType) + } + + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncOrganizationalUnit(v *types.ResourceDataSyncOrganizationalUnit, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrganizationalUnitId != nil { + ok := object.Key("OrganizationalUnitId") + ok.String(*v.OrganizationalUnitId) + } + + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncOrganizationalUnitList(v []types.ResourceDataSyncOrganizationalUnit, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentResourceDataSyncOrganizationalUnit(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncS3Destination(v *types.ResourceDataSyncS3Destination, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AWSKMSKeyARN != nil { + ok := object.Key("AWSKMSKeyARN") + ok.String(*v.AWSKMSKeyARN) + } + + if v.BucketName != nil { + ok := object.Key("BucketName") + ok.String(*v.BucketName) + } + + if v.DestinationDataSharing != nil { + ok := object.Key("DestinationDataSharing") + if err := awsAwsjson11_serializeDocumentResourceDataSyncDestinationDataSharing(v.DestinationDataSharing, ok); err != nil { + return err + } + } + + if v.Prefix != nil { + ok := object.Key("Prefix") + ok.String(*v.Prefix) + } + + if v.Region != nil { + ok := object.Key("Region") + ok.String(*v.Region) + } + + if len(v.SyncFormat) > 0 { + ok := object.Key("SyncFormat") + ok.String(string(v.SyncFormat)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncSource(v *types.ResourceDataSyncSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AwsOrganizationsSource != nil { + ok := object.Key("AwsOrganizationsSource") + if err := awsAwsjson11_serializeDocumentResourceDataSyncAwsOrganizationsSource(v.AwsOrganizationsSource, ok); err != nil { + return err + } + } + + if v.EnableAllOpsDataSources { + ok := object.Key("EnableAllOpsDataSources") + ok.Boolean(v.EnableAllOpsDataSources) + } + + if v.IncludeFutureRegions { + ok := object.Key("IncludeFutureRegions") + ok.Boolean(v.IncludeFutureRegions) + } + + if v.SourceRegions != nil { + ok := object.Key("SourceRegions") + if err := awsAwsjson11_serializeDocumentResourceDataSyncSourceRegionList(v.SourceRegions, ok); err != nil { + return err + } + } + + if v.SourceType != nil { + ok := object.Key("SourceType") + ok.String(*v.SourceType) + } + + return nil +} + +func awsAwsjson11_serializeDocumentResourceDataSyncSourceRegionList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentResultAttribute(v *types.ResultAttribute, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentResultAttributeList(v []types.ResultAttribute, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentResultAttribute(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentRunbook(v *types.Runbook, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.TargetParameterName != nil { + ok := object.Key("TargetParameterName") + ok.String(*v.TargetParameterName) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentRunbooks(v []types.Runbook, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRunbook(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentS3OutputLocation(v *types.S3OutputLocation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OutputS3BucketName != nil { + ok := object.Key("OutputS3BucketName") + ok.String(*v.OutputS3BucketName) + } + + if v.OutputS3KeyPrefix != nil { + ok := object.Key("OutputS3KeyPrefix") + ok.String(*v.OutputS3KeyPrefix) + } + + if v.OutputS3Region != nil { + ok := object.Key("OutputS3Region") + ok.String(*v.OutputS3Region) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSessionFilter(v *types.SessionFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSessionFilterList(v []types.SessionFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentSessionFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentSessionManagerParameters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentSessionManagerParameterValueList(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentSessionManagerParameterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentStepExecutionFilter(v *types.StepExecutionFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentStepExecutionFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentStepExecutionFilterList(v []types.StepExecutionFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentStepExecutionFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentStepExecutionFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentStringList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTarget(v *types.Target, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentTargetValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Accounts != nil { + ok := object.Key("Accounts") + if err := awsAwsjson11_serializeDocumentAccounts(v.Accounts, ok); err != nil { + return err + } + } + + if v.ExcludeAccounts != nil { + ok := object.Key("ExcludeAccounts") + if err := awsAwsjson11_serializeDocumentExcludeAccounts(v.ExcludeAccounts, ok); err != nil { + return err + } + } + + if v.ExecutionRoleName != nil { + ok := object.Key("ExecutionRoleName") + ok.String(*v.ExecutionRoleName) + } + + if v.IncludeChildOrganizationUnits { + ok := object.Key("IncludeChildOrganizationUnits") + ok.Boolean(v.IncludeChildOrganizationUnits) + } + + if v.Regions != nil { + ok := object.Key("Regions") + if err := awsAwsjson11_serializeDocumentRegions(v.Regions, ok); err != nil { + return err + } + } + + if v.TargetLocationAlarmConfiguration != nil { + ok := object.Key("TargetLocationAlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.TargetLocationAlarmConfiguration, ok); err != nil { + return err + } + } + + if v.TargetLocationMaxConcurrency != nil { + ok := object.Key("TargetLocationMaxConcurrency") + ok.String(*v.TargetLocationMaxConcurrency) + } + + if v.TargetLocationMaxErrors != nil { + ok := object.Key("TargetLocationMaxErrors") + ok.String(*v.TargetLocationMaxErrors) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TargetsMaxConcurrency != nil { + ok := object.Key("TargetsMaxConcurrency") + ok.String(*v.TargetsMaxConcurrency) + } + + if v.TargetsMaxErrors != nil { + ok := object.Key("TargetsMaxErrors") + ok.String(*v.TargetsMaxErrors) + } + + return nil +} + +func awsAwsjson11_serializeDocumentTargetLocations(v []types.TargetLocation, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTargetLocation(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTargetMap(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentTargetMapValueList(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTargetMaps(v []map[string][]string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentTargetMap(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTargetMapValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTargets(v []types.Target, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTarget(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTargetValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeOpDocumentAddTagsToResourceInput(v *AddTagsToResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceId != nil { + ok := object.Key("ResourceId") + ok.String(*v.ResourceId) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentAssociateOpsItemRelatedItemInput(v *AssociateOpsItemRelatedItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationType != nil { + ok := object.Key("AssociationType") + ok.String(*v.AssociationType) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + if v.ResourceType != nil { + ok := object.Key("ResourceType") + ok.String(*v.ResourceType) + } + + if v.ResourceUri != nil { + ok := object.Key("ResourceUri") + ok.String(*v.ResourceUri) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCancelCommandInput(v *CancelCommandInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommandId != nil { + ok := object.Key("CommandId") + ok.String(*v.CommandId) + } + + if v.InstanceIds != nil { + ok := object.Key("InstanceIds") + if err := awsAwsjson11_serializeDocumentInstanceIdList(v.InstanceIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCancelMaintenanceWindowExecutionInput(v *CancelMaintenanceWindowExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowExecutionId != nil { + ok := object.Key("WindowExecutionId") + ok.String(*v.WindowExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateActivationInput(v *CreateActivationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultInstanceName != nil { + ok := object.Key("DefaultInstanceName") + ok.String(*v.DefaultInstanceName) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.ExpirationDate != nil { + ok := object.Key("ExpirationDate") + ok.Double(smithytime.FormatEpochSeconds(*v.ExpirationDate)) + } + + if v.IamRole != nil { + ok := object.Key("IamRole") + ok.String(*v.IamRole) + } + + if v.RegistrationLimit != nil { + ok := object.Key("RegistrationLimit") + ok.Integer(*v.RegistrationLimit) + } + + if v.RegistrationMetadata != nil { + ok := object.Key("RegistrationMetadata") + if err := awsAwsjson11_serializeDocumentRegistrationMetadataList(v.RegistrationMetadata, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateAssociationBatchInput(v *CreateAssociationBatchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationDispatchAssumeRole != nil { + ok := object.Key("AssociationDispatchAssumeRole") + ok.String(*v.AssociationDispatchAssumeRole) + } + + if v.Entries != nil { + ok := object.Key("Entries") + if err := awsAwsjson11_serializeDocumentCreateAssociationBatchRequestEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateAssociationInput(v *CreateAssociationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if v.ApplyOnlyAtCronInterval { + ok := object.Key("ApplyOnlyAtCronInterval") + ok.Boolean(v.ApplyOnlyAtCronInterval) + } + + if v.AssociationDispatchAssumeRole != nil { + ok := object.Key("AssociationDispatchAssumeRole") + ok.String(*v.AssociationDispatchAssumeRole) + } + + if v.AssociationName != nil { + ok := object.Key("AssociationName") + ok.String(*v.AssociationName) + } + + if v.AutomationTargetParameterName != nil { + ok := object.Key("AutomationTargetParameterName") + ok.String(*v.AutomationTargetParameterName) + } + + if v.CalendarNames != nil { + ok := object.Key("CalendarNames") + if err := awsAwsjson11_serializeDocumentCalendarNameOrARNList(v.CalendarNames, ok); err != nil { + return err + } + } + + if len(v.ComplianceSeverity) > 0 { + ok := object.Key("ComplianceSeverity") + ok.String(string(v.ComplianceSeverity)) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Duration != nil { + ok := object.Key("Duration") + ok.Integer(*v.Duration) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.OutputLocation != nil { + ok := object.Key("OutputLocation") + if err := awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v.OutputLocation, ok); err != nil { + return err + } + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.ScheduleExpression != nil { + ok := object.Key("ScheduleExpression") + ok.String(*v.ScheduleExpression) + } + + if v.ScheduleOffset != nil { + ok := object.Key("ScheduleOffset") + ok.Integer(*v.ScheduleOffset) + } + + if len(v.SyncCompliance) > 0 { + ok := object.Key("SyncCompliance") + ok.String(string(v.SyncCompliance)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateDocumentInput(v *CreateDocumentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Attachments != nil { + ok := object.Key("Attachments") + if err := awsAwsjson11_serializeDocumentAttachmentsSourceList(v.Attachments, ok); err != nil { + return err + } + } + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + + if len(v.DocumentFormat) > 0 { + ok := object.Key("DocumentFormat") + ok.String(string(v.DocumentFormat)) + } + + if len(v.DocumentType) > 0 { + ok := object.Key("DocumentType") + ok.String(string(v.DocumentType)) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Requires != nil { + ok := object.Key("Requires") + if err := awsAwsjson11_serializeDocumentDocumentRequiresList(v.Requires, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TargetType != nil { + ok := object.Key("TargetType") + ok.String(*v.TargetType) + } + + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateMaintenanceWindowInput(v *CreateMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("AllowUnassociatedTargets") + ok.Boolean(v.AllowUnassociatedTargets) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + { + ok := object.Key("Cutoff") + ok.Integer(v.Cutoff) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Duration != nil { + ok := object.Key("Duration") + ok.Integer(*v.Duration) + } + + if v.EndDate != nil { + ok := object.Key("EndDate") + ok.String(*v.EndDate) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Schedule != nil { + ok := object.Key("Schedule") + ok.String(*v.Schedule) + } + + if v.ScheduleOffset != nil { + ok := object.Key("ScheduleOffset") + ok.Integer(*v.ScheduleOffset) + } + + if v.ScheduleTimezone != nil { + ok := object.Key("ScheduleTimezone") + ok.String(*v.ScheduleTimezone) + } + + if v.StartDate != nil { + ok := object.Key("StartDate") + ok.String(*v.StartDate) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateOpsItemInput(v *CreateOpsItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + + if v.ActualEndTime != nil { + ok := object.Key("ActualEndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ActualEndTime)) + } + + if v.ActualStartTime != nil { + ok := object.Key("ActualStartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ActualStartTime)) + } + + if v.Category != nil { + ok := object.Key("Category") + ok.String(*v.Category) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Notifications != nil { + ok := object.Key("Notifications") + if err := awsAwsjson11_serializeDocumentOpsItemNotifications(v.Notifications, ok); err != nil { + return err + } + } + + if v.OperationalData != nil { + ok := object.Key("OperationalData") + if err := awsAwsjson11_serializeDocumentOpsItemOperationalData(v.OperationalData, ok); err != nil { + return err + } + } + + if v.OpsItemType != nil { + ok := object.Key("OpsItemType") + ok.String(*v.OpsItemType) + } + + if v.PlannedEndTime != nil { + ok := object.Key("PlannedEndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.PlannedEndTime)) + } + + if v.PlannedStartTime != nil { + ok := object.Key("PlannedStartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.PlannedStartTime)) + } + + if v.Priority != nil { + ok := object.Key("Priority") + ok.Integer(*v.Priority) + } + + if v.RelatedOpsItems != nil { + ok := object.Key("RelatedOpsItems") + if err := awsAwsjson11_serializeDocumentRelatedOpsItems(v.RelatedOpsItems, ok); err != nil { + return err + } + } + + if v.Severity != nil { + ok := object.Key("Severity") + ok.String(*v.Severity) + } + + if v.Source != nil { + ok := object.Key("Source") + ok.String(*v.Source) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateOpsMetadataInput(v *CreateOpsMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Metadata != nil { + ok := object.Key("Metadata") + if err := awsAwsjson11_serializeDocumentMetadataMap(v.Metadata, ok); err != nil { + return err + } + } + + if v.ResourceId != nil { + ok := object.Key("ResourceId") + ok.String(*v.ResourceId) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreatePatchBaselineInput(v *CreatePatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApprovalRules != nil { + ok := object.Key("ApprovalRules") + if err := awsAwsjson11_serializeDocumentPatchRuleGroup(v.ApprovalRules, ok); err != nil { + return err + } + } + + if v.ApprovedPatches != nil { + ok := object.Key("ApprovedPatches") + if err := awsAwsjson11_serializeDocumentPatchIdList(v.ApprovedPatches, ok); err != nil { + return err + } + } + + if len(v.ApprovedPatchesComplianceLevel) > 0 { + ok := object.Key("ApprovedPatchesComplianceLevel") + ok.String(string(v.ApprovedPatchesComplianceLevel)) + } + + if v.ApprovedPatchesEnableNonSecurity != nil { + ok := object.Key("ApprovedPatchesEnableNonSecurity") + ok.Boolean(*v.ApprovedPatchesEnableNonSecurity) + } + + if len(v.AvailableSecurityUpdatesComplianceStatus) > 0 { + ok := object.Key("AvailableSecurityUpdatesComplianceStatus") + ok.String(string(v.AvailableSecurityUpdatesComplianceStatus)) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.GlobalFilters != nil { + ok := object.Key("GlobalFilters") + if err := awsAwsjson11_serializeDocumentPatchFilterGroup(v.GlobalFilters, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.OperatingSystem) > 0 { + ok := object.Key("OperatingSystem") + ok.String(string(v.OperatingSystem)) + } + + if v.RejectedPatches != nil { + ok := object.Key("RejectedPatches") + if err := awsAwsjson11_serializeDocumentPatchIdList(v.RejectedPatches, ok); err != nil { + return err + } + } + + if len(v.RejectedPatchesAction) > 0 { + ok := object.Key("RejectedPatchesAction") + ok.String(string(v.RejectedPatchesAction)) + } + + if v.Sources != nil { + ok := object.Key("Sources") + if err := awsAwsjson11_serializeDocumentPatchSourceList(v.Sources, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateResourceDataSyncInput(v *CreateResourceDataSyncInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Destination != nil { + ok := object.Key("S3Destination") + if err := awsAwsjson11_serializeDocumentResourceDataSyncS3Destination(v.S3Destination, ok); err != nil { + return err + } + } + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + if v.SyncSource != nil { + ok := object.Key("SyncSource") + if err := awsAwsjson11_serializeDocumentResourceDataSyncSource(v.SyncSource, ok); err != nil { + return err + } + } + + if v.SyncType != nil { + ok := object.Key("SyncType") + ok.String(*v.SyncType) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteActivationInput(v *DeleteActivationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActivationId != nil { + ok := object.Key("ActivationId") + ok.String(*v.ActivationId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteAssociationInput(v *DeleteAssociationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDocumentInput(v *DeleteDocumentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Force { + ok := object.Key("Force") + ok.Boolean(v.Force) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteInventoryInput(v *DeleteInventoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.DryRun { + ok := object.Key("DryRun") + ok.Boolean(v.DryRun) + } + + if len(v.SchemaDeleteOption) > 0 { + ok := object.Key("SchemaDeleteOption") + ok.String(string(v.SchemaDeleteOption)) + } + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteMaintenanceWindowInput(v *DeleteMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteOpsItemInput(v *DeleteOpsItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteOpsMetadataInput(v *DeleteOpsMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OpsMetadataArn != nil { + ok := object.Key("OpsMetadataArn") + ok.String(*v.OpsMetadataArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteParameterInput(v *DeleteParameterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteParametersInput(v *DeleteParametersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Names != nil { + ok := object.Key("Names") + if err := awsAwsjson11_serializeDocumentParameterNameList(v.Names, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeletePatchBaselineInput(v *DeletePatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteResourceDataSyncInput(v *DeleteResourceDataSyncInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + if v.SyncType != nil { + ok := object.Key("SyncType") + ok.String(*v.SyncType) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolicyHash != nil { + ok := object.Key("PolicyHash") + ok.String(*v.PolicyHash) + } + + if v.PolicyId != nil { + ok := object.Key("PolicyId") + ok.String(*v.PolicyId) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeregisterManagedInstanceInput(v *DeregisterManagedInstanceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeregisterPatchBaselineForPatchGroupInput(v *DeregisterPatchBaselineForPatchGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + if v.PatchGroup != nil { + ok := object.Key("PatchGroup") + ok.String(*v.PatchGroup) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeregisterTargetFromMaintenanceWindowInput(v *DeregisterTargetFromMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Safe != nil { + ok := object.Key("Safe") + ok.Boolean(*v.Safe) + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + if v.WindowTargetId != nil { + ok := object.Key("WindowTargetId") + ok.String(*v.WindowTargetId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeregisterTaskFromMaintenanceWindowInput(v *DeregisterTaskFromMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + if v.WindowTaskId != nil { + ok := object.Key("WindowTaskId") + ok.String(*v.WindowTaskId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeActivationsInput(v *DescribeActivationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentDescribeActivationsFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAssociationExecutionsInput(v *DescribeAssociationExecutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentAssociationExecutionFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAssociationExecutionTargetsInput(v *DescribeAssociationExecutionTargetsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.ExecutionId != nil { + ok := object.Key("ExecutionId") + ok.String(*v.ExecutionId) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentAssociationExecutionTargetsFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAssociationInput(v *DescribeAssociationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.AssociationVersion != nil { + ok := object.Key("AssociationVersion") + ok.String(*v.AssociationVersion) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAutomationExecutionsInput(v *DescribeAutomationExecutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentAutomationExecutionFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAutomationStepExecutionsInput(v *DescribeAutomationStepExecutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutomationExecutionId != nil { + ok := object.Key("AutomationExecutionId") + ok.String(*v.AutomationExecutionId) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentStepExecutionFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ReverseOrder != nil { + ok := object.Key("ReverseOrder") + ok.Boolean(*v.ReverseOrder) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAvailablePatchesInput(v *DescribeAvailablePatchesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeDocumentInput(v *DescribeDocumentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeDocumentPermissionInput(v *DescribeDocumentPermissionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.PermissionType) > 0 { + ok := object.Key("PermissionType") + ok.String(string(v.PermissionType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeEffectiveInstanceAssociationsInput(v *DescribeEffectiveInstanceAssociationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeEffectivePatchesForPatchBaselineInput(v *DescribeEffectivePatchesForPatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInstanceAssociationsStatusInput(v *DescribeInstanceAssociationsStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInstanceInformationInput(v *DescribeInstanceInformationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentInstanceInformationStringFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.InstanceInformationFilterList != nil { + ok := object.Key("InstanceInformationFilterList") + if err := awsAwsjson11_serializeDocumentInstanceInformationFilterList(v.InstanceInformationFilterList, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInstancePatchesInput(v *DescribeInstancePatchesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInstancePatchStatesForPatchGroupInput(v *DescribeInstancePatchStatesForPatchGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentInstancePatchStateFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.PatchGroup != nil { + ok := object.Key("PatchGroup") + ok.String(*v.PatchGroup) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInstancePatchStatesInput(v *DescribeInstancePatchStatesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceIds != nil { + ok := object.Key("InstanceIds") + if err := awsAwsjson11_serializeDocumentInstanceIdList(v.InstanceIds, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInstancePropertiesInput(v *DescribeInstancePropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FiltersWithOperator != nil { + ok := object.Key("FiltersWithOperator") + if err := awsAwsjson11_serializeDocumentInstancePropertyStringFilterList(v.FiltersWithOperator, ok); err != nil { + return err + } + } + + if v.InstancePropertyFilterList != nil { + ok := object.Key("InstancePropertyFilterList") + if err := awsAwsjson11_serializeDocumentInstancePropertyFilterList(v.InstancePropertyFilterList, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeInventoryDeletionsInput(v *DescribeInventoryDeletionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeletionId != nil { + ok := object.Key("DeletionId") + ok.String(*v.DeletionId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowExecutionsInput(v *DescribeMaintenanceWindowExecutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowExecutionTaskInvocationsInput(v *DescribeMaintenanceWindowExecutionTaskInvocationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.TaskId != nil { + ok := object.Key("TaskId") + ok.String(*v.TaskId) + } + + if v.WindowExecutionId != nil { + ok := object.Key("WindowExecutionId") + ok.String(*v.WindowExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowExecutionTasksInput(v *DescribeMaintenanceWindowExecutionTasksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.WindowExecutionId != nil { + ok := object.Key("WindowExecutionId") + ok.String(*v.WindowExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowScheduleInput(v *DescribeMaintenanceWindowScheduleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowsForTargetInput(v *DescribeMaintenanceWindowsForTargetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowsInput(v *DescribeMaintenanceWindowsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowTargetsInput(v *DescribeMaintenanceWindowTargetsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMaintenanceWindowTasksInput(v *DescribeMaintenanceWindowTasksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeOpsItemsInput(v *DescribeOpsItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.OpsItemFilters != nil { + ok := object.Key("OpsItemFilters") + if err := awsAwsjson11_serializeDocumentOpsItemFilters(v.OpsItemFilters, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeParametersInput(v *DescribeParametersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentParametersFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ParameterFilters != nil { + ok := object.Key("ParameterFilters") + if err := awsAwsjson11_serializeDocumentParameterStringFilterList(v.ParameterFilters, ok); err != nil { + return err + } + } + + if v.Shared != nil { + ok := object.Key("Shared") + ok.Boolean(*v.Shared) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribePatchBaselinesInput(v *DescribePatchBaselinesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribePatchGroupsInput(v *DescribePatchGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentPatchOrchestratorFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribePatchGroupStateInput(v *DescribePatchGroupStateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PatchGroup != nil { + ok := object.Key("PatchGroup") + ok.String(*v.PatchGroup) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribePatchPropertiesInput(v *DescribePatchPropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.OperatingSystem) > 0 { + ok := object.Key("OperatingSystem") + ok.String(string(v.OperatingSystem)) + } + + if len(v.PatchSet) > 0 { + ok := object.Key("PatchSet") + ok.String(string(v.PatchSet)) + } + + if len(v.Property) > 0 { + ok := object.Key("Property") + ok.String(string(v.Property)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeSessionsInput(v *DescribeSessionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentSessionFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.State) > 0 { + ok := object.Key("State") + ok.String(string(v.State)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDisassociateOpsItemRelatedItemInput(v *DisassociateOpsItemRelatedItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetAccessTokenInput(v *GetAccessTokenInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessRequestId != nil { + ok := object.Key("AccessRequestId") + ok.String(*v.AccessRequestId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetAutomationExecutionInput(v *GetAutomationExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutomationExecutionId != nil { + ok := object.Key("AutomationExecutionId") + ok.String(*v.AutomationExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetCalendarStateInput(v *GetCalendarStateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AtTime != nil { + ok := object.Key("AtTime") + ok.String(*v.AtTime) + } + + if v.CalendarNames != nil { + ok := object.Key("CalendarNames") + if err := awsAwsjson11_serializeDocumentCalendarNameOrARNList(v.CalendarNames, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetCommandInvocationInput(v *GetCommandInvocationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommandId != nil { + ok := object.Key("CommandId") + ok.String(*v.CommandId) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.PluginName != nil { + ok := object.Key("PluginName") + ok.String(*v.PluginName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetConnectionStatusInput(v *GetConnectionStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Target != nil { + ok := object.Key("Target") + ok.String(*v.Target) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDefaultPatchBaselineInput(v *GetDefaultPatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.OperatingSystem) > 0 { + ok := object.Key("OperatingSystem") + ok.String(string(v.OperatingSystem)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDeployablePatchSnapshotForInstanceInput(v *GetDeployablePatchSnapshotForInstanceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineOverride != nil { + ok := object.Key("BaselineOverride") + if err := awsAwsjson11_serializeDocumentBaselineOverride(v.BaselineOverride, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.SnapshotId != nil { + ok := object.Key("SnapshotId") + ok.String(*v.SnapshotId) + } + + if v.UseS3DualStackEndpoint { + ok := object.Key("UseS3DualStackEndpoint") + ok.Boolean(v.UseS3DualStackEndpoint) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDocumentInput(v *GetDocumentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DocumentFormat) > 0 { + ok := object.Key("DocumentFormat") + ok.String(string(v.DocumentFormat)) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetExecutionPreviewInput(v *GetExecutionPreviewInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExecutionPreviewId != nil { + ok := object.Key("ExecutionPreviewId") + ok.String(*v.ExecutionPreviewId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetInventoryInput(v *GetInventoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentInventoryAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentInventoryFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResultAttributes != nil { + ok := object.Key("ResultAttributes") + if err := awsAwsjson11_serializeDocumentResultAttributeList(v.ResultAttributes, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetInventorySchemaInput(v *GetInventorySchemaInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregator { + ok := object.Key("Aggregator") + ok.Boolean(v.Aggregator) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SubType != nil { + ok := object.Key("SubType") + ok.Boolean(*v.SubType) + } + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetMaintenanceWindowExecutionInput(v *GetMaintenanceWindowExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowExecutionId != nil { + ok := object.Key("WindowExecutionId") + ok.String(*v.WindowExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetMaintenanceWindowExecutionTaskInput(v *GetMaintenanceWindowExecutionTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TaskId != nil { + ok := object.Key("TaskId") + ok.String(*v.TaskId) + } + + if v.WindowExecutionId != nil { + ok := object.Key("WindowExecutionId") + ok.String(*v.WindowExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationInput(v *GetMaintenanceWindowExecutionTaskInvocationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InvocationId != nil { + ok := object.Key("InvocationId") + ok.String(*v.InvocationId) + } + + if v.TaskId != nil { + ok := object.Key("TaskId") + ok.String(*v.TaskId) + } + + if v.WindowExecutionId != nil { + ok := object.Key("WindowExecutionId") + ok.String(*v.WindowExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetMaintenanceWindowInput(v *GetMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetMaintenanceWindowTaskInput(v *GetMaintenanceWindowTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + if v.WindowTaskId != nil { + ok := object.Key("WindowTaskId") + ok.String(*v.WindowTaskId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetOpsItemInput(v *GetOpsItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OpsItemArn != nil { + ok := object.Key("OpsItemArn") + ok.String(*v.OpsItemArn) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetOpsMetadataInput(v *GetOpsMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.OpsMetadataArn != nil { + ok := object.Key("OpsMetadataArn") + ok.String(*v.OpsMetadataArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetOpsSummaryInput(v *GetOpsSummaryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentOpsAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentOpsFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResultAttributes != nil { + ok := object.Key("ResultAttributes") + if err := awsAwsjson11_serializeDocumentOpsResultAttributeList(v.ResultAttributes, ok); err != nil { + return err + } + } + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetParameterHistoryInput(v *GetParameterHistoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.WithDecryption != nil { + ok := object.Key("WithDecryption") + ok.Boolean(*v.WithDecryption) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetParameterInput(v *GetParameterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.WithDecryption != nil { + ok := object.Key("WithDecryption") + ok.Boolean(*v.WithDecryption) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetParametersByPathInput(v *GetParametersByPathInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ParameterFilters != nil { + ok := object.Key("ParameterFilters") + if err := awsAwsjson11_serializeDocumentParameterStringFilterList(v.ParameterFilters, ok); err != nil { + return err + } + } + + if v.Path != nil { + ok := object.Key("Path") + ok.String(*v.Path) + } + + if v.Recursive != nil { + ok := object.Key("Recursive") + ok.Boolean(*v.Recursive) + } + + if v.WithDecryption != nil { + ok := object.Key("WithDecryption") + ok.Boolean(*v.WithDecryption) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetParametersInput(v *GetParametersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Names != nil { + ok := object.Key("Names") + if err := awsAwsjson11_serializeDocumentParameterNameList(v.Names, ok); err != nil { + return err + } + } + + if v.WithDecryption != nil { + ok := object.Key("WithDecryption") + ok.Boolean(*v.WithDecryption) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetPatchBaselineForPatchGroupInput(v *GetPatchBaselineForPatchGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.OperatingSystem) > 0 { + ok := object.Key("OperatingSystem") + ok.String(string(v.OperatingSystem)) + } + + if v.PatchGroup != nil { + ok := object.Key("PatchGroup") + ok.String(*v.PatchGroup) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetPatchBaselineInput(v *GetPatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetResourcePoliciesInput(v *GetResourcePoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetServiceSettingInput(v *GetServiceSettingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SettingId != nil { + ok := object.Key("SettingId") + ok.String(*v.SettingId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentLabelParameterVersionInput(v *LabelParameterVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Labels != nil { + ok := object.Key("Labels") + if err := awsAwsjson11_serializeDocumentParameterLabelList(v.Labels, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.ParameterVersion != nil { + ok := object.Key("ParameterVersion") + ok.Long(*v.ParameterVersion) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListAssociationsInput(v *ListAssociationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationFilterList != nil { + ok := object.Key("AssociationFilterList") + if err := awsAwsjson11_serializeDocumentAssociationFilterList(v.AssociationFilterList, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListAssociationVersionsInput(v *ListAssociationVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListCommandInvocationsInput(v *ListCommandInvocationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommandId != nil { + ok := object.Key("CommandId") + ok.String(*v.CommandId) + } + + if v.Details { + ok := object.Key("Details") + ok.Boolean(v.Details) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentCommandFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListCommandsInput(v *ListCommandsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommandId != nil { + ok := object.Key("CommandId") + ok.String(*v.CommandId) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentCommandFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListComplianceItemsInput(v *ListComplianceItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentComplianceStringFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceIds != nil { + ok := object.Key("ResourceIds") + if err := awsAwsjson11_serializeDocumentComplianceResourceIdList(v.ResourceIds, ok); err != nil { + return err + } + } + + if v.ResourceTypes != nil { + ok := object.Key("ResourceTypes") + if err := awsAwsjson11_serializeDocumentComplianceResourceTypeList(v.ResourceTypes, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListComplianceSummariesInput(v *ListComplianceSummariesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentComplianceStringFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListDocumentMetadataHistoryInput(v *ListDocumentMetadataHistoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if len(v.Metadata) > 0 { + ok := object.Key("Metadata") + ok.String(string(v.Metadata)) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListDocumentsInput(v *ListDocumentsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentFilterList != nil { + ok := object.Key("DocumentFilterList") + if err := awsAwsjson11_serializeDocumentDocumentFilterList(v.DocumentFilterList, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentDocumentKeyValuesFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListDocumentVersionsInput(v *ListDocumentVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListInventoryEntriesInput(v *ListInventoryEntriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentInventoryFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.TypeName != nil { + ok := object.Key("TypeName") + ok.String(*v.TypeName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListNodesInput(v *ListNodesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentNodeFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListNodesSummaryInput(v *ListNodesSummaryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentNodeAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentNodeFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListOpsItemEventsInput(v *ListOpsItemEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentOpsItemEventFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListOpsItemRelatedItemsInput(v *ListOpsItemRelatedItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListOpsMetadataInput(v *ListOpsMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentOpsMetadataFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListResourceComplianceSummariesInput(v *ListResourceComplianceSummariesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentComplianceStringFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListResourceDataSyncInput(v *ListResourceDataSyncInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SyncType != nil { + ok := object.Key("SyncType") + ok.String(*v.SyncType) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceId != nil { + ok := object.Key("ResourceId") + ok.String(*v.ResourceId) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentModifyDocumentPermissionInput(v *ModifyDocumentPermissionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIdsToAdd != nil { + ok := object.Key("AccountIdsToAdd") + if err := awsAwsjson11_serializeDocumentAccountIdList(v.AccountIdsToAdd, ok); err != nil { + return err + } + } + + if v.AccountIdsToRemove != nil { + ok := object.Key("AccountIdsToRemove") + if err := awsAwsjson11_serializeDocumentAccountIdList(v.AccountIdsToRemove, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.PermissionType) > 0 { + ok := object.Key("PermissionType") + ok.String(string(v.PermissionType)) + } + + if v.SharedDocumentVersion != nil { + ok := object.Key("SharedDocumentVersion") + ok.String(*v.SharedDocumentVersion) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutComplianceItemsInput(v *PutComplianceItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ComplianceType != nil { + ok := object.Key("ComplianceType") + ok.String(*v.ComplianceType) + } + + if v.ExecutionSummary != nil { + ok := object.Key("ExecutionSummary") + if err := awsAwsjson11_serializeDocumentComplianceExecutionSummary(v.ExecutionSummary, ok); err != nil { + return err + } + } + + if v.ItemContentHash != nil { + ok := object.Key("ItemContentHash") + ok.String(*v.ItemContentHash) + } + + if v.Items != nil { + ok := object.Key("Items") + if err := awsAwsjson11_serializeDocumentComplianceItemEntryList(v.Items, ok); err != nil { + return err + } + } + + if v.ResourceId != nil { + ok := object.Key("ResourceId") + ok.String(*v.ResourceId) + } + + if v.ResourceType != nil { + ok := object.Key("ResourceType") + ok.String(*v.ResourceType) + } + + if len(v.UploadType) > 0 { + ok := object.Key("UploadType") + ok.String(string(v.UploadType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutInventoryInput(v *PutInventoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.Items != nil { + ok := object.Key("Items") + if err := awsAwsjson11_serializeDocumentInventoryItemList(v.Items, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutParameterInput(v *PutParameterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedPattern != nil { + ok := object.Key("AllowedPattern") + ok.String(*v.AllowedPattern) + } + + if v.DataType != nil { + ok := object.Key("DataType") + ok.String(*v.DataType) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.KeyId != nil { + ok := object.Key("KeyId") + ok.String(*v.KeyId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Overwrite != nil { + ok := object.Key("Overwrite") + ok.Boolean(*v.Overwrite) + } + + if v.Policies != nil { + ok := object.Key("Policies") + ok.String(*v.Policies) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if len(v.Tier) > 0 { + ok := object.Key("Tier") + ok.String(string(v.Tier)) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Policy != nil { + ok := object.Key("Policy") + ok.String(*v.Policy) + } + + if v.PolicyHash != nil { + ok := object.Key("PolicyHash") + ok.String(*v.PolicyHash) + } + + if v.PolicyId != nil { + ok := object.Key("PolicyId") + ok.String(*v.PolicyId) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRegisterDefaultPatchBaselineInput(v *RegisterDefaultPatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRegisterPatchBaselineForPatchGroupInput(v *RegisterPatchBaselineForPatchGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + if v.PatchGroup != nil { + ok := object.Key("PatchGroup") + ok.String(*v.PatchGroup) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRegisterTargetWithMaintenanceWindowInput(v *RegisterTargetWithMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.OwnerInformation != nil { + ok := object.Key("OwnerInformation") + ok.String(*v.OwnerInformation) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRegisterTaskWithMaintenanceWindowInput(v *RegisterTaskWithMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if len(v.CutoffBehavior) > 0 { + ok := object.Key("CutoffBehavior") + ok.String(string(v.CutoffBehavior)) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.LoggingInfo != nil { + ok := object.Key("LoggingInfo") + if err := awsAwsjson11_serializeDocumentLoggingInfo(v.LoggingInfo, ok); err != nil { + return err + } + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Priority != nil { + ok := object.Key("Priority") + ok.Integer(*v.Priority) + } + + if v.ServiceRoleArn != nil { + ok := object.Key("ServiceRoleArn") + ok.String(*v.ServiceRoleArn) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TaskArn != nil { + ok := object.Key("TaskArn") + ok.String(*v.TaskArn) + } + + if v.TaskInvocationParameters != nil { + ok := object.Key("TaskInvocationParameters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowTaskInvocationParameters(v.TaskInvocationParameters, ok); err != nil { + return err + } + } + + if v.TaskParameters != nil { + ok := object.Key("TaskParameters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameters(v.TaskParameters, ok); err != nil { + return err + } + } + + if len(v.TaskType) > 0 { + ok := object.Key("TaskType") + ok.String(string(v.TaskType)) + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceId != nil { + ok := object.Key("ResourceId") + ok.String(*v.ResourceId) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.TagKeys != nil { + ok := object.Key("TagKeys") + if err := awsAwsjson11_serializeDocumentKeyList(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentResetServiceSettingInput(v *ResetServiceSettingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SettingId != nil { + ok := object.Key("SettingId") + ok.String(*v.SettingId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentResumeSessionInput(v *ResumeSessionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SessionId != nil { + ok := object.Key("SessionId") + ok.String(*v.SessionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentSendAutomationSignalInput(v *SendAutomationSignalInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutomationExecutionId != nil { + ok := object.Key("AutomationExecutionId") + ok.String(*v.AutomationExecutionId) + } + + if v.Payload != nil { + ok := object.Key("Payload") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Payload, ok); err != nil { + return err + } + } + + if len(v.SignalType) > 0 { + ok := object.Key("SignalType") + ok.String(string(v.SignalType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentSendCommandInput(v *SendCommandInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if v.CloudWatchOutputConfig != nil { + ok := object.Key("CloudWatchOutputConfig") + if err := awsAwsjson11_serializeDocumentCloudWatchOutputConfig(v.CloudWatchOutputConfig, ok); err != nil { + return err + } + } + + if v.Comment != nil { + ok := object.Key("Comment") + ok.String(*v.Comment) + } + + if v.DocumentHash != nil { + ok := object.Key("DocumentHash") + ok.String(*v.DocumentHash) + } + + if len(v.DocumentHashType) > 0 { + ok := object.Key("DocumentHashType") + ok.String(string(v.DocumentHashType)) + } + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.InstanceIds != nil { + ok := object.Key("InstanceIds") + if err := awsAwsjson11_serializeDocumentInstanceIdList(v.InstanceIds, ok); err != nil { + return err + } + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.NotificationConfig != nil { + ok := object.Key("NotificationConfig") + if err := awsAwsjson11_serializeDocumentNotificationConfig(v.NotificationConfig, ok); err != nil { + return err + } + } + + if v.OutputS3BucketName != nil { + ok := object.Key("OutputS3BucketName") + ok.String(*v.OutputS3BucketName) + } + + if v.OutputS3KeyPrefix != nil { + ok := object.Key("OutputS3KeyPrefix") + ok.String(*v.OutputS3KeyPrefix) + } + + if v.OutputS3Region != nil { + ok := object.Key("OutputS3Region") + ok.String(*v.OutputS3Region) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.ServiceRoleArn != nil { + ok := object.Key("ServiceRoleArn") + ok.String(*v.ServiceRoleArn) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TimeoutSeconds != nil { + ok := object.Key("TimeoutSeconds") + ok.Integer(*v.TimeoutSeconds) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartAccessRequestInput(v *StartAccessRequestInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Reason != nil { + ok := object.Key("Reason") + ok.String(*v.Reason) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartAssociationsOnceInput(v *StartAssociationsOnceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationIds != nil { + ok := object.Key("AssociationIds") + if err := awsAwsjson11_serializeDocumentAssociationIdList(v.AssociationIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartAutomationExecutionInput(v *StartAutomationExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if len(v.Mode) > 0 { + ok := object.Key("Mode") + ok.String(string(v.Mode)) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetLocationsURL != nil { + ok := object.Key("TargetLocationsURL") + ok.String(*v.TargetLocationsURL) + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.TargetParameterName != nil { + ok := object.Key("TargetParameterName") + ok.String(*v.TargetParameterName) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartChangeRequestExecutionInput(v *StartChangeRequestExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoApprove { + ok := object.Key("AutoApprove") + ok.Boolean(v.AutoApprove) + } + + if v.ChangeDetails != nil { + ok := object.Key("ChangeDetails") + ok.String(*v.ChangeDetails) + } + + if v.ChangeRequestName != nil { + ok := object.Key("ChangeRequestName") + ok.String(*v.ChangeRequestName) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + if v.Runbooks != nil { + ok := object.Key("Runbooks") + if err := awsAwsjson11_serializeDocumentRunbooks(v.Runbooks, ok); err != nil { + return err + } + } + + if v.ScheduledEndTime != nil { + ok := object.Key("ScheduledEndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ScheduledEndTime)) + } + + if v.ScheduledTime != nil { + ok := object.Key("ScheduledTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ScheduledTime)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartExecutionPreviewInput(v *StartExecutionPreviewInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.ExecutionInputs != nil { + ok := object.Key("ExecutionInputs") + if err := awsAwsjson11_serializeDocumentExecutionInputs(v.ExecutionInputs, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartSessionInput(v *StartSessionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentSessionManagerParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.Reason != nil { + ok := object.Key("Reason") + ok.String(*v.Reason) + } + + if v.Target != nil { + ok := object.Key("Target") + ok.String(*v.Target) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStopAutomationExecutionInput(v *StopAutomationExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutomationExecutionId != nil { + ok := object.Key("AutomationExecutionId") + ok.String(*v.AutomationExecutionId) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentTerminateSessionInput(v *TerminateSessionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SessionId != nil { + ok := object.Key("SessionId") + ok.String(*v.SessionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUnlabelParameterVersionInput(v *UnlabelParameterVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Labels != nil { + ok := object.Key("Labels") + if err := awsAwsjson11_serializeDocumentParameterLabelList(v.Labels, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.ParameterVersion != nil { + ok := object.Key("ParameterVersion") + ok.Long(*v.ParameterVersion) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateAssociationInput(v *UpdateAssociationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if v.ApplyOnlyAtCronInterval { + ok := object.Key("ApplyOnlyAtCronInterval") + ok.Boolean(v.ApplyOnlyAtCronInterval) + } + + if v.AssociationDispatchAssumeRole != nil { + ok := object.Key("AssociationDispatchAssumeRole") + ok.String(*v.AssociationDispatchAssumeRole) + } + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.AssociationName != nil { + ok := object.Key("AssociationName") + ok.String(*v.AssociationName) + } + + if v.AssociationVersion != nil { + ok := object.Key("AssociationVersion") + ok.String(*v.AssociationVersion) + } + + if v.AutomationTargetParameterName != nil { + ok := object.Key("AutomationTargetParameterName") + ok.String(*v.AutomationTargetParameterName) + } + + if v.CalendarNames != nil { + ok := object.Key("CalendarNames") + if err := awsAwsjson11_serializeDocumentCalendarNameOrARNList(v.CalendarNames, ok); err != nil { + return err + } + } + + if len(v.ComplianceSeverity) > 0 { + ok := object.Key("ComplianceSeverity") + ok.String(string(v.ComplianceSeverity)) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Duration != nil { + ok := object.Key("Duration") + ok.Integer(*v.Duration) + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.OutputLocation != nil { + ok := object.Key("OutputLocation") + if err := awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v.OutputLocation, ok); err != nil { + return err + } + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.ScheduleExpression != nil { + ok := object.Key("ScheduleExpression") + ok.String(*v.ScheduleExpression) + } + + if v.ScheduleOffset != nil { + ok := object.Key("ScheduleOffset") + ok.Integer(*v.ScheduleOffset) + } + + if len(v.SyncCompliance) > 0 { + ok := object.Key("SyncCompliance") + ok.String(string(v.SyncCompliance)) + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateAssociationStatusInput(v *UpdateAssociationStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationStatus != nil { + ok := object.Key("AssociationStatus") + if err := awsAwsjson11_serializeDocumentAssociationStatus(v.AssociationStatus, ok); err != nil { + return err + } + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateDocumentDefaultVersionInput(v *UpdateDocumentDefaultVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateDocumentInput(v *UpdateDocumentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Attachments != nil { + ok := object.Key("Attachments") + if err := awsAwsjson11_serializeDocumentAttachmentsSourceList(v.Attachments, ok); err != nil { + return err + } + } + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + + if len(v.DocumentFormat) > 0 { + ok := object.Key("DocumentFormat") + ok.String(string(v.DocumentFormat)) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.TargetType != nil { + ok := object.Key("TargetType") + ok.String(*v.TargetType) + } + + if v.VersionName != nil { + ok := object.Key("VersionName") + ok.String(*v.VersionName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateDocumentMetadataInput(v *UpdateDocumentMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentReviews != nil { + ok := object.Key("DocumentReviews") + if err := awsAwsjson11_serializeDocumentDocumentReviews(v.DocumentReviews, ok); err != nil { + return err + } + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateMaintenanceWindowInput(v *UpdateMaintenanceWindowInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowUnassociatedTargets != nil { + ok := object.Key("AllowUnassociatedTargets") + ok.Boolean(*v.AllowUnassociatedTargets) + } + + if v.Cutoff != nil { + ok := object.Key("Cutoff") + ok.Integer(*v.Cutoff) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Duration != nil { + ok := object.Key("Duration") + ok.Integer(*v.Duration) + } + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.EndDate != nil { + ok := object.Key("EndDate") + ok.String(*v.EndDate) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Replace != nil { + ok := object.Key("Replace") + ok.Boolean(*v.Replace) + } + + if v.Schedule != nil { + ok := object.Key("Schedule") + ok.String(*v.Schedule) + } + + if v.ScheduleOffset != nil { + ok := object.Key("ScheduleOffset") + ok.Integer(*v.ScheduleOffset) + } + + if v.ScheduleTimezone != nil { + ok := object.Key("ScheduleTimezone") + ok.String(*v.ScheduleTimezone) + } + + if v.StartDate != nil { + ok := object.Key("StartDate") + ok.String(*v.StartDate) + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateMaintenanceWindowTargetInput(v *UpdateMaintenanceWindowTargetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.OwnerInformation != nil { + ok := object.Key("OwnerInformation") + ok.String(*v.OwnerInformation) + } + + if v.Replace != nil { + ok := object.Key("Replace") + ok.Boolean(*v.Replace) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + if v.WindowTargetId != nil { + ok := object.Key("WindowTargetId") + ok.String(*v.WindowTargetId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateMaintenanceWindowTaskInput(v *UpdateMaintenanceWindowTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmConfiguration != nil { + ok := object.Key("AlarmConfiguration") + if err := awsAwsjson11_serializeDocumentAlarmConfiguration(v.AlarmConfiguration, ok); err != nil { + return err + } + } + + if len(v.CutoffBehavior) > 0 { + ok := object.Key("CutoffBehavior") + ok.String(string(v.CutoffBehavior)) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.LoggingInfo != nil { + ok := object.Key("LoggingInfo") + if err := awsAwsjson11_serializeDocumentLoggingInfo(v.LoggingInfo, ok); err != nil { + return err + } + } + + if v.MaxConcurrency != nil { + ok := object.Key("MaxConcurrency") + ok.String(*v.MaxConcurrency) + } + + if v.MaxErrors != nil { + ok := object.Key("MaxErrors") + ok.String(*v.MaxErrors) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Priority != nil { + ok := object.Key("Priority") + ok.Integer(*v.Priority) + } + + if v.Replace != nil { + ok := object.Key("Replace") + ok.Boolean(*v.Replace) + } + + if v.ServiceRoleArn != nil { + ok := object.Key("ServiceRoleArn") + ok.String(*v.ServiceRoleArn) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TaskArn != nil { + ok := object.Key("TaskArn") + ok.String(*v.TaskArn) + } + + if v.TaskInvocationParameters != nil { + ok := object.Key("TaskInvocationParameters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowTaskInvocationParameters(v.TaskInvocationParameters, ok); err != nil { + return err + } + } + + if v.TaskParameters != nil { + ok := object.Key("TaskParameters") + if err := awsAwsjson11_serializeDocumentMaintenanceWindowTaskParameters(v.TaskParameters, ok); err != nil { + return err + } + } + + if v.WindowId != nil { + ok := object.Key("WindowId") + ok.String(*v.WindowId) + } + + if v.WindowTaskId != nil { + ok := object.Key("WindowTaskId") + ok.String(*v.WindowTaskId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateManagedInstanceRoleInput(v *UpdateManagedInstanceRoleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IamRole != nil { + ok := object.Key("IamRole") + ok.String(*v.IamRole) + } + + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateOpsItemInput(v *UpdateOpsItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActualEndTime != nil { + ok := object.Key("ActualEndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ActualEndTime)) + } + + if v.ActualStartTime != nil { + ok := object.Key("ActualStartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.ActualStartTime)) + } + + if v.Category != nil { + ok := object.Key("Category") + ok.String(*v.Category) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Notifications != nil { + ok := object.Key("Notifications") + if err := awsAwsjson11_serializeDocumentOpsItemNotifications(v.Notifications, ok); err != nil { + return err + } + } + + if v.OperationalData != nil { + ok := object.Key("OperationalData") + if err := awsAwsjson11_serializeDocumentOpsItemOperationalData(v.OperationalData, ok); err != nil { + return err + } + } + + if v.OperationalDataToDelete != nil { + ok := object.Key("OperationalDataToDelete") + if err := awsAwsjson11_serializeDocumentOpsItemOpsDataKeysList(v.OperationalDataToDelete, ok); err != nil { + return err + } + } + + if v.OpsItemArn != nil { + ok := object.Key("OpsItemArn") + ok.String(*v.OpsItemArn) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + if v.PlannedEndTime != nil { + ok := object.Key("PlannedEndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.PlannedEndTime)) + } + + if v.PlannedStartTime != nil { + ok := object.Key("PlannedStartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.PlannedStartTime)) + } + + if v.Priority != nil { + ok := object.Key("Priority") + ok.Integer(*v.Priority) + } + + if v.RelatedOpsItems != nil { + ok := object.Key("RelatedOpsItems") + if err := awsAwsjson11_serializeDocumentRelatedOpsItems(v.RelatedOpsItems, ok); err != nil { + return err + } + } + + if v.Severity != nil { + ok := object.Key("Severity") + ok.String(*v.Severity) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + if v.Title != nil { + ok := object.Key("Title") + ok.String(*v.Title) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateOpsMetadataInput(v *UpdateOpsMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KeysToDelete != nil { + ok := object.Key("KeysToDelete") + if err := awsAwsjson11_serializeDocumentMetadataKeysToDeleteList(v.KeysToDelete, ok); err != nil { + return err + } + } + + if v.MetadataToUpdate != nil { + ok := object.Key("MetadataToUpdate") + if err := awsAwsjson11_serializeDocumentMetadataMap(v.MetadataToUpdate, ok); err != nil { + return err + } + } + + if v.OpsMetadataArn != nil { + ok := object.Key("OpsMetadataArn") + ok.String(*v.OpsMetadataArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdatePatchBaselineInput(v *UpdatePatchBaselineInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApprovalRules != nil { + ok := object.Key("ApprovalRules") + if err := awsAwsjson11_serializeDocumentPatchRuleGroup(v.ApprovalRules, ok); err != nil { + return err + } + } + + if v.ApprovedPatches != nil { + ok := object.Key("ApprovedPatches") + if err := awsAwsjson11_serializeDocumentPatchIdList(v.ApprovedPatches, ok); err != nil { + return err + } + } + + if len(v.ApprovedPatchesComplianceLevel) > 0 { + ok := object.Key("ApprovedPatchesComplianceLevel") + ok.String(string(v.ApprovedPatchesComplianceLevel)) + } + + if v.ApprovedPatchesEnableNonSecurity != nil { + ok := object.Key("ApprovedPatchesEnableNonSecurity") + ok.Boolean(*v.ApprovedPatchesEnableNonSecurity) + } + + if len(v.AvailableSecurityUpdatesComplianceStatus) > 0 { + ok := object.Key("AvailableSecurityUpdatesComplianceStatus") + ok.String(string(v.AvailableSecurityUpdatesComplianceStatus)) + } + + if v.BaselineId != nil { + ok := object.Key("BaselineId") + ok.String(*v.BaselineId) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.GlobalFilters != nil { + ok := object.Key("GlobalFilters") + if err := awsAwsjson11_serializeDocumentPatchFilterGroup(v.GlobalFilters, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.RejectedPatches != nil { + ok := object.Key("RejectedPatches") + if err := awsAwsjson11_serializeDocumentPatchIdList(v.RejectedPatches, ok); err != nil { + return err + } + } + + if len(v.RejectedPatchesAction) > 0 { + ok := object.Key("RejectedPatchesAction") + ok.String(string(v.RejectedPatchesAction)) + } + + if v.Replace != nil { + ok := object.Key("Replace") + ok.Boolean(*v.Replace) + } + + if v.Sources != nil { + ok := object.Key("Sources") + if err := awsAwsjson11_serializeDocumentPatchSourceList(v.Sources, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateResourceDataSyncInput(v *UpdateResourceDataSyncInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + if v.SyncSource != nil { + ok := object.Key("SyncSource") + if err := awsAwsjson11_serializeDocumentResourceDataSyncSource(v.SyncSource, ok); err != nil { + return err + } + } + + if v.SyncType != nil { + ok := object.Key("SyncType") + ok.String(*v.SyncType) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateServiceSettingInput(v *UpdateServiceSettingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SettingId != nil { + ok := object.Key("SettingId") + ok.String(*v.SettingId) + } + + if v.SettingValue != nil { + ok := object.Key("SettingValue") + ok.String(*v.SettingValue) + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go new file mode 100644 index 00000000000..69c17596dd2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go @@ -0,0 +1,2443 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AccessRequestStatus string + +// Enum values for AccessRequestStatus +const ( + AccessRequestStatusApproved AccessRequestStatus = "Approved" + AccessRequestStatusRejected AccessRequestStatus = "Rejected" + AccessRequestStatusRevoked AccessRequestStatus = "Revoked" + AccessRequestStatusExpired AccessRequestStatus = "Expired" + AccessRequestStatusPending AccessRequestStatus = "Pending" +) + +// Values returns all known values for AccessRequestStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AccessRequestStatus) Values() []AccessRequestStatus { + return []AccessRequestStatus{ + "Approved", + "Rejected", + "Revoked", + "Expired", + "Pending", + } +} + +type AccessType string + +// Enum values for AccessType +const ( + AccessTypeStandard AccessType = "Standard" + AccessTypeJustintime AccessType = "JustInTime" +) + +// Values returns all known values for AccessType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AccessType) Values() []AccessType { + return []AccessType{ + "Standard", + "JustInTime", + } +} + +type AssociationComplianceSeverity string + +// Enum values for AssociationComplianceSeverity +const ( + AssociationComplianceSeverityCritical AssociationComplianceSeverity = "CRITICAL" + AssociationComplianceSeverityHigh AssociationComplianceSeverity = "HIGH" + AssociationComplianceSeverityMedium AssociationComplianceSeverity = "MEDIUM" + AssociationComplianceSeverityLow AssociationComplianceSeverity = "LOW" + AssociationComplianceSeverityUnspecified AssociationComplianceSeverity = "UNSPECIFIED" +) + +// Values returns all known values for AssociationComplianceSeverity. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationComplianceSeverity) Values() []AssociationComplianceSeverity { + return []AssociationComplianceSeverity{ + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW", + "UNSPECIFIED", + } +} + +type AssociationExecutionFilterKey string + +// Enum values for AssociationExecutionFilterKey +const ( + AssociationExecutionFilterKeyExecutionId AssociationExecutionFilterKey = "ExecutionId" + AssociationExecutionFilterKeyStatus AssociationExecutionFilterKey = "Status" + AssociationExecutionFilterKeyCreatedTime AssociationExecutionFilterKey = "CreatedTime" +) + +// Values returns all known values for AssociationExecutionFilterKey. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationExecutionFilterKey) Values() []AssociationExecutionFilterKey { + return []AssociationExecutionFilterKey{ + "ExecutionId", + "Status", + "CreatedTime", + } +} + +type AssociationExecutionTargetsFilterKey string + +// Enum values for AssociationExecutionTargetsFilterKey +const ( + AssociationExecutionTargetsFilterKeyStatus AssociationExecutionTargetsFilterKey = "Status" + AssociationExecutionTargetsFilterKeyResourceId AssociationExecutionTargetsFilterKey = "ResourceId" + AssociationExecutionTargetsFilterKeyResourceType AssociationExecutionTargetsFilterKey = "ResourceType" +) + +// Values returns all known values for AssociationExecutionTargetsFilterKey. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationExecutionTargetsFilterKey) Values() []AssociationExecutionTargetsFilterKey { + return []AssociationExecutionTargetsFilterKey{ + "Status", + "ResourceId", + "ResourceType", + } +} + +type AssociationFilterKey string + +// Enum values for AssociationFilterKey +const ( + AssociationFilterKeyInstanceId AssociationFilterKey = "InstanceId" + AssociationFilterKeyName AssociationFilterKey = "Name" + AssociationFilterKeyAssociationId AssociationFilterKey = "AssociationId" + AssociationFilterKeyStatus AssociationFilterKey = "AssociationStatusName" + AssociationFilterKeyLastExecutedBefore AssociationFilterKey = "LastExecutedBefore" + AssociationFilterKeyLastExecutedAfter AssociationFilterKey = "LastExecutedAfter" + AssociationFilterKeyAssociationName AssociationFilterKey = "AssociationName" + AssociationFilterKeyResourceGroupName AssociationFilterKey = "ResourceGroupName" +) + +// Values returns all known values for AssociationFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationFilterKey) Values() []AssociationFilterKey { + return []AssociationFilterKey{ + "InstanceId", + "Name", + "AssociationId", + "AssociationStatusName", + "LastExecutedBefore", + "LastExecutedAfter", + "AssociationName", + "ResourceGroupName", + } +} + +type AssociationFilterOperatorType string + +// Enum values for AssociationFilterOperatorType +const ( + AssociationFilterOperatorTypeEqual AssociationFilterOperatorType = "EQUAL" + AssociationFilterOperatorTypeLessThan AssociationFilterOperatorType = "LESS_THAN" + AssociationFilterOperatorTypeGreaterThan AssociationFilterOperatorType = "GREATER_THAN" +) + +// Values returns all known values for AssociationFilterOperatorType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationFilterOperatorType) Values() []AssociationFilterOperatorType { + return []AssociationFilterOperatorType{ + "EQUAL", + "LESS_THAN", + "GREATER_THAN", + } +} + +type AssociationStatusName string + +// Enum values for AssociationStatusName +const ( + AssociationStatusNamePending AssociationStatusName = "Pending" + AssociationStatusNameSuccess AssociationStatusName = "Success" + AssociationStatusNameFailed AssociationStatusName = "Failed" +) + +// Values returns all known values for AssociationStatusName. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationStatusName) Values() []AssociationStatusName { + return []AssociationStatusName{ + "Pending", + "Success", + "Failed", + } +} + +type AssociationSyncCompliance string + +// Enum values for AssociationSyncCompliance +const ( + AssociationSyncComplianceAuto AssociationSyncCompliance = "AUTO" + AssociationSyncComplianceManual AssociationSyncCompliance = "MANUAL" +) + +// Values returns all known values for AssociationSyncCompliance. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssociationSyncCompliance) Values() []AssociationSyncCompliance { + return []AssociationSyncCompliance{ + "AUTO", + "MANUAL", + } +} + +type AttachmentHashType string + +// Enum values for AttachmentHashType +const ( + AttachmentHashTypeSha256 AttachmentHashType = "Sha256" +) + +// Values returns all known values for AttachmentHashType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AttachmentHashType) Values() []AttachmentHashType { + return []AttachmentHashType{ + "Sha256", + } +} + +type AttachmentsSourceKey string + +// Enum values for AttachmentsSourceKey +const ( + AttachmentsSourceKeySourceUrl AttachmentsSourceKey = "SourceUrl" + AttachmentsSourceKeyS3FileUrl AttachmentsSourceKey = "S3FileUrl" + AttachmentsSourceKeyAttachmentReference AttachmentsSourceKey = "AttachmentReference" +) + +// Values returns all known values for AttachmentsSourceKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AttachmentsSourceKey) Values() []AttachmentsSourceKey { + return []AttachmentsSourceKey{ + "SourceUrl", + "S3FileUrl", + "AttachmentReference", + } +} + +type AutomationExecutionFilterKey string + +// Enum values for AutomationExecutionFilterKey +const ( + AutomationExecutionFilterKeyDocumentNamePrefix AutomationExecutionFilterKey = "DocumentNamePrefix" + AutomationExecutionFilterKeyExecutionStatus AutomationExecutionFilterKey = "ExecutionStatus" + AutomationExecutionFilterKeyExecutionId AutomationExecutionFilterKey = "ExecutionId" + AutomationExecutionFilterKeyParentExecutionId AutomationExecutionFilterKey = "ParentExecutionId" + AutomationExecutionFilterKeyCurrentAction AutomationExecutionFilterKey = "CurrentAction" + AutomationExecutionFilterKeyStartTimeBefore AutomationExecutionFilterKey = "StartTimeBefore" + AutomationExecutionFilterKeyStartTimeAfter AutomationExecutionFilterKey = "StartTimeAfter" + AutomationExecutionFilterKeyAutomationType AutomationExecutionFilterKey = "AutomationType" + AutomationExecutionFilterKeyTagKey AutomationExecutionFilterKey = "TagKey" + AutomationExecutionFilterKeyTargetResourceGroup AutomationExecutionFilterKey = "TargetResourceGroup" + AutomationExecutionFilterKeyAutomationSubtype AutomationExecutionFilterKey = "AutomationSubtype" + AutomationExecutionFilterKeyOpsItemId AutomationExecutionFilterKey = "OpsItemId" +) + +// Values returns all known values for AutomationExecutionFilterKey. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutomationExecutionFilterKey) Values() []AutomationExecutionFilterKey { + return []AutomationExecutionFilterKey{ + "DocumentNamePrefix", + "ExecutionStatus", + "ExecutionId", + "ParentExecutionId", + "CurrentAction", + "StartTimeBefore", + "StartTimeAfter", + "AutomationType", + "TagKey", + "TargetResourceGroup", + "AutomationSubtype", + "OpsItemId", + } +} + +type AutomationExecutionStatus string + +// Enum values for AutomationExecutionStatus +const ( + AutomationExecutionStatusPending AutomationExecutionStatus = "Pending" + AutomationExecutionStatusInprogress AutomationExecutionStatus = "InProgress" + AutomationExecutionStatusWaiting AutomationExecutionStatus = "Waiting" + AutomationExecutionStatusSuccess AutomationExecutionStatus = "Success" + AutomationExecutionStatusTimedout AutomationExecutionStatus = "TimedOut" + AutomationExecutionStatusCancelling AutomationExecutionStatus = "Cancelling" + AutomationExecutionStatusCancelled AutomationExecutionStatus = "Cancelled" + AutomationExecutionStatusFailed AutomationExecutionStatus = "Failed" + AutomationExecutionStatusPendingApproval AutomationExecutionStatus = "PendingApproval" + AutomationExecutionStatusApproved AutomationExecutionStatus = "Approved" + AutomationExecutionStatusRejected AutomationExecutionStatus = "Rejected" + AutomationExecutionStatusScheduled AutomationExecutionStatus = "Scheduled" + AutomationExecutionStatusRunbookInprogress AutomationExecutionStatus = "RunbookInProgress" + AutomationExecutionStatusPendingChangeCalendarOverride AutomationExecutionStatus = "PendingChangeCalendarOverride" + AutomationExecutionStatusChangeCalendarOverrideApproved AutomationExecutionStatus = "ChangeCalendarOverrideApproved" + AutomationExecutionStatusChangeCalendarOverrideRejected AutomationExecutionStatus = "ChangeCalendarOverrideRejected" + AutomationExecutionStatusCompletedWithSuccess AutomationExecutionStatus = "CompletedWithSuccess" + AutomationExecutionStatusCompletedWithFailure AutomationExecutionStatus = "CompletedWithFailure" + AutomationExecutionStatusExited AutomationExecutionStatus = "Exited" +) + +// Values returns all known values for AutomationExecutionStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutomationExecutionStatus) Values() []AutomationExecutionStatus { + return []AutomationExecutionStatus{ + "Pending", + "InProgress", + "Waiting", + "Success", + "TimedOut", + "Cancelling", + "Cancelled", + "Failed", + "PendingApproval", + "Approved", + "Rejected", + "Scheduled", + "RunbookInProgress", + "PendingChangeCalendarOverride", + "ChangeCalendarOverrideApproved", + "ChangeCalendarOverrideRejected", + "CompletedWithSuccess", + "CompletedWithFailure", + "Exited", + } +} + +type AutomationSubtype string + +// Enum values for AutomationSubtype +const ( + AutomationSubtypeChangeRequest AutomationSubtype = "ChangeRequest" + AutomationSubtypeAccessRequest AutomationSubtype = "AccessRequest" +) + +// Values returns all known values for AutomationSubtype. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutomationSubtype) Values() []AutomationSubtype { + return []AutomationSubtype{ + "ChangeRequest", + "AccessRequest", + } +} + +type AutomationType string + +// Enum values for AutomationType +const ( + AutomationTypeCrossAccount AutomationType = "CrossAccount" + AutomationTypeLocal AutomationType = "Local" +) + +// Values returns all known values for AutomationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutomationType) Values() []AutomationType { + return []AutomationType{ + "CrossAccount", + "Local", + } +} + +type CalendarState string + +// Enum values for CalendarState +const ( + CalendarStateOpen CalendarState = "OPEN" + CalendarStateClosed CalendarState = "CLOSED" +) + +// Values returns all known values for CalendarState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CalendarState) Values() []CalendarState { + return []CalendarState{ + "OPEN", + "CLOSED", + } +} + +type CommandFilterKey string + +// Enum values for CommandFilterKey +const ( + CommandFilterKeyInvokedAfter CommandFilterKey = "InvokedAfter" + CommandFilterKeyInvokedBefore CommandFilterKey = "InvokedBefore" + CommandFilterKeyStatus CommandFilterKey = "Status" + CommandFilterKeyExecutionStage CommandFilterKey = "ExecutionStage" + CommandFilterKeyDocumentName CommandFilterKey = "DocumentName" +) + +// Values returns all known values for CommandFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CommandFilterKey) Values() []CommandFilterKey { + return []CommandFilterKey{ + "InvokedAfter", + "InvokedBefore", + "Status", + "ExecutionStage", + "DocumentName", + } +} + +type CommandInvocationStatus string + +// Enum values for CommandInvocationStatus +const ( + CommandInvocationStatusPending CommandInvocationStatus = "Pending" + CommandInvocationStatusInProgress CommandInvocationStatus = "InProgress" + CommandInvocationStatusDelayed CommandInvocationStatus = "Delayed" + CommandInvocationStatusSuccess CommandInvocationStatus = "Success" + CommandInvocationStatusCancelled CommandInvocationStatus = "Cancelled" + CommandInvocationStatusTimedOut CommandInvocationStatus = "TimedOut" + CommandInvocationStatusFailed CommandInvocationStatus = "Failed" + CommandInvocationStatusCancelling CommandInvocationStatus = "Cancelling" +) + +// Values returns all known values for CommandInvocationStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CommandInvocationStatus) Values() []CommandInvocationStatus { + return []CommandInvocationStatus{ + "Pending", + "InProgress", + "Delayed", + "Success", + "Cancelled", + "TimedOut", + "Failed", + "Cancelling", + } +} + +type CommandPluginStatus string + +// Enum values for CommandPluginStatus +const ( + CommandPluginStatusPending CommandPluginStatus = "Pending" + CommandPluginStatusInProgress CommandPluginStatus = "InProgress" + CommandPluginStatusSuccess CommandPluginStatus = "Success" + CommandPluginStatusTimedOut CommandPluginStatus = "TimedOut" + CommandPluginStatusCancelled CommandPluginStatus = "Cancelled" + CommandPluginStatusFailed CommandPluginStatus = "Failed" +) + +// Values returns all known values for CommandPluginStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CommandPluginStatus) Values() []CommandPluginStatus { + return []CommandPluginStatus{ + "Pending", + "InProgress", + "Success", + "TimedOut", + "Cancelled", + "Failed", + } +} + +type CommandStatus string + +// Enum values for CommandStatus +const ( + CommandStatusPending CommandStatus = "Pending" + CommandStatusInProgress CommandStatus = "InProgress" + CommandStatusSuccess CommandStatus = "Success" + CommandStatusCancelled CommandStatus = "Cancelled" + CommandStatusFailed CommandStatus = "Failed" + CommandStatusTimedOut CommandStatus = "TimedOut" + CommandStatusCancelling CommandStatus = "Cancelling" +) + +// Values returns all known values for CommandStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CommandStatus) Values() []CommandStatus { + return []CommandStatus{ + "Pending", + "InProgress", + "Success", + "Cancelled", + "Failed", + "TimedOut", + "Cancelling", + } +} + +type ComplianceQueryOperatorType string + +// Enum values for ComplianceQueryOperatorType +const ( + ComplianceQueryOperatorTypeEqual ComplianceQueryOperatorType = "EQUAL" + ComplianceQueryOperatorTypeNotEqual ComplianceQueryOperatorType = "NOT_EQUAL" + ComplianceQueryOperatorTypeBeginWith ComplianceQueryOperatorType = "BEGIN_WITH" + ComplianceQueryOperatorTypeLessThan ComplianceQueryOperatorType = "LESS_THAN" + ComplianceQueryOperatorTypeGreaterThan ComplianceQueryOperatorType = "GREATER_THAN" +) + +// Values returns all known values for ComplianceQueryOperatorType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ComplianceQueryOperatorType) Values() []ComplianceQueryOperatorType { + return []ComplianceQueryOperatorType{ + "EQUAL", + "NOT_EQUAL", + "BEGIN_WITH", + "LESS_THAN", + "GREATER_THAN", + } +} + +type ComplianceSeverity string + +// Enum values for ComplianceSeverity +const ( + ComplianceSeverityCritical ComplianceSeverity = "CRITICAL" + ComplianceSeverityHigh ComplianceSeverity = "HIGH" + ComplianceSeverityMedium ComplianceSeverity = "MEDIUM" + ComplianceSeverityLow ComplianceSeverity = "LOW" + ComplianceSeverityInformational ComplianceSeverity = "INFORMATIONAL" + ComplianceSeverityUnspecified ComplianceSeverity = "UNSPECIFIED" +) + +// Values returns all known values for ComplianceSeverity. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ComplianceSeverity) Values() []ComplianceSeverity { + return []ComplianceSeverity{ + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW", + "INFORMATIONAL", + "UNSPECIFIED", + } +} + +type ComplianceStatus string + +// Enum values for ComplianceStatus +const ( + ComplianceStatusCompliant ComplianceStatus = "COMPLIANT" + ComplianceStatusNonCompliant ComplianceStatus = "NON_COMPLIANT" +) + +// Values returns all known values for ComplianceStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ComplianceStatus) Values() []ComplianceStatus { + return []ComplianceStatus{ + "COMPLIANT", + "NON_COMPLIANT", + } +} + +type ComplianceUploadType string + +// Enum values for ComplianceUploadType +const ( + ComplianceUploadTypeComplete ComplianceUploadType = "COMPLETE" + ComplianceUploadTypePartial ComplianceUploadType = "PARTIAL" +) + +// Values returns all known values for ComplianceUploadType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ComplianceUploadType) Values() []ComplianceUploadType { + return []ComplianceUploadType{ + "COMPLETE", + "PARTIAL", + } +} + +type ConnectionStatus string + +// Enum values for ConnectionStatus +const ( + ConnectionStatusConnected ConnectionStatus = "connected" + ConnectionStatusNotConnected ConnectionStatus = "notconnected" +) + +// Values returns all known values for ConnectionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ConnectionStatus) Values() []ConnectionStatus { + return []ConnectionStatus{ + "connected", + "notconnected", + } +} + +type DescribeActivationsFilterKeys string + +// Enum values for DescribeActivationsFilterKeys +const ( + DescribeActivationsFilterKeysActivationIds DescribeActivationsFilterKeys = "ActivationIds" + DescribeActivationsFilterKeysDefaultInstanceName DescribeActivationsFilterKeys = "DefaultInstanceName" + DescribeActivationsFilterKeysIamRole DescribeActivationsFilterKeys = "IamRole" +) + +// Values returns all known values for DescribeActivationsFilterKeys. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DescribeActivationsFilterKeys) Values() []DescribeActivationsFilterKeys { + return []DescribeActivationsFilterKeys{ + "ActivationIds", + "DefaultInstanceName", + "IamRole", + } +} + +type DocumentFilterKey string + +// Enum values for DocumentFilterKey +const ( + DocumentFilterKeyName DocumentFilterKey = "Name" + DocumentFilterKeyOwner DocumentFilterKey = "Owner" + DocumentFilterKeyPlatformTypes DocumentFilterKey = "PlatformTypes" + DocumentFilterKeyDocumentType DocumentFilterKey = "DocumentType" +) + +// Values returns all known values for DocumentFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentFilterKey) Values() []DocumentFilterKey { + return []DocumentFilterKey{ + "Name", + "Owner", + "PlatformTypes", + "DocumentType", + } +} + +type DocumentFormat string + +// Enum values for DocumentFormat +const ( + DocumentFormatYaml DocumentFormat = "YAML" + DocumentFormatJson DocumentFormat = "JSON" + DocumentFormatText DocumentFormat = "TEXT" +) + +// Values returns all known values for DocumentFormat. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentFormat) Values() []DocumentFormat { + return []DocumentFormat{ + "YAML", + "JSON", + "TEXT", + } +} + +type DocumentHashType string + +// Enum values for DocumentHashType +const ( + DocumentHashTypeSha256 DocumentHashType = "Sha256" + DocumentHashTypeSha1 DocumentHashType = "Sha1" +) + +// Values returns all known values for DocumentHashType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentHashType) Values() []DocumentHashType { + return []DocumentHashType{ + "Sha256", + "Sha1", + } +} + +type DocumentMetadataEnum string + +// Enum values for DocumentMetadataEnum +const ( + DocumentMetadataEnumDocumentReviews DocumentMetadataEnum = "DocumentReviews" +) + +// Values returns all known values for DocumentMetadataEnum. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentMetadataEnum) Values() []DocumentMetadataEnum { + return []DocumentMetadataEnum{ + "DocumentReviews", + } +} + +type DocumentParameterType string + +// Enum values for DocumentParameterType +const ( + DocumentParameterTypeString DocumentParameterType = "String" + DocumentParameterTypeStringList DocumentParameterType = "StringList" +) + +// Values returns all known values for DocumentParameterType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentParameterType) Values() []DocumentParameterType { + return []DocumentParameterType{ + "String", + "StringList", + } +} + +type DocumentPermissionType string + +// Enum values for DocumentPermissionType +const ( + DocumentPermissionTypeShare DocumentPermissionType = "Share" +) + +// Values returns all known values for DocumentPermissionType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentPermissionType) Values() []DocumentPermissionType { + return []DocumentPermissionType{ + "Share", + } +} + +type DocumentReviewAction string + +// Enum values for DocumentReviewAction +const ( + DocumentReviewActionSendForReview DocumentReviewAction = "SendForReview" + DocumentReviewActionUpdateReview DocumentReviewAction = "UpdateReview" + DocumentReviewActionApprove DocumentReviewAction = "Approve" + DocumentReviewActionReject DocumentReviewAction = "Reject" +) + +// Values returns all known values for DocumentReviewAction. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentReviewAction) Values() []DocumentReviewAction { + return []DocumentReviewAction{ + "SendForReview", + "UpdateReview", + "Approve", + "Reject", + } +} + +type DocumentReviewCommentType string + +// Enum values for DocumentReviewCommentType +const ( + DocumentReviewCommentTypeComment DocumentReviewCommentType = "Comment" +) + +// Values returns all known values for DocumentReviewCommentType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentReviewCommentType) Values() []DocumentReviewCommentType { + return []DocumentReviewCommentType{ + "Comment", + } +} + +type DocumentStatus string + +// Enum values for DocumentStatus +const ( + DocumentStatusCreating DocumentStatus = "Creating" + DocumentStatusActive DocumentStatus = "Active" + DocumentStatusUpdating DocumentStatus = "Updating" + DocumentStatusDeleting DocumentStatus = "Deleting" + DocumentStatusFailed DocumentStatus = "Failed" +) + +// Values returns all known values for DocumentStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentStatus) Values() []DocumentStatus { + return []DocumentStatus{ + "Creating", + "Active", + "Updating", + "Deleting", + "Failed", + } +} + +type DocumentType string + +// Enum values for DocumentType +const ( + DocumentTypeCommand DocumentType = "Command" + DocumentTypePolicy DocumentType = "Policy" + DocumentTypeAutomation DocumentType = "Automation" + DocumentTypeSession DocumentType = "Session" + DocumentTypePackage DocumentType = "Package" + DocumentTypeApplicationConfiguration DocumentType = "ApplicationConfiguration" + DocumentTypeApplicationConfigurationSchema DocumentType = "ApplicationConfigurationSchema" + DocumentTypeDeploymentStrategy DocumentType = "DeploymentStrategy" + DocumentTypeChangeCalendar DocumentType = "ChangeCalendar" + DocumentTypeChangeTemplate DocumentType = "Automation.ChangeTemplate" + DocumentTypeProblemAnalysis DocumentType = "ProblemAnalysis" + DocumentTypeProblemAnalysisTemplate DocumentType = "ProblemAnalysisTemplate" + DocumentTypeCloudFormation DocumentType = "CloudFormation" + DocumentTypeConformancePackTemplate DocumentType = "ConformancePackTemplate" + DocumentTypeQuickSetup DocumentType = "QuickSetup" + DocumentTypeManualApprovalPolicy DocumentType = "ManualApprovalPolicy" + DocumentTypeAutoApprovalPolicy DocumentType = "AutoApprovalPolicy" +) + +// Values returns all known values for DocumentType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DocumentType) Values() []DocumentType { + return []DocumentType{ + "Command", + "Policy", + "Automation", + "Session", + "Package", + "ApplicationConfiguration", + "ApplicationConfigurationSchema", + "DeploymentStrategy", + "ChangeCalendar", + "Automation.ChangeTemplate", + "ProblemAnalysis", + "ProblemAnalysisTemplate", + "CloudFormation", + "ConformancePackTemplate", + "QuickSetup", + "ManualApprovalPolicy", + "AutoApprovalPolicy", + } +} + +type ExecutionMode string + +// Enum values for ExecutionMode +const ( + ExecutionModeAuto ExecutionMode = "Auto" + ExecutionModeInteractive ExecutionMode = "Interactive" +) + +// Values returns all known values for ExecutionMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExecutionMode) Values() []ExecutionMode { + return []ExecutionMode{ + "Auto", + "Interactive", + } +} + +type ExecutionPreviewStatus string + +// Enum values for ExecutionPreviewStatus +const ( + ExecutionPreviewStatusPending ExecutionPreviewStatus = "Pending" + ExecutionPreviewStatusInProgress ExecutionPreviewStatus = "InProgress" + ExecutionPreviewStatusSuccess ExecutionPreviewStatus = "Success" + ExecutionPreviewStatusFailed ExecutionPreviewStatus = "Failed" +) + +// Values returns all known values for ExecutionPreviewStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExecutionPreviewStatus) Values() []ExecutionPreviewStatus { + return []ExecutionPreviewStatus{ + "Pending", + "InProgress", + "Success", + "Failed", + } +} + +type ExternalAlarmState string + +// Enum values for ExternalAlarmState +const ( + ExternalAlarmStateUnknown ExternalAlarmState = "UNKNOWN" + ExternalAlarmStateAlarm ExternalAlarmState = "ALARM" +) + +// Values returns all known values for ExternalAlarmState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExternalAlarmState) Values() []ExternalAlarmState { + return []ExternalAlarmState{ + "UNKNOWN", + "ALARM", + } +} + +type Fault string + +// Enum values for Fault +const ( + FaultClient Fault = "Client" + FaultServer Fault = "Server" + FaultUnknown Fault = "Unknown" +) + +// Values returns all known values for Fault. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Fault) Values() []Fault { + return []Fault{ + "Client", + "Server", + "Unknown", + } +} + +type ImpactType string + +// Enum values for ImpactType +const ( + ImpactTypeMutating ImpactType = "Mutating" + ImpactTypeNonMutating ImpactType = "NonMutating" + ImpactTypeUndetermined ImpactType = "Undetermined" +) + +// Values returns all known values for ImpactType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ImpactType) Values() []ImpactType { + return []ImpactType{ + "Mutating", + "NonMutating", + "Undetermined", + } +} + +type InstanceInformationFilterKey string + +// Enum values for InstanceInformationFilterKey +const ( + InstanceInformationFilterKeyInstanceIds InstanceInformationFilterKey = "InstanceIds" + InstanceInformationFilterKeyAgentVersion InstanceInformationFilterKey = "AgentVersion" + InstanceInformationFilterKeyPingStatus InstanceInformationFilterKey = "PingStatus" + InstanceInformationFilterKeyPlatformTypes InstanceInformationFilterKey = "PlatformTypes" + InstanceInformationFilterKeyActivationIds InstanceInformationFilterKey = "ActivationIds" + InstanceInformationFilterKeyIamRole InstanceInformationFilterKey = "IamRole" + InstanceInformationFilterKeyResourceType InstanceInformationFilterKey = "ResourceType" + InstanceInformationFilterKeyAssociationStatus InstanceInformationFilterKey = "AssociationStatus" +) + +// Values returns all known values for InstanceInformationFilterKey. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InstanceInformationFilterKey) Values() []InstanceInformationFilterKey { + return []InstanceInformationFilterKey{ + "InstanceIds", + "AgentVersion", + "PingStatus", + "PlatformTypes", + "ActivationIds", + "IamRole", + "ResourceType", + "AssociationStatus", + } +} + +type InstancePatchStateOperatorType string + +// Enum values for InstancePatchStateOperatorType +const ( + InstancePatchStateOperatorTypeEqual InstancePatchStateOperatorType = "Equal" + InstancePatchStateOperatorTypeNotEqual InstancePatchStateOperatorType = "NotEqual" + InstancePatchStateOperatorTypeLessThan InstancePatchStateOperatorType = "LessThan" + InstancePatchStateOperatorTypeGreaterThan InstancePatchStateOperatorType = "GreaterThan" +) + +// Values returns all known values for InstancePatchStateOperatorType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InstancePatchStateOperatorType) Values() []InstancePatchStateOperatorType { + return []InstancePatchStateOperatorType{ + "Equal", + "NotEqual", + "LessThan", + "GreaterThan", + } +} + +type InstancePropertyFilterKey string + +// Enum values for InstancePropertyFilterKey +const ( + InstancePropertyFilterKeyInstanceIds InstancePropertyFilterKey = "InstanceIds" + InstancePropertyFilterKeyAgentVersion InstancePropertyFilterKey = "AgentVersion" + InstancePropertyFilterKeyPingStatus InstancePropertyFilterKey = "PingStatus" + InstancePropertyFilterKeyPlatformTypes InstancePropertyFilterKey = "PlatformTypes" + InstancePropertyFilterKeyDocumentName InstancePropertyFilterKey = "DocumentName" + InstancePropertyFilterKeyActivationIds InstancePropertyFilterKey = "ActivationIds" + InstancePropertyFilterKeyIamRole InstancePropertyFilterKey = "IamRole" + InstancePropertyFilterKeyResourceType InstancePropertyFilterKey = "ResourceType" + InstancePropertyFilterKeyAssociationStatus InstancePropertyFilterKey = "AssociationStatus" +) + +// Values returns all known values for InstancePropertyFilterKey. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InstancePropertyFilterKey) Values() []InstancePropertyFilterKey { + return []InstancePropertyFilterKey{ + "InstanceIds", + "AgentVersion", + "PingStatus", + "PlatformTypes", + "DocumentName", + "ActivationIds", + "IamRole", + "ResourceType", + "AssociationStatus", + } +} + +type InstancePropertyFilterOperator string + +// Enum values for InstancePropertyFilterOperator +const ( + InstancePropertyFilterOperatorEqual InstancePropertyFilterOperator = "Equal" + InstancePropertyFilterOperatorNotEqual InstancePropertyFilterOperator = "NotEqual" + InstancePropertyFilterOperatorBeginWith InstancePropertyFilterOperator = "BeginWith" + InstancePropertyFilterOperatorLessThan InstancePropertyFilterOperator = "LessThan" + InstancePropertyFilterOperatorGreaterThan InstancePropertyFilterOperator = "GreaterThan" +) + +// Values returns all known values for InstancePropertyFilterOperator. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InstancePropertyFilterOperator) Values() []InstancePropertyFilterOperator { + return []InstancePropertyFilterOperator{ + "Equal", + "NotEqual", + "BeginWith", + "LessThan", + "GreaterThan", + } +} + +type InventoryAttributeDataType string + +// Enum values for InventoryAttributeDataType +const ( + InventoryAttributeDataTypeString InventoryAttributeDataType = "string" + InventoryAttributeDataTypeNumber InventoryAttributeDataType = "number" +) + +// Values returns all known values for InventoryAttributeDataType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InventoryAttributeDataType) Values() []InventoryAttributeDataType { + return []InventoryAttributeDataType{ + "string", + "number", + } +} + +type InventoryDeletionStatus string + +// Enum values for InventoryDeletionStatus +const ( + InventoryDeletionStatusInProgress InventoryDeletionStatus = "InProgress" + InventoryDeletionStatusComplete InventoryDeletionStatus = "Complete" +) + +// Values returns all known values for InventoryDeletionStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InventoryDeletionStatus) Values() []InventoryDeletionStatus { + return []InventoryDeletionStatus{ + "InProgress", + "Complete", + } +} + +type InventoryQueryOperatorType string + +// Enum values for InventoryQueryOperatorType +const ( + InventoryQueryOperatorTypeEqual InventoryQueryOperatorType = "Equal" + InventoryQueryOperatorTypeNotEqual InventoryQueryOperatorType = "NotEqual" + InventoryQueryOperatorTypeBeginWith InventoryQueryOperatorType = "BeginWith" + InventoryQueryOperatorTypeLessThan InventoryQueryOperatorType = "LessThan" + InventoryQueryOperatorTypeGreaterThan InventoryQueryOperatorType = "GreaterThan" + InventoryQueryOperatorTypeExists InventoryQueryOperatorType = "Exists" +) + +// Values returns all known values for InventoryQueryOperatorType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InventoryQueryOperatorType) Values() []InventoryQueryOperatorType { + return []InventoryQueryOperatorType{ + "Equal", + "NotEqual", + "BeginWith", + "LessThan", + "GreaterThan", + "Exists", + } +} + +type InventorySchemaDeleteOption string + +// Enum values for InventorySchemaDeleteOption +const ( + InventorySchemaDeleteOptionDisableSchema InventorySchemaDeleteOption = "DisableSchema" + InventorySchemaDeleteOptionDeleteSchema InventorySchemaDeleteOption = "DeleteSchema" +) + +// Values returns all known values for InventorySchemaDeleteOption. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InventorySchemaDeleteOption) Values() []InventorySchemaDeleteOption { + return []InventorySchemaDeleteOption{ + "DisableSchema", + "DeleteSchema", + } +} + +type LastResourceDataSyncStatus string + +// Enum values for LastResourceDataSyncStatus +const ( + LastResourceDataSyncStatusSuccessful LastResourceDataSyncStatus = "Successful" + LastResourceDataSyncStatusFailed LastResourceDataSyncStatus = "Failed" + LastResourceDataSyncStatusInprogress LastResourceDataSyncStatus = "InProgress" +) + +// Values returns all known values for LastResourceDataSyncStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LastResourceDataSyncStatus) Values() []LastResourceDataSyncStatus { + return []LastResourceDataSyncStatus{ + "Successful", + "Failed", + "InProgress", + } +} + +type MaintenanceWindowExecutionStatus string + +// Enum values for MaintenanceWindowExecutionStatus +const ( + MaintenanceWindowExecutionStatusPending MaintenanceWindowExecutionStatus = "PENDING" + MaintenanceWindowExecutionStatusInProgress MaintenanceWindowExecutionStatus = "IN_PROGRESS" + MaintenanceWindowExecutionStatusSuccess MaintenanceWindowExecutionStatus = "SUCCESS" + MaintenanceWindowExecutionStatusFailed MaintenanceWindowExecutionStatus = "FAILED" + MaintenanceWindowExecutionStatusTimedOut MaintenanceWindowExecutionStatus = "TIMED_OUT" + MaintenanceWindowExecutionStatusCancelling MaintenanceWindowExecutionStatus = "CANCELLING" + MaintenanceWindowExecutionStatusCancelled MaintenanceWindowExecutionStatus = "CANCELLED" + MaintenanceWindowExecutionStatusSkippedOverlapping MaintenanceWindowExecutionStatus = "SKIPPED_OVERLAPPING" +) + +// Values returns all known values for MaintenanceWindowExecutionStatus. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MaintenanceWindowExecutionStatus) Values() []MaintenanceWindowExecutionStatus { + return []MaintenanceWindowExecutionStatus{ + "PENDING", + "IN_PROGRESS", + "SUCCESS", + "FAILED", + "TIMED_OUT", + "CANCELLING", + "CANCELLED", + "SKIPPED_OVERLAPPING", + } +} + +type MaintenanceWindowResourceType string + +// Enum values for MaintenanceWindowResourceType +const ( + MaintenanceWindowResourceTypeInstance MaintenanceWindowResourceType = "INSTANCE" + MaintenanceWindowResourceTypeResourceGroup MaintenanceWindowResourceType = "RESOURCE_GROUP" +) + +// Values returns all known values for MaintenanceWindowResourceType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MaintenanceWindowResourceType) Values() []MaintenanceWindowResourceType { + return []MaintenanceWindowResourceType{ + "INSTANCE", + "RESOURCE_GROUP", + } +} + +type MaintenanceWindowTaskCutoffBehavior string + +// Enum values for MaintenanceWindowTaskCutoffBehavior +const ( + MaintenanceWindowTaskCutoffBehaviorContinueTask MaintenanceWindowTaskCutoffBehavior = "CONTINUE_TASK" + MaintenanceWindowTaskCutoffBehaviorCancelTask MaintenanceWindowTaskCutoffBehavior = "CANCEL_TASK" +) + +// Values returns all known values for MaintenanceWindowTaskCutoffBehavior. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MaintenanceWindowTaskCutoffBehavior) Values() []MaintenanceWindowTaskCutoffBehavior { + return []MaintenanceWindowTaskCutoffBehavior{ + "CONTINUE_TASK", + "CANCEL_TASK", + } +} + +type MaintenanceWindowTaskType string + +// Enum values for MaintenanceWindowTaskType +const ( + MaintenanceWindowTaskTypeRunCommand MaintenanceWindowTaskType = "RUN_COMMAND" + MaintenanceWindowTaskTypeAutomation MaintenanceWindowTaskType = "AUTOMATION" + MaintenanceWindowTaskTypeStepFunctions MaintenanceWindowTaskType = "STEP_FUNCTIONS" + MaintenanceWindowTaskTypeLambda MaintenanceWindowTaskType = "LAMBDA" +) + +// Values returns all known values for MaintenanceWindowTaskType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MaintenanceWindowTaskType) Values() []MaintenanceWindowTaskType { + return []MaintenanceWindowTaskType{ + "RUN_COMMAND", + "AUTOMATION", + "STEP_FUNCTIONS", + "LAMBDA", + } +} + +type ManagedStatus string + +// Enum values for ManagedStatus +const ( + ManagedStatusAll ManagedStatus = "All" + ManagedStatusManaged ManagedStatus = "Managed" + ManagedStatusUnmanaged ManagedStatus = "Unmanaged" +) + +// Values returns all known values for ManagedStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ManagedStatus) Values() []ManagedStatus { + return []ManagedStatus{ + "All", + "Managed", + "Unmanaged", + } +} + +type NodeAggregatorType string + +// Enum values for NodeAggregatorType +const ( + NodeAggregatorTypeCount NodeAggregatorType = "Count" +) + +// Values returns all known values for NodeAggregatorType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NodeAggregatorType) Values() []NodeAggregatorType { + return []NodeAggregatorType{ + "Count", + } +} + +type NodeAttributeName string + +// Enum values for NodeAttributeName +const ( + NodeAttributeNameAgentVersion NodeAttributeName = "AgentVersion" + NodeAttributeNamePlatformName NodeAttributeName = "PlatformName" + NodeAttributeNamePlatformType NodeAttributeName = "PlatformType" + NodeAttributeNamePlatformVersion NodeAttributeName = "PlatformVersion" + NodeAttributeNameRegion NodeAttributeName = "Region" + NodeAttributeNameResourceType NodeAttributeName = "ResourceType" +) + +// Values returns all known values for NodeAttributeName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NodeAttributeName) Values() []NodeAttributeName { + return []NodeAttributeName{ + "AgentVersion", + "PlatformName", + "PlatformType", + "PlatformVersion", + "Region", + "ResourceType", + } +} + +type NodeFilterKey string + +// Enum values for NodeFilterKey +const ( + NodeFilterKeyAgentType NodeFilterKey = "AgentType" + NodeFilterKeyAgentVersion NodeFilterKey = "AgentVersion" + NodeFilterKeyComputerName NodeFilterKey = "ComputerName" + NodeFilterKeyInstanceId NodeFilterKey = "InstanceId" + NodeFilterKeyInstanceStatus NodeFilterKey = "InstanceStatus" + NodeFilterKeyIpAddress NodeFilterKey = "IpAddress" + NodeFilterKeyManagedStatus NodeFilterKey = "ManagedStatus" + NodeFilterKeyPlatformName NodeFilterKey = "PlatformName" + NodeFilterKeyPlatformType NodeFilterKey = "PlatformType" + NodeFilterKeyPlatformVersion NodeFilterKey = "PlatformVersion" + NodeFilterKeyResourceType NodeFilterKey = "ResourceType" + NodeFilterKeyOrganizationalUnitId NodeFilterKey = "OrganizationalUnitId" + NodeFilterKeyOrganizationalUnitPath NodeFilterKey = "OrganizationalUnitPath" + NodeFilterKeyRegion NodeFilterKey = "Region" + NodeFilterKeyAccountId NodeFilterKey = "AccountId" +) + +// Values returns all known values for NodeFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NodeFilterKey) Values() []NodeFilterKey { + return []NodeFilterKey{ + "AgentType", + "AgentVersion", + "ComputerName", + "InstanceId", + "InstanceStatus", + "IpAddress", + "ManagedStatus", + "PlatformName", + "PlatformType", + "PlatformVersion", + "ResourceType", + "OrganizationalUnitId", + "OrganizationalUnitPath", + "Region", + "AccountId", + } +} + +type NodeFilterOperatorType string + +// Enum values for NodeFilterOperatorType +const ( + NodeFilterOperatorTypeEqual NodeFilterOperatorType = "Equal" + NodeFilterOperatorTypeNotEqual NodeFilterOperatorType = "NotEqual" + NodeFilterOperatorTypeBeginWith NodeFilterOperatorType = "BeginWith" +) + +// Values returns all known values for NodeFilterOperatorType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NodeFilterOperatorType) Values() []NodeFilterOperatorType { + return []NodeFilterOperatorType{ + "Equal", + "NotEqual", + "BeginWith", + } +} + +type NodeTypeName string + +// Enum values for NodeTypeName +const ( + NodeTypeNameInstance NodeTypeName = "Instance" +) + +// Values returns all known values for NodeTypeName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NodeTypeName) Values() []NodeTypeName { + return []NodeTypeName{ + "Instance", + } +} + +type NotificationEvent string + +// Enum values for NotificationEvent +const ( + NotificationEventAll NotificationEvent = "All" + NotificationEventInProgress NotificationEvent = "InProgress" + NotificationEventSuccess NotificationEvent = "Success" + NotificationEventTimedOut NotificationEvent = "TimedOut" + NotificationEventCancelled NotificationEvent = "Cancelled" + NotificationEventFailed NotificationEvent = "Failed" +) + +// Values returns all known values for NotificationEvent. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NotificationEvent) Values() []NotificationEvent { + return []NotificationEvent{ + "All", + "InProgress", + "Success", + "TimedOut", + "Cancelled", + "Failed", + } +} + +type NotificationType string + +// Enum values for NotificationType +const ( + NotificationTypeCommand NotificationType = "Command" + NotificationTypeInvocation NotificationType = "Invocation" +) + +// Values returns all known values for NotificationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (NotificationType) Values() []NotificationType { + return []NotificationType{ + "Command", + "Invocation", + } +} + +type OperatingSystem string + +// Enum values for OperatingSystem +const ( + OperatingSystemWindows OperatingSystem = "WINDOWS" + OperatingSystemAmazonLinux OperatingSystem = "AMAZON_LINUX" + OperatingSystemAmazonLinux2 OperatingSystem = "AMAZON_LINUX_2" + OperatingSystemAmazonLinux2022 OperatingSystem = "AMAZON_LINUX_2022" + OperatingSystemUbuntu OperatingSystem = "UBUNTU" + OperatingSystemRedhatEnterpriseLinux OperatingSystem = "REDHAT_ENTERPRISE_LINUX" + OperatingSystemSuse OperatingSystem = "SUSE" + OperatingSystemCentOS OperatingSystem = "CENTOS" + OperatingSystemOracleLinux OperatingSystem = "ORACLE_LINUX" + OperatingSystemDebian OperatingSystem = "DEBIAN" + OperatingSystemMacOS OperatingSystem = "MACOS" + OperatingSystemRaspbian OperatingSystem = "RASPBIAN" + OperatingSystemRockyLinux OperatingSystem = "ROCKY_LINUX" + OperatingSystemAlmaLinux OperatingSystem = "ALMA_LINUX" + OperatingSystemAmazonLinux2023 OperatingSystem = "AMAZON_LINUX_2023" +) + +// Values returns all known values for OperatingSystem. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OperatingSystem) Values() []OperatingSystem { + return []OperatingSystem{ + "WINDOWS", + "AMAZON_LINUX", + "AMAZON_LINUX_2", + "AMAZON_LINUX_2022", + "UBUNTU", + "REDHAT_ENTERPRISE_LINUX", + "SUSE", + "CENTOS", + "ORACLE_LINUX", + "DEBIAN", + "MACOS", + "RASPBIAN", + "ROCKY_LINUX", + "ALMA_LINUX", + "AMAZON_LINUX_2023", + } +} + +type OpsFilterOperatorType string + +// Enum values for OpsFilterOperatorType +const ( + OpsFilterOperatorTypeEqual OpsFilterOperatorType = "Equal" + OpsFilterOperatorTypeNotEqual OpsFilterOperatorType = "NotEqual" + OpsFilterOperatorTypeBeginWith OpsFilterOperatorType = "BeginWith" + OpsFilterOperatorTypeLessThan OpsFilterOperatorType = "LessThan" + OpsFilterOperatorTypeGreaterThan OpsFilterOperatorType = "GreaterThan" + OpsFilterOperatorTypeExists OpsFilterOperatorType = "Exists" +) + +// Values returns all known values for OpsFilterOperatorType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsFilterOperatorType) Values() []OpsFilterOperatorType { + return []OpsFilterOperatorType{ + "Equal", + "NotEqual", + "BeginWith", + "LessThan", + "GreaterThan", + "Exists", + } +} + +type OpsItemDataType string + +// Enum values for OpsItemDataType +const ( + OpsItemDataTypeSearchableString OpsItemDataType = "SearchableString" + OpsItemDataTypeString OpsItemDataType = "String" +) + +// Values returns all known values for OpsItemDataType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemDataType) Values() []OpsItemDataType { + return []OpsItemDataType{ + "SearchableString", + "String", + } +} + +type OpsItemEventFilterKey string + +// Enum values for OpsItemEventFilterKey +const ( + OpsItemEventFilterKeyOpsitemId OpsItemEventFilterKey = "OpsItemId" +) + +// Values returns all known values for OpsItemEventFilterKey. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemEventFilterKey) Values() []OpsItemEventFilterKey { + return []OpsItemEventFilterKey{ + "OpsItemId", + } +} + +type OpsItemEventFilterOperator string + +// Enum values for OpsItemEventFilterOperator +const ( + OpsItemEventFilterOperatorEqual OpsItemEventFilterOperator = "Equal" +) + +// Values returns all known values for OpsItemEventFilterOperator. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemEventFilterOperator) Values() []OpsItemEventFilterOperator { + return []OpsItemEventFilterOperator{ + "Equal", + } +} + +type OpsItemFilterKey string + +// Enum values for OpsItemFilterKey +const ( + OpsItemFilterKeyStatus OpsItemFilterKey = "Status" + OpsItemFilterKeyCreatedBy OpsItemFilterKey = "CreatedBy" + OpsItemFilterKeySource OpsItemFilterKey = "Source" + OpsItemFilterKeyPriority OpsItemFilterKey = "Priority" + OpsItemFilterKeyTitle OpsItemFilterKey = "Title" + OpsItemFilterKeyOpsitemId OpsItemFilterKey = "OpsItemId" + OpsItemFilterKeyCreatedTime OpsItemFilterKey = "CreatedTime" + OpsItemFilterKeyLastModifiedTime OpsItemFilterKey = "LastModifiedTime" + OpsItemFilterKeyActualStartTime OpsItemFilterKey = "ActualStartTime" + OpsItemFilterKeyActualEndTime OpsItemFilterKey = "ActualEndTime" + OpsItemFilterKeyPlannedStartTime OpsItemFilterKey = "PlannedStartTime" + OpsItemFilterKeyPlannedEndTime OpsItemFilterKey = "PlannedEndTime" + OpsItemFilterKeyOperationalData OpsItemFilterKey = "OperationalData" + OpsItemFilterKeyOperationalDataKey OpsItemFilterKey = "OperationalDataKey" + OpsItemFilterKeyOperationalDataValue OpsItemFilterKey = "OperationalDataValue" + OpsItemFilterKeyResourceId OpsItemFilterKey = "ResourceId" + OpsItemFilterKeyAutomationId OpsItemFilterKey = "AutomationId" + OpsItemFilterKeyCategory OpsItemFilterKey = "Category" + OpsItemFilterKeySeverity OpsItemFilterKey = "Severity" + OpsItemFilterKeyOpsitemType OpsItemFilterKey = "OpsItemType" + OpsItemFilterKeyAccessRequestRequesterArn OpsItemFilterKey = "AccessRequestByRequesterArn" + OpsItemFilterKeyAccessRequestRequesterId OpsItemFilterKey = "AccessRequestByRequesterId" + OpsItemFilterKeyAccessRequestApproverArn OpsItemFilterKey = "AccessRequestByApproverArn" + OpsItemFilterKeyAccessRequestApproverId OpsItemFilterKey = "AccessRequestByApproverId" + OpsItemFilterKeyAccessRequestSourceAccountId OpsItemFilterKey = "AccessRequestBySourceAccountId" + OpsItemFilterKeyAccessRequestSourceOpsItemId OpsItemFilterKey = "AccessRequestBySourceOpsItemId" + OpsItemFilterKeyAccessRequestSourceRegion OpsItemFilterKey = "AccessRequestBySourceRegion" + OpsItemFilterKeyAccessRequestIsReplica OpsItemFilterKey = "AccessRequestByIsReplica" + OpsItemFilterKeyAccessRequestTargetResourceId OpsItemFilterKey = "AccessRequestByTargetResourceId" + OpsItemFilterKeyChangeRequestRequesterArn OpsItemFilterKey = "ChangeRequestByRequesterArn" + OpsItemFilterKeyChangeRequestRequesterName OpsItemFilterKey = "ChangeRequestByRequesterName" + OpsItemFilterKeyChangeRequestApproverArn OpsItemFilterKey = "ChangeRequestByApproverArn" + OpsItemFilterKeyChangeRequestApproverName OpsItemFilterKey = "ChangeRequestByApproverName" + OpsItemFilterKeyChangeRequestTemplate OpsItemFilterKey = "ChangeRequestByTemplate" + OpsItemFilterKeyChangeRequestTargetsResourceGroup OpsItemFilterKey = "ChangeRequestByTargetsResourceGroup" + OpsItemFilterKeyInsightType OpsItemFilterKey = "InsightByType" + OpsItemFilterKeyAccountId OpsItemFilterKey = "AccountId" +) + +// Values returns all known values for OpsItemFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemFilterKey) Values() []OpsItemFilterKey { + return []OpsItemFilterKey{ + "Status", + "CreatedBy", + "Source", + "Priority", + "Title", + "OpsItemId", + "CreatedTime", + "LastModifiedTime", + "ActualStartTime", + "ActualEndTime", + "PlannedStartTime", + "PlannedEndTime", + "OperationalData", + "OperationalDataKey", + "OperationalDataValue", + "ResourceId", + "AutomationId", + "Category", + "Severity", + "OpsItemType", + "AccessRequestByRequesterArn", + "AccessRequestByRequesterId", + "AccessRequestByApproverArn", + "AccessRequestByApproverId", + "AccessRequestBySourceAccountId", + "AccessRequestBySourceOpsItemId", + "AccessRequestBySourceRegion", + "AccessRequestByIsReplica", + "AccessRequestByTargetResourceId", + "ChangeRequestByRequesterArn", + "ChangeRequestByRequesterName", + "ChangeRequestByApproverArn", + "ChangeRequestByApproverName", + "ChangeRequestByTemplate", + "ChangeRequestByTargetsResourceGroup", + "InsightByType", + "AccountId", + } +} + +type OpsItemFilterOperator string + +// Enum values for OpsItemFilterOperator +const ( + OpsItemFilterOperatorEqual OpsItemFilterOperator = "Equal" + OpsItemFilterOperatorContains OpsItemFilterOperator = "Contains" + OpsItemFilterOperatorGreaterThan OpsItemFilterOperator = "GreaterThan" + OpsItemFilterOperatorLessThan OpsItemFilterOperator = "LessThan" +) + +// Values returns all known values for OpsItemFilterOperator. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemFilterOperator) Values() []OpsItemFilterOperator { + return []OpsItemFilterOperator{ + "Equal", + "Contains", + "GreaterThan", + "LessThan", + } +} + +type OpsItemRelatedItemsFilterKey string + +// Enum values for OpsItemRelatedItemsFilterKey +const ( + OpsItemRelatedItemsFilterKeyResourceType OpsItemRelatedItemsFilterKey = "ResourceType" + OpsItemRelatedItemsFilterKeyAssociationId OpsItemRelatedItemsFilterKey = "AssociationId" + OpsItemRelatedItemsFilterKeyResourceUri OpsItemRelatedItemsFilterKey = "ResourceUri" +) + +// Values returns all known values for OpsItemRelatedItemsFilterKey. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemRelatedItemsFilterKey) Values() []OpsItemRelatedItemsFilterKey { + return []OpsItemRelatedItemsFilterKey{ + "ResourceType", + "AssociationId", + "ResourceUri", + } +} + +type OpsItemRelatedItemsFilterOperator string + +// Enum values for OpsItemRelatedItemsFilterOperator +const ( + OpsItemRelatedItemsFilterOperatorEqual OpsItemRelatedItemsFilterOperator = "Equal" +) + +// Values returns all known values for OpsItemRelatedItemsFilterOperator. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemRelatedItemsFilterOperator) Values() []OpsItemRelatedItemsFilterOperator { + return []OpsItemRelatedItemsFilterOperator{ + "Equal", + } +} + +type OpsItemStatus string + +// Enum values for OpsItemStatus +const ( + OpsItemStatusOpen OpsItemStatus = "Open" + OpsItemStatusInProgress OpsItemStatus = "InProgress" + OpsItemStatusResolved OpsItemStatus = "Resolved" + OpsItemStatusPending OpsItemStatus = "Pending" + OpsItemStatusTimedOut OpsItemStatus = "TimedOut" + OpsItemStatusCancelling OpsItemStatus = "Cancelling" + OpsItemStatusCancelled OpsItemStatus = "Cancelled" + OpsItemStatusFailed OpsItemStatus = "Failed" + OpsItemStatusCompletedWithSuccess OpsItemStatus = "CompletedWithSuccess" + OpsItemStatusCompletedWithFailure OpsItemStatus = "CompletedWithFailure" + OpsItemStatusScheduled OpsItemStatus = "Scheduled" + OpsItemStatusRunbookInProgress OpsItemStatus = "RunbookInProgress" + OpsItemStatusPendingChangeCalendarOverride OpsItemStatus = "PendingChangeCalendarOverride" + OpsItemStatusChangeCalendarOverrideApproved OpsItemStatus = "ChangeCalendarOverrideApproved" + OpsItemStatusChangeCalendarOverrideRejected OpsItemStatus = "ChangeCalendarOverrideRejected" + OpsItemStatusPendingApproval OpsItemStatus = "PendingApproval" + OpsItemStatusApproved OpsItemStatus = "Approved" + OpsItemStatusRevoked OpsItemStatus = "Revoked" + OpsItemStatusRejected OpsItemStatus = "Rejected" + OpsItemStatusClosed OpsItemStatus = "Closed" +) + +// Values returns all known values for OpsItemStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpsItemStatus) Values() []OpsItemStatus { + return []OpsItemStatus{ + "Open", + "InProgress", + "Resolved", + "Pending", + "TimedOut", + "Cancelling", + "Cancelled", + "Failed", + "CompletedWithSuccess", + "CompletedWithFailure", + "Scheduled", + "RunbookInProgress", + "PendingChangeCalendarOverride", + "ChangeCalendarOverrideApproved", + "ChangeCalendarOverrideRejected", + "PendingApproval", + "Approved", + "Revoked", + "Rejected", + "Closed", + } +} + +type ParametersFilterKey string + +// Enum values for ParametersFilterKey +const ( + ParametersFilterKeyName ParametersFilterKey = "Name" + ParametersFilterKeyType ParametersFilterKey = "Type" + ParametersFilterKeyKeyId ParametersFilterKey = "KeyId" +) + +// Values returns all known values for ParametersFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ParametersFilterKey) Values() []ParametersFilterKey { + return []ParametersFilterKey{ + "Name", + "Type", + "KeyId", + } +} + +type ParameterTier string + +// Enum values for ParameterTier +const ( + ParameterTierStandard ParameterTier = "Standard" + ParameterTierAdvanced ParameterTier = "Advanced" + ParameterTierIntelligentTiering ParameterTier = "Intelligent-Tiering" +) + +// Values returns all known values for ParameterTier. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ParameterTier) Values() []ParameterTier { + return []ParameterTier{ + "Standard", + "Advanced", + "Intelligent-Tiering", + } +} + +type ParameterType string + +// Enum values for ParameterType +const ( + ParameterTypeString ParameterType = "String" + ParameterTypeStringList ParameterType = "StringList" + ParameterTypeSecureString ParameterType = "SecureString" +) + +// Values returns all known values for ParameterType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ParameterType) Values() []ParameterType { + return []ParameterType{ + "String", + "StringList", + "SecureString", + } +} + +type PatchAction string + +// Enum values for PatchAction +const ( + PatchActionAllowAsDependency PatchAction = "ALLOW_AS_DEPENDENCY" + PatchActionBlock PatchAction = "BLOCK" +) + +// Values returns all known values for PatchAction. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchAction) Values() []PatchAction { + return []PatchAction{ + "ALLOW_AS_DEPENDENCY", + "BLOCK", + } +} + +type PatchComplianceDataState string + +// Enum values for PatchComplianceDataState +const ( + PatchComplianceDataStateInstalled PatchComplianceDataState = "INSTALLED" + PatchComplianceDataStateInstalledOther PatchComplianceDataState = "INSTALLED_OTHER" + PatchComplianceDataStateInstalledPendingReboot PatchComplianceDataState = "INSTALLED_PENDING_REBOOT" + PatchComplianceDataStateInstalledRejected PatchComplianceDataState = "INSTALLED_REJECTED" + PatchComplianceDataStateMissing PatchComplianceDataState = "MISSING" + PatchComplianceDataStateNotApplicable PatchComplianceDataState = "NOT_APPLICABLE" + PatchComplianceDataStateFailed PatchComplianceDataState = "FAILED" + PatchComplianceDataStateAvailableSecurityUpdate PatchComplianceDataState = "AVAILABLE_SECURITY_UPDATE" +) + +// Values returns all known values for PatchComplianceDataState. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchComplianceDataState) Values() []PatchComplianceDataState { + return []PatchComplianceDataState{ + "INSTALLED", + "INSTALLED_OTHER", + "INSTALLED_PENDING_REBOOT", + "INSTALLED_REJECTED", + "MISSING", + "NOT_APPLICABLE", + "FAILED", + "AVAILABLE_SECURITY_UPDATE", + } +} + +type PatchComplianceLevel string + +// Enum values for PatchComplianceLevel +const ( + PatchComplianceLevelCritical PatchComplianceLevel = "CRITICAL" + PatchComplianceLevelHigh PatchComplianceLevel = "HIGH" + PatchComplianceLevelMedium PatchComplianceLevel = "MEDIUM" + PatchComplianceLevelLow PatchComplianceLevel = "LOW" + PatchComplianceLevelInformational PatchComplianceLevel = "INFORMATIONAL" + PatchComplianceLevelUnspecified PatchComplianceLevel = "UNSPECIFIED" +) + +// Values returns all known values for PatchComplianceLevel. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchComplianceLevel) Values() []PatchComplianceLevel { + return []PatchComplianceLevel{ + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW", + "INFORMATIONAL", + "UNSPECIFIED", + } +} + +type PatchComplianceStatus string + +// Enum values for PatchComplianceStatus +const ( + PatchComplianceStatusCompliant PatchComplianceStatus = "COMPLIANT" + PatchComplianceStatusNonCompliant PatchComplianceStatus = "NON_COMPLIANT" +) + +// Values returns all known values for PatchComplianceStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchComplianceStatus) Values() []PatchComplianceStatus { + return []PatchComplianceStatus{ + "COMPLIANT", + "NON_COMPLIANT", + } +} + +type PatchDeploymentStatus string + +// Enum values for PatchDeploymentStatus +const ( + PatchDeploymentStatusApproved PatchDeploymentStatus = "APPROVED" + PatchDeploymentStatusPendingApproval PatchDeploymentStatus = "PENDING_APPROVAL" + PatchDeploymentStatusExplicitApproved PatchDeploymentStatus = "EXPLICIT_APPROVED" + PatchDeploymentStatusExplicitRejected PatchDeploymentStatus = "EXPLICIT_REJECTED" +) + +// Values returns all known values for PatchDeploymentStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchDeploymentStatus) Values() []PatchDeploymentStatus { + return []PatchDeploymentStatus{ + "APPROVED", + "PENDING_APPROVAL", + "EXPLICIT_APPROVED", + "EXPLICIT_REJECTED", + } +} + +type PatchFilterKey string + +// Enum values for PatchFilterKey +const ( + PatchFilterKeyArch PatchFilterKey = "ARCH" + PatchFilterKeyAdvisoryId PatchFilterKey = "ADVISORY_ID" + PatchFilterKeyBugzillaId PatchFilterKey = "BUGZILLA_ID" + PatchFilterKeyPatchSet PatchFilterKey = "PATCH_SET" + PatchFilterKeyProduct PatchFilterKey = "PRODUCT" + PatchFilterKeyProductFamily PatchFilterKey = "PRODUCT_FAMILY" + PatchFilterKeyClassification PatchFilterKey = "CLASSIFICATION" + PatchFilterKeyCVEId PatchFilterKey = "CVE_ID" + PatchFilterKeyEpoch PatchFilterKey = "EPOCH" + PatchFilterKeyMsrcSeverity PatchFilterKey = "MSRC_SEVERITY" + PatchFilterKeyName PatchFilterKey = "NAME" + PatchFilterKeyPatchId PatchFilterKey = "PATCH_ID" + PatchFilterKeySection PatchFilterKey = "SECTION" + PatchFilterKeyPriority PatchFilterKey = "PRIORITY" + PatchFilterKeyRepository PatchFilterKey = "REPOSITORY" + PatchFilterKeyRelease PatchFilterKey = "RELEASE" + PatchFilterKeySeverity PatchFilterKey = "SEVERITY" + PatchFilterKeySecurity PatchFilterKey = "SECURITY" + PatchFilterKeyVersion PatchFilterKey = "VERSION" +) + +// Values returns all known values for PatchFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchFilterKey) Values() []PatchFilterKey { + return []PatchFilterKey{ + "ARCH", + "ADVISORY_ID", + "BUGZILLA_ID", + "PATCH_SET", + "PRODUCT", + "PRODUCT_FAMILY", + "CLASSIFICATION", + "CVE_ID", + "EPOCH", + "MSRC_SEVERITY", + "NAME", + "PATCH_ID", + "SECTION", + "PRIORITY", + "REPOSITORY", + "RELEASE", + "SEVERITY", + "SECURITY", + "VERSION", + } +} + +type PatchOperationType string + +// Enum values for PatchOperationType +const ( + PatchOperationTypeScan PatchOperationType = "Scan" + PatchOperationTypeInstall PatchOperationType = "Install" +) + +// Values returns all known values for PatchOperationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchOperationType) Values() []PatchOperationType { + return []PatchOperationType{ + "Scan", + "Install", + } +} + +type PatchProperty string + +// Enum values for PatchProperty +const ( + PatchPropertyProduct PatchProperty = "PRODUCT" + PatchPropertyPatchProductFamily PatchProperty = "PRODUCT_FAMILY" + PatchPropertyPatchClassification PatchProperty = "CLASSIFICATION" + PatchPropertyPatchMsrcSeverity PatchProperty = "MSRC_SEVERITY" + PatchPropertyPatchPriority PatchProperty = "PRIORITY" + PatchPropertyPatchSeverity PatchProperty = "SEVERITY" +) + +// Values returns all known values for PatchProperty. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchProperty) Values() []PatchProperty { + return []PatchProperty{ + "PRODUCT", + "PRODUCT_FAMILY", + "CLASSIFICATION", + "MSRC_SEVERITY", + "PRIORITY", + "SEVERITY", + } +} + +type PatchSet string + +// Enum values for PatchSet +const ( + PatchSetOs PatchSet = "OS" + PatchSetApplication PatchSet = "APPLICATION" +) + +// Values returns all known values for PatchSet. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PatchSet) Values() []PatchSet { + return []PatchSet{ + "OS", + "APPLICATION", + } +} + +type PingStatus string + +// Enum values for PingStatus +const ( + PingStatusOnline PingStatus = "Online" + PingStatusConnectionLost PingStatus = "ConnectionLost" + PingStatusInactive PingStatus = "Inactive" +) + +// Values returns all known values for PingStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PingStatus) Values() []PingStatus { + return []PingStatus{ + "Online", + "ConnectionLost", + "Inactive", + } +} + +type PlatformType string + +// Enum values for PlatformType +const ( + PlatformTypeWindows PlatformType = "Windows" + PlatformTypeLinux PlatformType = "Linux" + PlatformTypeMacos PlatformType = "MacOS" +) + +// Values returns all known values for PlatformType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PlatformType) Values() []PlatformType { + return []PlatformType{ + "Windows", + "Linux", + "MacOS", + } +} + +type RebootOption string + +// Enum values for RebootOption +const ( + RebootOptionRebootIfNeeded RebootOption = "RebootIfNeeded" + RebootOptionNoReboot RebootOption = "NoReboot" +) + +// Values returns all known values for RebootOption. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RebootOption) Values() []RebootOption { + return []RebootOption{ + "RebootIfNeeded", + "NoReboot", + } +} + +type ResourceDataSyncS3Format string + +// Enum values for ResourceDataSyncS3Format +const ( + ResourceDataSyncS3FormatJsonSerde ResourceDataSyncS3Format = "JsonSerDe" +) + +// Values returns all known values for ResourceDataSyncS3Format. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceDataSyncS3Format) Values() []ResourceDataSyncS3Format { + return []ResourceDataSyncS3Format{ + "JsonSerDe", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + ResourceTypeManagedInstance ResourceType = "ManagedInstance" + ResourceTypeEc2Instance ResourceType = "EC2Instance" +) + +// Values returns all known values for ResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceType) Values() []ResourceType { + return []ResourceType{ + "ManagedInstance", + "EC2Instance", + } +} + +type ResourceTypeForTagging string + +// Enum values for ResourceTypeForTagging +const ( + ResourceTypeForTaggingDocument ResourceTypeForTagging = "Document" + ResourceTypeForTaggingManagedInstance ResourceTypeForTagging = "ManagedInstance" + ResourceTypeForTaggingMaintenanceWindow ResourceTypeForTagging = "MaintenanceWindow" + ResourceTypeForTaggingParameter ResourceTypeForTagging = "Parameter" + ResourceTypeForTaggingPatchBaseline ResourceTypeForTagging = "PatchBaseline" + ResourceTypeForTaggingOpsItem ResourceTypeForTagging = "OpsItem" + ResourceTypeForTaggingOpsmetadata ResourceTypeForTagging = "OpsMetadata" + ResourceTypeForTaggingAutomation ResourceTypeForTagging = "Automation" + ResourceTypeForTaggingAssociation ResourceTypeForTagging = "Association" +) + +// Values returns all known values for ResourceTypeForTagging. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceTypeForTagging) Values() []ResourceTypeForTagging { + return []ResourceTypeForTagging{ + "Document", + "ManagedInstance", + "MaintenanceWindow", + "Parameter", + "PatchBaseline", + "OpsItem", + "OpsMetadata", + "Automation", + "Association", + } +} + +type ReviewStatus string + +// Enum values for ReviewStatus +const ( + ReviewStatusApproved ReviewStatus = "APPROVED" + ReviewStatusNotReviewed ReviewStatus = "NOT_REVIEWED" + ReviewStatusPending ReviewStatus = "PENDING" + ReviewStatusRejected ReviewStatus = "REJECTED" +) + +// Values returns all known values for ReviewStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReviewStatus) Values() []ReviewStatus { + return []ReviewStatus{ + "APPROVED", + "NOT_REVIEWED", + "PENDING", + "REJECTED", + } +} + +type SessionFilterKey string + +// Enum values for SessionFilterKey +const ( + SessionFilterKeyInvokedAfter SessionFilterKey = "InvokedAfter" + SessionFilterKeyInvokedBefore SessionFilterKey = "InvokedBefore" + SessionFilterKeyTargetId SessionFilterKey = "Target" + SessionFilterKeyOwner SessionFilterKey = "Owner" + SessionFilterKeyStatus SessionFilterKey = "Status" + SessionFilterKeySessionId SessionFilterKey = "SessionId" + SessionFilterKeyAccessType SessionFilterKey = "AccessType" +) + +// Values returns all known values for SessionFilterKey. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SessionFilterKey) Values() []SessionFilterKey { + return []SessionFilterKey{ + "InvokedAfter", + "InvokedBefore", + "Target", + "Owner", + "Status", + "SessionId", + "AccessType", + } +} + +type SessionState string + +// Enum values for SessionState +const ( + SessionStateActive SessionState = "Active" + SessionStateHistory SessionState = "History" +) + +// Values returns all known values for SessionState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SessionState) Values() []SessionState { + return []SessionState{ + "Active", + "History", + } +} + +type SessionStatus string + +// Enum values for SessionStatus +const ( + SessionStatusConnected SessionStatus = "Connected" + SessionStatusConnecting SessionStatus = "Connecting" + SessionStatusDisconnected SessionStatus = "Disconnected" + SessionStatusTerminated SessionStatus = "Terminated" + SessionStatusTerminating SessionStatus = "Terminating" + SessionStatusFailed SessionStatus = "Failed" +) + +// Values returns all known values for SessionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SessionStatus) Values() []SessionStatus { + return []SessionStatus{ + "Connected", + "Connecting", + "Disconnected", + "Terminated", + "Terminating", + "Failed", + } +} + +type SignalType string + +// Enum values for SignalType +const ( + SignalTypeApprove SignalType = "Approve" + SignalTypeReject SignalType = "Reject" + SignalTypeStartStep SignalType = "StartStep" + SignalTypeStopStep SignalType = "StopStep" + SignalTypeResume SignalType = "Resume" + SignalTypeRevoke SignalType = "Revoke" +) + +// Values returns all known values for SignalType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SignalType) Values() []SignalType { + return []SignalType{ + "Approve", + "Reject", + "StartStep", + "StopStep", + "Resume", + "Revoke", + } +} + +type SourceType string + +// Enum values for SourceType +const ( + SourceTypeAwsEc2Instance SourceType = "AWS::EC2::Instance" + SourceTypeAwsIotThing SourceType = "AWS::IoT::Thing" + SourceTypeAwsSsmManagedinstance SourceType = "AWS::SSM::ManagedInstance" +) + +// Values returns all known values for SourceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SourceType) Values() []SourceType { + return []SourceType{ + "AWS::EC2::Instance", + "AWS::IoT::Thing", + "AWS::SSM::ManagedInstance", + } +} + +type StepExecutionFilterKey string + +// Enum values for StepExecutionFilterKey +const ( + StepExecutionFilterKeyStartTimeBefore StepExecutionFilterKey = "StartTimeBefore" + StepExecutionFilterKeyStartTimeAfter StepExecutionFilterKey = "StartTimeAfter" + StepExecutionFilterKeyStepExecutionStatus StepExecutionFilterKey = "StepExecutionStatus" + StepExecutionFilterKeyStepExecutionId StepExecutionFilterKey = "StepExecutionId" + StepExecutionFilterKeyStepName StepExecutionFilterKey = "StepName" + StepExecutionFilterKeyAction StepExecutionFilterKey = "Action" + StepExecutionFilterKeyParentStepExecutionId StepExecutionFilterKey = "ParentStepExecutionId" + StepExecutionFilterKeyParentStepIteration StepExecutionFilterKey = "ParentStepIteration" + StepExecutionFilterKeyParentStepIteratorValue StepExecutionFilterKey = "ParentStepIteratorValue" +) + +// Values returns all known values for StepExecutionFilterKey. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (StepExecutionFilterKey) Values() []StepExecutionFilterKey { + return []StepExecutionFilterKey{ + "StartTimeBefore", + "StartTimeAfter", + "StepExecutionStatus", + "StepExecutionId", + "StepName", + "Action", + "ParentStepExecutionId", + "ParentStepIteration", + "ParentStepIteratorValue", + } +} + +type StopType string + +// Enum values for StopType +const ( + StopTypeComplete StopType = "Complete" + StopTypeCancel StopType = "Cancel" +) + +// Values returns all known values for StopType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (StopType) Values() []StopType { + return []StopType{ + "Complete", + "Cancel", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go new file mode 100644 index 00000000000..ae352cda786 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go @@ -0,0 +1,3868 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The requester doesn't have permissions to perform the requested operation. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error returned if an attempt is made to register a patch group with a patch +// baseline that is already registered with a different patch baseline. +type AlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *AlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You must disassociate a document from all managed nodes before you can delete +// it. +type AssociatedInstances struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AssociatedInstances) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AssociatedInstances) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AssociatedInstances) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AssociatedInstances" + } + return *e.ErrorCodeOverride +} +func (e *AssociatedInstances) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified association already exists. +type AssociationAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AssociationAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AssociationAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AssociationAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AssociationAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *AssociationAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified association doesn't exist. +type AssociationDoesNotExist struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AssociationDoesNotExist) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AssociationDoesNotExist) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AssociationDoesNotExist) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AssociationDoesNotExist" + } + return *e.ErrorCodeOverride +} +func (e *AssociationDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified execution ID doesn't exist. Verify the ID number and try again. +type AssociationExecutionDoesNotExist struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AssociationExecutionDoesNotExist) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AssociationExecutionDoesNotExist) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AssociationExecutionDoesNotExist) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AssociationExecutionDoesNotExist" + } + return *e.ErrorCodeOverride +} +func (e *AssociationExecutionDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You can have at most 2,000 active associations. +type AssociationLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AssociationLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AssociationLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AssociationLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AssociationLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *AssociationLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have reached the maximum number versions allowed for an association. Each +// association has a limit of 1,000 versions. +type AssociationVersionLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AssociationVersionLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AssociationVersionLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AssociationVersionLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AssociationVersionLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *AssociationVersionLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Indicates that the Change Manager change template used in the change request +// was rejected or is still in a pending state. +type AutomationDefinitionNotApprovedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AutomationDefinitionNotApprovedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AutomationDefinitionNotApprovedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AutomationDefinitionNotApprovedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AutomationDefinitionNotApprovedException" + } + return *e.ErrorCodeOverride +} +func (e *AutomationDefinitionNotApprovedException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// An Automation runbook with the specified name couldn't be found. +type AutomationDefinitionNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AutomationDefinitionNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AutomationDefinitionNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AutomationDefinitionNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AutomationDefinitionNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *AutomationDefinitionNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// An Automation runbook with the specified name and version couldn't be found. +type AutomationDefinitionVersionNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AutomationDefinitionVersionNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AutomationDefinitionVersionNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AutomationDefinitionVersionNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AutomationDefinitionVersionNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *AutomationDefinitionVersionNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The number of simultaneously running Automation executions exceeded the +// allowable limit. +type AutomationExecutionLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AutomationExecutionLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AutomationExecutionLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AutomationExecutionLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AutomationExecutionLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *AutomationExecutionLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// There is no automation execution information for the requested automation +// execution ID. +type AutomationExecutionNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AutomationExecutionNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AutomationExecutionNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AutomationExecutionNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AutomationExecutionNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *AutomationExecutionNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified step name and execution ID don't exist. Verify the information +// and try again. +type AutomationStepNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AutomationStepNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AutomationStepNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AutomationStepNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AutomationStepNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *AutomationStepNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You specified too many custom compliance types. You can specify a maximum of 10 +// different types. +type ComplianceTypeCountLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ComplianceTypeCountLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ComplianceTypeCountLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ComplianceTypeCountLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ComplianceTypeCountLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ComplianceTypeCountLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have exceeded the limit for custom schemas. Delete one or more custom +// schemas and try again. +type CustomSchemaCountLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CustomSchemaCountLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CustomSchemaCountLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CustomSchemaCountLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CustomSchemaCountLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *CustomSchemaCountLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified document already exists. +type DocumentAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DocumentAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DocumentAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DocumentAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DocumentAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *DocumentAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You can have at most 500 active SSM documents. +type DocumentLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DocumentLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DocumentLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DocumentLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DocumentLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *DocumentLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The document can't be shared with more Amazon Web Services accounts. You can +// specify a maximum of 20 accounts per API operation to share a private document. +// +// By default, you can share a private document with a maximum of 1,000 accounts +// and publicly share up to five documents. +// +// If you need to increase the quota for privately or publicly shared Systems +// Manager documents, contact Amazon Web Services Support. +type DocumentPermissionLimit struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DocumentPermissionLimit) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DocumentPermissionLimit) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DocumentPermissionLimit) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DocumentPermissionLimit" + } + return *e.ErrorCodeOverride +} +func (e *DocumentPermissionLimit) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The document has too many versions. Delete one or more document versions and +// try again. +type DocumentVersionLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DocumentVersionLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DocumentVersionLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DocumentVersionLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DocumentVersionLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *DocumentVersionLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error returned when the ID specified for a resource, such as a maintenance +// window or patch baseline, doesn't exist. +// +// For information about resource quotas in Amazon Web Services Systems Manager, +// see [Systems Manager service quotas]in the Amazon Web Services General Reference. +// +// [Systems Manager service quotas]: https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm +type DoesNotExistException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DoesNotExistException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DoesNotExistException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DoesNotExistException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DoesNotExistException" + } + return *e.ErrorCodeOverride +} +func (e *DoesNotExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The content of the association document matches another document. Change the +// content of the document and try again. +type DuplicateDocumentContent struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DuplicateDocumentContent) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DuplicateDocumentContent) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DuplicateDocumentContent) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DuplicateDocumentContent" + } + return *e.ErrorCodeOverride +} +func (e *DuplicateDocumentContent) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The version name has already been used in this document. Specify a different +// version name, and then try again. +type DuplicateDocumentVersionName struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DuplicateDocumentVersionName) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DuplicateDocumentVersionName) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DuplicateDocumentVersionName) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DuplicateDocumentVersionName" + } + return *e.ErrorCodeOverride +} +func (e *DuplicateDocumentVersionName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You can't specify a managed node ID in more than one association. +type DuplicateInstanceId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DuplicateInstanceId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DuplicateInstanceId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DuplicateInstanceId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DuplicateInstanceId" + } + return *e.ErrorCodeOverride +} +func (e *DuplicateInstanceId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where the +// corresponding service isn't available. +type FeatureNotAvailableException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FeatureNotAvailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FeatureNotAvailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FeatureNotAvailableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FeatureNotAvailableException" + } + return *e.ErrorCodeOverride +} +func (e *FeatureNotAvailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A hierarchy can have a maximum of 15 levels. For more information, see [Requirements and constraints for parameter names] in the +// Amazon Web Services Systems Manager User Guide. +// +// [Requirements and constraints for parameter names]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html +type HierarchyLevelLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HierarchyLevelLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HierarchyLevelLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HierarchyLevelLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HierarchyLevelLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *HierarchyLevelLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Parameter Store doesn't support changing a parameter type in a hierarchy. For +// example, you can't change a parameter from a String type to a SecureString +// type. You must create a new, unique parameter. +type HierarchyTypeMismatchException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HierarchyTypeMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HierarchyTypeMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HierarchyTypeMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HierarchyTypeMismatchException" + } + return *e.ErrorCodeOverride +} +func (e *HierarchyTypeMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error returned when an idempotent operation is retried and the parameters don't +// match the original call to the API with the same idempotency token. +type IdempotentParameterMismatch struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IdempotentParameterMismatch) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IdempotentParameterMismatch) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IdempotentParameterMismatch) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IdempotentParameterMismatch" + } + return *e.ErrorCodeOverride +} +func (e *IdempotentParameterMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There is a conflict in the policies specified for this parameter. You can't, +// for example, specify two Expiration policies for a parameter. Review your +// policies, and try again. +type IncompatiblePolicyException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IncompatiblePolicyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IncompatiblePolicyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IncompatiblePolicyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IncompatiblePolicyException" + } + return *e.ErrorCodeOverride +} +func (e *IncompatiblePolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An error occurred on the server side. +type InternalServerError struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerError) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerError) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerError) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerError" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerError) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The activation isn't valid. The activation might have been deleted, or the +// ActivationId and the ActivationCode don't match. +type InvalidActivation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidActivation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidActivation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidActivation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidActivation" + } + return *e.ErrorCodeOverride +} +func (e *InvalidActivation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The activation ID isn't valid. Verify that you entered the correct ActivationId +// or ActivationCode and try again. +type InvalidActivationId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidActivationId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidActivationId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidActivationId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidActivationId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidActivationId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified aggregator isn't valid for the group type. Verify that the +// aggregator you provided is supported. +type InvalidAggregatorException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAggregatorException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAggregatorException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAggregatorException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAggregatorException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAggregatorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request doesn't meet the regular expression requirement. +type InvalidAllowedPatternException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAllowedPatternException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAllowedPatternException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAllowedPatternException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAllowedPatternException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAllowedPatternException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The association isn't valid or doesn't exist. +type InvalidAssociation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAssociation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAssociation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAssociation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAssociation" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The version you specified isn't valid. Use ListAssociationVersions to view all +// versions of an association according to the association ID. Or, use the $LATEST +// parameter to view the latest version of the association. +type InvalidAssociationVersion struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAssociationVersion) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAssociationVersion) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAssociationVersion) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAssociationVersion" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAssociationVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The supplied parameters for invoking the specified Automation runbook are +// incorrect. For example, they may not match the set of parameters permitted for +// the specified Automation document. +type InvalidAutomationExecutionParametersException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAutomationExecutionParametersException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAutomationExecutionParametersException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAutomationExecutionParametersException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAutomationExecutionParametersException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAutomationExecutionParametersException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The signal isn't valid for the current Automation execution. +type InvalidAutomationSignalException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAutomationSignalException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAutomationSignalException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAutomationSignalException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAutomationSignalException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAutomationSignalException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified update status operation isn't valid. +type InvalidAutomationStatusUpdateException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidAutomationStatusUpdateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidAutomationStatusUpdateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidAutomationStatusUpdateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidAutomationStatusUpdateException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidAutomationStatusUpdateException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified command ID isn't valid. Verify the ID and try again. +type InvalidCommandId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidCommandId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidCommandId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidCommandId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidCommandId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidCommandId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more of the parameters specified for the delete operation isn't valid. +// Verify all parameters and try again. +type InvalidDeleteInventoryParametersException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDeleteInventoryParametersException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDeleteInventoryParametersException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDeleteInventoryParametersException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDeleteInventoryParametersException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDeleteInventoryParametersException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The ID specified for the delete operation doesn't exist or isn't valid. Verify +// the ID and try again. +type InvalidDeletionIdException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDeletionIdException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDeletionIdException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDeletionIdException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDeletionIdException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDeletionIdException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified SSM document doesn't exist. +type InvalidDocument struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDocument) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDocument) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDocument) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDocument" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDocument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The content for the document isn't valid. +type InvalidDocumentContent struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDocumentContent) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDocumentContent) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDocumentContent) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDocumentContent" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDocumentContent) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You attempted to delete a document while it is still shared. You must stop +// sharing the document before you can delete it. +type InvalidDocumentOperation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDocumentOperation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDocumentOperation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDocumentOperation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDocumentOperation" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDocumentOperation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The version of the document schema isn't supported. +type InvalidDocumentSchemaVersion struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDocumentSchemaVersion) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDocumentSchemaVersion) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDocumentSchemaVersion) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDocumentSchemaVersion" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDocumentSchemaVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The SSM document type isn't valid. Valid document types are described in the +// DocumentType property. +type InvalidDocumentType struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDocumentType) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDocumentType) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDocumentType) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDocumentType" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDocumentType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The document version isn't valid or doesn't exist. +type InvalidDocumentVersion struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDocumentVersion) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDocumentVersion) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDocumentVersion) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDocumentVersion" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDocumentVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The filter name isn't valid. Verify that you entered the correct name and try +// again. +type InvalidFilter struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidFilter) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidFilter) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidFilter) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidFilter" + } + return *e.ErrorCodeOverride +} +func (e *InvalidFilter) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified key isn't valid. +type InvalidFilterKey struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidFilterKey) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidFilterKey) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidFilterKey) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidFilterKey" + } + return *e.ErrorCodeOverride +} +func (e *InvalidFilterKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified filter option isn't valid. Valid options are Equals and +// BeginsWith. For Path filter, valid options are Recursive and OneLevel. +type InvalidFilterOption struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidFilterOption) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidFilterOption) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidFilterOption) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidFilterOption" + } + return *e.ErrorCodeOverride +} +func (e *InvalidFilterOption) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The filter value isn't valid. Verify the value and try again. +type InvalidFilterValue struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidFilterValue) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidFilterValue) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidFilterValue) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidFilterValue" + } + return *e.ErrorCodeOverride +} +func (e *InvalidFilterValue) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The following problems can cause this exception: +// +// - You don't have permission to access the managed node. +// +// - Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify +// that SSM Agent is running. +// +// - SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM +// Agent. +// +// - The managed node isn't in a valid state. Valid states are: Running , Pending +// , Stopped , and Stopping . Invalid states are: Shutting-down and Terminated . +type InvalidInstanceId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInstanceId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInstanceId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInstanceId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInstanceId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInstanceId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified filter value isn't valid. +type InvalidInstanceInformationFilterValue struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInstanceInformationFilterValue) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInstanceInformationFilterValue) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInstanceInformationFilterValue) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInstanceInformationFilterValue" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInstanceInformationFilterValue) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified filter value isn't valid. +type InvalidInstancePropertyFilterValue struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInstancePropertyFilterValue) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInstancePropertyFilterValue) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInstancePropertyFilterValue) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInstancePropertyFilterValue" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInstancePropertyFilterValue) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified inventory group isn't valid. +type InvalidInventoryGroupException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInventoryGroupException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInventoryGroupException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInventoryGroupException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInventoryGroupException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInventoryGroupException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You specified invalid keys or values in the Context attribute for InventoryItem +// . Verify the keys and values, and try again. +type InvalidInventoryItemContextException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInventoryItemContextException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInventoryItemContextException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInventoryItemContextException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInventoryItemContextException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInventoryItemContextException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The request isn't valid. +type InvalidInventoryRequestException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInventoryRequestException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInventoryRequestException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInventoryRequestException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInventoryRequestException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInventoryRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more content items isn't valid. +type InvalidItemContentException struct { + Message *string + + ErrorCodeOverride *string + + TypeName *string + + noSmithyDocumentSerde +} + +func (e *InvalidItemContentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidItemContentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidItemContentException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidItemContentException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidItemContentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The query key ID isn't valid. +type InvalidKeyId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidKeyId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidKeyId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidKeyId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidKeyId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidKeyId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified token isn't valid. +type InvalidNextToken struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidNextToken) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidNextToken) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidNextToken) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidNextToken" + } + return *e.ErrorCodeOverride +} +func (e *InvalidNextToken) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more configuration items isn't valid. Verify that a valid Amazon +// Resource Name (ARN) was provided for an Amazon Simple Notification Service +// topic. +type InvalidNotificationConfig struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidNotificationConfig) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidNotificationConfig) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidNotificationConfig) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidNotificationConfig" + } + return *e.ErrorCodeOverride +} +func (e *InvalidNotificationConfig) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The delete inventory option specified isn't valid. Verify the option and try +// again. +type InvalidOptionException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOptionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOptionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOptionException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOptionException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOptionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The S3 bucket doesn't exist. +type InvalidOutputFolder struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOutputFolder) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOutputFolder) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOutputFolder) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOutputFolder" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOutputFolder) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The output location isn't valid or doesn't exist. +type InvalidOutputLocation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOutputLocation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOutputLocation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOutputLocation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOutputLocation" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOutputLocation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You must specify values for all required parameters in the Amazon Web Services +// Systems Manager document (SSM document). You can only supply values to +// parameters defined in the SSM document. +type InvalidParameters struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidParameters) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidParameters) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidParameters) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidParameters" + } + return *e.ErrorCodeOverride +} +func (e *InvalidParameters) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The permission type isn't supported. Share is the only supported permission +// type. +type InvalidPermissionType struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPermissionType) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPermissionType) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPermissionType) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPermissionType" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPermissionType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The plugin name isn't valid. +type InvalidPluginName struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPluginName) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPluginName) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPluginName) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPluginName" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPluginName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A policy attribute or its value is invalid. +type InvalidPolicyAttributeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPolicyAttributeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPolicyAttributeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPolicyAttributeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPolicyAttributeException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPolicyAttributeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The policy type isn't supported. Parameter Store supports the following policy +// types: Expiration, ExpirationNotification, and NoChangeNotification. +type InvalidPolicyTypeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPolicyTypeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPolicyTypeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPolicyTypeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPolicyTypeException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPolicyTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource ID isn't valid. Verify that you entered the correct ID and try +// again. +type InvalidResourceId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidResourceId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidResourceId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidResourceId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidResourceId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidResourceId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource type isn't valid. For example, if you are attempting to tag an EC2 +// instance, the instance must be a registered managed node. +type InvalidResourceType struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidResourceType) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidResourceType) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidResourceType) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidResourceType" + } + return *e.ErrorCodeOverride +} +func (e *InvalidResourceType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified inventory item result attribute isn't valid. +type InvalidResultAttributeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidResultAttributeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidResultAttributeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidResultAttributeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidResultAttributeException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidResultAttributeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The role name can't contain invalid characters. Also verify that you specified +// an IAM role for notifications that includes the required trust policy. For +// information about configuring the IAM role for Run Command notifications, see [Monitoring Systems Manager status changes using Amazon SNS notifications] +// in the Amazon Web Services Systems Manager User Guide. +// +// [Monitoring Systems Manager status changes using Amazon SNS notifications]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html +type InvalidRole struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidRole) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRole) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRole) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRole" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRole) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The schedule is invalid. Verify your cron or rate expression and try again. +type InvalidSchedule struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidSchedule) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidSchedule) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidSchedule) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidSchedule" + } + return *e.ErrorCodeOverride +} +func (e *InvalidSchedule) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified tag key or value isn't valid. +type InvalidTag struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTag) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTag) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTag) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTag" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTag) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The target isn't valid or doesn't exist. It might not be configured for Systems +// Manager or you might not have permission to perform the operation. +type InvalidTarget struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTarget) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTarget) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTarget) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTarget" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTarget) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// TargetMap parameter isn't valid. +type InvalidTargetMaps struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTargetMaps) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTargetMaps) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTargetMaps) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTargetMaps" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTargetMaps) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The parameter type name isn't valid. +type InvalidTypeNameException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTypeNameException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTypeNameException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTypeNameException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTypeNameException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTypeNameException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The update isn't valid. +type InvalidUpdate struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidUpdate) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidUpdate) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidUpdate) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidUpdate" + } + return *e.ErrorCodeOverride +} +func (e *InvalidUpdate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The command ID and managed node ID you specified didn't match any invocations. +// Verify the command ID and the managed node ID and try again. +type InvocationDoesNotExist struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvocationDoesNotExist) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvocationDoesNotExist) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvocationDoesNotExist) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvocationDoesNotExist" + } + return *e.ErrorCodeOverride +} +func (e *InvocationDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The inventory item has invalid content. +type ItemContentMismatchException struct { + Message *string + + ErrorCodeOverride *string + + TypeName *string + + noSmithyDocumentSerde +} + +func (e *ItemContentMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ItemContentMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ItemContentMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ItemContentMismatchException" + } + return *e.ErrorCodeOverride +} +func (e *ItemContentMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The inventory item size has exceeded the size limit. +type ItemSizeLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + TypeName *string + + noSmithyDocumentSerde +} + +func (e *ItemSizeLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ItemSizeLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ItemSizeLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ItemSizeLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ItemSizeLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified policy document is malformed or invalid, or excessive +// PutResourcePolicy or DeleteResourcePolicy calls have been made. +type MalformedResourcePolicyDocumentException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MalformedResourcePolicyDocumentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MalformedResourcePolicyDocumentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MalformedResourcePolicyDocumentException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MalformedResourcePolicyDocumentException" + } + return *e.ErrorCodeOverride +} +func (e *MalformedResourcePolicyDocumentException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The size limit of a document is 64 KB. +type MaxDocumentSizeExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MaxDocumentSizeExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MaxDocumentSizeExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MaxDocumentSizeExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MaxDocumentSizeExceeded" + } + return *e.ErrorCodeOverride +} +func (e *MaxDocumentSizeExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The requested operation is no longer supported by Systems Manager. +type NoLongerSupportedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoLongerSupportedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoLongerSupportedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoLongerSupportedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoLongerSupportedException" + } + return *e.ErrorCodeOverride +} +func (e *NoLongerSupportedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You don't have permission to view OpsItems in the specified account. Verify +// that your account is configured either as a Systems Manager delegated +// administrator or that you are logged into the Organizations management account. +type OpsItemAccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsItemAccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemAccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemAccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemAccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemAccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The OpsItem already exists. +type OpsItemAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + OpsItemId *string + + noSmithyDocumentSerde +} + +func (e *OpsItemAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified OpsItem is in the process of being deleted. +type OpsItemConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsItemConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemConflictException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A specified parameter argument isn't valid. Verify the available arguments and +// try again. +type OpsItemInvalidParameterException struct { + Message *string + + ErrorCodeOverride *string + + ParameterNames []string + + noSmithyDocumentSerde +} + +func (e *OpsItemInvalidParameterException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemInvalidParameterException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemInvalidParameterException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemInvalidParameterException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemInvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request caused OpsItems to exceed one or more quotas. +type OpsItemLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + ResourceTypes []string + Limit int32 + LimitType *string + + noSmithyDocumentSerde +} + +func (e *OpsItemLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified OpsItem ID doesn't exist. Verify the ID and try again. +type OpsItemNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsItemNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The Amazon Resource Name (ARN) is already associated with the OpsItem. +type OpsItemRelatedItemAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + ResourceUri *string + OpsItemId *string + + noSmithyDocumentSerde +} + +func (e *OpsItemRelatedItemAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemRelatedItemAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemRelatedItemAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemRelatedItemAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemRelatedItemAlreadyExistsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The association wasn't found using the parameters you specified in the call. +// Verify the information and try again. +type OpsItemRelatedItemAssociationNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsItemRelatedItemAssociationNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemRelatedItemAssociationNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemRelatedItemAssociationNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsItemRelatedItemAssociationNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *OpsItemRelatedItemAssociationNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// An OpsMetadata object already exists for the selected resource. +type OpsMetadataAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsMetadataAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsMetadataAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsMetadataAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsMetadataAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *OpsMetadataAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One of the arguments passed is invalid. +type OpsMetadataInvalidArgumentException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsMetadataInvalidArgumentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsMetadataInvalidArgumentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsMetadataInvalidArgumentException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsMetadataInvalidArgumentException" + } + return *e.ErrorCodeOverride +} +func (e *OpsMetadataInvalidArgumentException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The OpsMetadata object exceeds the maximum number of OpsMetadata keys that you +// can assign to an application in Application Manager. +type OpsMetadataKeyLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsMetadataKeyLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsMetadataKeyLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsMetadataKeyLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsMetadataKeyLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *OpsMetadataKeyLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Your account reached the maximum number of OpsMetadata objects allowed by +// Application Manager. The maximum is 200 OpsMetadata objects. Delete one or more +// OpsMetadata object and try again. +type OpsMetadataLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsMetadataLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsMetadataLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsMetadataLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsMetadataLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *OpsMetadataLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The OpsMetadata object doesn't exist. +type OpsMetadataNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsMetadataNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsMetadataNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsMetadataNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsMetadataNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *OpsMetadataNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The system is processing too many concurrent updates. Wait a few moments and +// try again. +type OpsMetadataTooManyUpdatesException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpsMetadataTooManyUpdatesException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsMetadataTooManyUpdatesException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsMetadataTooManyUpdatesException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpsMetadataTooManyUpdatesException" + } + return *e.ErrorCodeOverride +} +func (e *OpsMetadataTooManyUpdatesException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The parameter already exists. You can't create duplicate parameters. +type ParameterAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *ParameterAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have exceeded the number of parameters for this Amazon Web Services +// account. Delete one or more parameters and try again. +type ParameterLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *ParameterLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Parameter Store retains the 100 most recently created versions of a parameter. +// After this number of versions has been created, Parameter Store deletes the +// oldest version when a new one is created. However, if the oldest version has a +// label attached to it, Parameter Store won't delete the version and instead +// presents this error message: +// +// An error occurred (ParameterMaxVersionLimitExceeded) when calling the +// PutParameter operation: You attempted to create a new version of parameter-name +// by calling the PutParameter API with the overwrite flag. Version version-number, +// the oldest version, can't be deleted because it has a label associated with it. +// Move the label to another version of the parameter, and try again. +// +// This safeguard is to prevent parameter versions with mission critical labels +// assigned to them from being deleted. To continue creating new parameters, first +// move the label from the oldest version of the parameter to a newer one for use +// in your operations. For information about moving parameter labels, see [Move a parameter label (console)]or [Move a parameter label (CLI)] in +// the Amazon Web Services Systems Manager User Guide. +// +// [Move a parameter label (CLI)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-cli-move +// [Move a parameter label (console)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html#sysman-paramstore-labels-console-move +type ParameterMaxVersionLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterMaxVersionLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterMaxVersionLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterMaxVersionLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterMaxVersionLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *ParameterMaxVersionLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The parameter couldn't be found. Verify the name and try again. +// +// For the DeleteParameter and GetParameter actions, if the specified parameter +// doesn't exist, the ParameterNotFound exception is not recorded in CloudTrail +// event logs. +type ParameterNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterNotFound" + } + return *e.ErrorCodeOverride +} +func (e *ParameterNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The parameter name isn't valid. +type ParameterPatternMismatchException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterPatternMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterPatternMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterPatternMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterPatternMismatchException" + } + return *e.ErrorCodeOverride +} +func (e *ParameterPatternMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A parameter version can have a maximum of ten labels. +type ParameterVersionLabelLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterVersionLabelLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterVersionLabelLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterVersionLabelLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterVersionLabelLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *ParameterVersionLabelLimitExceeded) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified parameter version wasn't found. Verify the parameter name and +// version, and try again. +type ParameterVersionNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ParameterVersionNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ParameterVersionNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ParameterVersionNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ParameterVersionNotFound" + } + return *e.ErrorCodeOverride +} +func (e *ParameterVersionNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You specified more than the maximum number of allowed policies for the +// parameter. The maximum is 10. +type PoliciesLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PoliciesLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PoliciesLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PoliciesLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PoliciesLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *PoliciesLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A sync configuration with the same name already exists. +type ResourceDataSyncAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + SyncName *string + + noSmithyDocumentSerde +} + +func (e *ResourceDataSyncAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceDataSyncAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceDataSyncAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceDataSyncAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceDataSyncAlreadyExistsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Another UpdateResourceDataSync request is being processed. Wait a few minutes +// and try again. +type ResourceDataSyncConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceDataSyncConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceDataSyncConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceDataSyncConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceDataSyncConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceDataSyncConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have exceeded the allowed maximum sync configurations. +type ResourceDataSyncCountExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceDataSyncCountExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceDataSyncCountExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceDataSyncCountExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceDataSyncCountExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceDataSyncCountExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified sync configuration is invalid. +type ResourceDataSyncInvalidConfigurationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceDataSyncInvalidConfigurationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceDataSyncInvalidConfigurationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceDataSyncInvalidConfigurationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceDataSyncInvalidConfigurationException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceDataSyncInvalidConfigurationException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified sync name wasn't found. +type ResourceDataSyncNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + SyncName *string + SyncType *string + + noSmithyDocumentSerde +} + +func (e *ResourceDataSyncNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceDataSyncNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceDataSyncNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceDataSyncNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceDataSyncNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error returned if an attempt is made to delete a patch baseline that is +// registered for a patch group. +type ResourceInUseException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceInUseException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceInUseException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceInUseException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceInUseException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Error returned when the caller has exceeded the default resource quotas. For +// example, too many maintenance windows or patch baselines have been created. +// +// For information about resource quotas in Systems Manager, see [Systems Manager service quotas] in the Amazon +// Web Services General Reference. +// +// [Systems Manager service quotas]: https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm +type ResourceLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified parameter to be shared could not be found. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The hash provided in the call doesn't match the stored hash. This exception is +// thrown when trying to update an obsolete policy version or when multiple +// requests to update a policy are sent. +type ResourcePolicyConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourcePolicyConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ResourcePolicyConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more parameters specified for the call aren't valid. Verify the +// parameters and their values and try again. +type ResourcePolicyInvalidParameterException struct { + Message *string + + ErrorCodeOverride *string + + ParameterNames []string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyInvalidParameterException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyInvalidParameterException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyInvalidParameterException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourcePolicyInvalidParameterException" + } + return *e.ErrorCodeOverride +} +func (e *ResourcePolicyInvalidParameterException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The PutResourcePolicy API action enforces two limits. A policy can't be greater than 1024 bytes +// in size. And only one policy can be attached to OpsItemGroup . Verify these +// limits and try again. +type ResourcePolicyLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + Limit int32 + LimitType *string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourcePolicyLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ResourcePolicyLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// No policies with the specified policy ID and hash could be found. +type ResourcePolicyNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourcePolicyNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePolicyNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePolicyNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourcePolicyNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourcePolicyNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request exceeds the service quota. Service quotas, also referred to as +// limits, are the maximum number of service resources or operations for your +// Amazon Web Services account. +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + ResourceId *string + ResourceType *string + QuotaCode *string + ServiceCode *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified service setting wasn't found. Either the service name or the +// setting hasn't been provisioned by the Amazon Web Services service team. +type ServiceSettingNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceSettingNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceSettingNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceSettingNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceSettingNotFound" + } + return *e.ErrorCodeOverride +} +func (e *ServiceSettingNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The updated status is the same as the current status. +type StatusUnchanged struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *StatusUnchanged) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *StatusUnchanged) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *StatusUnchanged) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "StatusUnchanged" + } + return *e.ErrorCodeOverride +} +func (e *StatusUnchanged) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The sub-type count exceeded the limit for the inventory type. +type SubTypeCountLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *SubTypeCountLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SubTypeCountLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SubTypeCountLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SubTypeCountLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *SubTypeCountLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You specified the Safe option for the DeregisterTargetFromMaintenanceWindow +// operation, but the target is still referenced in a task. +type TargetInUseException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TargetInUseException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TargetInUseException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TargetInUseException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TargetInUseException" + } + return *e.ErrorCodeOverride +} +func (e *TargetInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified target managed node for the session isn't fully configured for +// use with Session Manager. For more information, see [Setting up Session Manager]in the Amazon Web Services +// Systems Manager User Guide. This error is also returned if you attempt to start +// a session on a managed node that is located in a different account or Region +// +// [Setting up Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html +type TargetNotConnected struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TargetNotConnected) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TargetNotConnected) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TargetNotConnected) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TargetNotConnected" + } + return *e.ErrorCodeOverride +} +func (e *TargetNotConnected) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request or operation couldn't be performed because the service is +// throttling requests. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + QuotaCode *string + ServiceCode *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The Targets parameter includes too many tags. Remove one or more tags and try +// the command again. +type TooManyTagsError struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyTagsError) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyTagsError) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyTagsError) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyTagsError" + } + return *e.ErrorCodeOverride +} +func (e *TooManyTagsError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There are concurrent updates for a resource that supports one update at a time. +type TooManyUpdates struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyUpdates) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyUpdates) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyUpdates) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyUpdates" + } + return *e.ErrorCodeOverride +} +func (e *TooManyUpdates) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The size of inventory data has exceeded the total size limit for the resource. +type TotalSizeLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TotalSizeLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TotalSizeLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TotalSizeLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TotalSizeLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *TotalSizeLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The calendar entry contained in the specified SSM document isn't supported. +type UnsupportedCalendarException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedCalendarException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedCalendarException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedCalendarException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedCalendarException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedCalendarException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Patching for applications released by Microsoft is only available on EC2 +// instances and advanced instances. To patch applications released by Microsoft on +// on-premises servers and VMs, you must enable advanced instances. For more +// information, see [Turning on the advanced-instances tier]in the Amazon Web Services Systems Manager User Guide. +// +// [Turning on the advanced-instances tier]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html +type UnsupportedFeatureRequiredException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedFeatureRequiredException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedFeatureRequiredException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedFeatureRequiredException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedFeatureRequiredException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedFeatureRequiredException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The Context attribute that you specified for the InventoryItem isn't allowed +// for this inventory type. You can only use the Context attribute with inventory +// types like AWS:ComplianceItem . +type UnsupportedInventoryItemContextException struct { + Message *string + + ErrorCodeOverride *string + + TypeName *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedInventoryItemContextException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedInventoryItemContextException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedInventoryItemContextException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedInventoryItemContextException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedInventoryItemContextException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Inventory item type schema version has to match supported versions in the +// service. Check output of GetInventorySchema to see the available schema version +// for each type. +type UnsupportedInventorySchemaVersionException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedInventorySchemaVersionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedInventorySchemaVersionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedInventorySchemaVersionException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedInventorySchemaVersionException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedInventorySchemaVersionException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The operating systems you specified isn't supported, or the operation isn't +// supported for the operating system. +type UnsupportedOperatingSystem struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedOperatingSystem) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedOperatingSystem) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedOperatingSystem) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedOperatingSystem" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedOperatingSystem) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation is not supported for the current account. You must first enable +// the Systems Manager integrated experience in your account. +type UnsupportedOperationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedOperationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedOperationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedOperationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedOperationException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The parameter type isn't supported. +type UnsupportedParameterType struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedParameterType) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedParameterType) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedParameterType) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedParameterType" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedParameterType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The document doesn't support the platform type of the given managed node IDs. +// For example, you sent an document for a Windows managed node to a Linux node. +type UnsupportedPlatformType struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedPlatformType) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedPlatformType) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedPlatformType) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedPlatformType" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedPlatformType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request isn't valid. Verify that you entered valid contents for the command +// and try again. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + ReasonCode *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go new file mode 100644 index 00000000000..98225b45250 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go @@ -0,0 +1,6113 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Information includes the Amazon Web Services account ID where the current +// document is shared and the version shared with that account. +type AccountSharingInfo struct { + + // The Amazon Web Services account ID where the current document is shared. + AccountId *string + + // The version of the current document shared with the account. + SharedDocumentVersion *string + + noSmithyDocumentSerde +} + +// An activation registers one or more on-premises servers or virtual machines +// (VMs) with Amazon Web Services so that you can configure those servers or VMs +// using Run Command. A server or VM that has been registered with Amazon Web +// Services Systems Manager is called a managed node. +type Activation struct { + + // The ID created by Systems Manager when you submitted the activation. + ActivationId *string + + // The date the activation was created. + CreatedDate *time.Time + + // A name for the managed node when it is created. + DefaultInstanceName *string + + // A user defined description of the activation. + Description *string + + // The date when this activation can no longer be used to register managed nodes. + ExpirationDate *time.Time + + // Whether or not the activation is expired. + Expired bool + + // The Identity and Access Management (IAM) role to assign to the managed node. + IamRole *string + + // The maximum number of managed nodes that can be registered using this + // activation. + RegistrationLimit *int32 + + // The number of managed nodes already registered with this activation. + RegistrationsCount *int32 + + // Tags assigned to the activation. + Tags []Tag + + noSmithyDocumentSerde +} + +// A CloudWatch alarm you apply to an automation or command. +type Alarm struct { + + // The name of your CloudWatch alarm. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// The details for the CloudWatch alarm you want to apply to an automation or +// command. +type AlarmConfiguration struct { + + // The name of the CloudWatch alarm specified in the configuration. + // + // This member is required. + Alarms []Alarm + + // When this value is true, your automation or command continues to run in cases + // where we can’t retrieve alarm status information from CloudWatch. In cases where + // we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the + // automation or command continues to run, regardless of this value. Default is + // false. + IgnorePollAlarmFailure bool + + noSmithyDocumentSerde +} + +// The details about the state of your CloudWatch alarm. +type AlarmStateInformation struct { + + // The name of your CloudWatch alarm. + // + // This member is required. + Name *string + + // The state of your CloudWatch alarm. + // + // This member is required. + State ExternalAlarmState + + noSmithyDocumentSerde +} + +// Describes an association of a Amazon Web Services Systems Manager document (SSM +// document) and a managed node. +type Association struct { + + // The ID created by the system when you create an association. An association is + // a binding between a document and a set of targets with a schedule. + AssociationId *string + + // The association name. + AssociationName *string + + // The association version. + AssociationVersion *string + + // The version of the document used in the association. If you change a document + // version for a State Manager association, Systems Manager immediately runs the + // association unless you previously specifed the apply-only-at-cron-interval + // parameter. + // + // State Manager doesn't support running associations that use a new version of a + // document if that document is shared from another account. State Manager always + // runs the default version of a document if shared from another account, even + // though the Systems Manager console shows that a new version was processed. If + // you want to run an association using a new version of a document shared form + // another account, you must set the document version to default . + DocumentVersion *string + + // The number of hours that an association can run on specified targets. After the + // resulting cutoff time passes, associations that are currently running are + // cancelled, and no pending executions are started on remaining targets. + Duration *int32 + + // The managed node ID. + InstanceId *string + + // The date on which the association was last run. + LastExecutionDate *time.Time + + // The name of the SSM document. + Name *string + + // Information about the association. + Overview *AssociationOverview + + // A cron expression that specifies a schedule when the association runs. The + // schedule runs in Coordinated Universal Time (UTC). + ScheduleExpression *string + + // Number of days to wait after the scheduled day to run an association. + ScheduleOffset *int32 + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The managed nodes targeted by the request to create an association. You can + // target all managed nodes in an Amazon Web Services account by specifying the + // InstanceIds key with a value of * . + Targets []Target + + noSmithyDocumentSerde +} + +// Describes the parameters for a document. +type AssociationDescription struct { + + // The details for the CloudWatch alarm you want to apply to an automation or + // command. + AlarmConfiguration *AlarmConfiguration + + // By default, when you create a new associations, the system runs it immediately + // after it is created and then according to the schedule you specified. Specify + // this option if you don't want an association to run immediately after you create + // it. This parameter isn't supported for rate expressions. + ApplyOnlyAtCronInterval bool + + // A role used by association to take actions on your behalf. State Manager will + // assume this role and call required APIs when dispatching configurations to + // nodes. If not specified, [service-linked role for Systems Manager]will be used by default. + // + // [service-linked role for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html + AssociationDispatchAssumeRole *string + + // The association ID. + AssociationId *string + + // The association name. + AssociationName *string + + // The association version. + AssociationVersion *string + + // Choose the parameter that will define how your automation will branch out. This + // target is required for associations that use an Automation runbook and target + // resources by using rate controls. Automation is a tool in Amazon Web Services + // Systems Manager. + AutomationTargetParameterName *string + + // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents + // your associations are gated under. The associations only run when that change + // calendar is open. For more information, see [Amazon Web Services Systems Manager Change Calendar]in the Amazon Web Services Systems + // Manager User Guide. + // + // [Amazon Web Services Systems Manager Change Calendar]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar + CalendarNames []string + + // The severity level that is assigned to the association. + ComplianceSeverity AssociationComplianceSeverity + + // The date when the association was made. + Date *time.Time + + // The document version. + DocumentVersion *string + + // The number of hours that an association can run on specified targets. After the + // resulting cutoff time passes, associations that are currently running are + // cancelled, and no pending executions are started on remaining targets. + Duration *int32 + + // The managed node ID. + InstanceId *string + + // The date on which the association was last run. + LastExecutionDate *time.Time + + // The last date on which the association was successfully run. + LastSuccessfulExecutionDate *time.Time + + // The date when the association was last updated. + LastUpdateAssociationDate *time.Time + + // The maximum number of targets allowed to run the association at the same time. + // You can specify a number, for example 10, or a percentage of the target set, for + // example 10%. The default value is 100%, which means all targets run the + // association at the same time. + // + // If a new managed node starts and attempts to run an association while Systems + // Manager is running MaxConcurrency associations, the association is allowed to + // run. During the next association interval, the new managed node will process its + // association within the limit specified for MaxConcurrency . + MaxConcurrency *string + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for example + // 10%. If you specify 3, for example, the system stops sending requests when the + // fourth error is received. If you specify 0, then the system stops sending + // requests after the first error is returned. If you run an association on 50 + // managed nodes and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If you + // need to ensure that there won't be more than max-errors failed executions, set + // MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string + + // The name of the SSM document. + Name *string + + // An S3 bucket where you want to store the output details of the request. + OutputLocation *InstanceAssociationOutputLocation + + // Information about the association. + Overview *AssociationOverview + + // A description of the parameters for a document. + Parameters map[string][]string + + // A cron expression that specifies a schedule when the association runs. + ScheduleExpression *string + + // Number of days to wait after the scheduled day to run an association. + ScheduleOffset *int32 + + // The association status. + Status *AssociationStatus + + // The mode for generating association compliance. You can specify AUTO or MANUAL . + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT . If the association execution doesn't run + // successfully, the association is NON-COMPLIANT . + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API + // operation. In this case, compliance data isn't managed by State Manager, a tool + // in Amazon Web Services Systems Manager. It is managed by your direct call to the + // PutComplianceItemsAPI operation. + // + // By default, all associations use AUTO mode. + SyncCompliance AssociationSyncCompliance + + // The combination of Amazon Web Services Regions and Amazon Web Services accounts + // where you want to run the association. + TargetLocations []TargetLocation + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The managed nodes targeted by the request. + Targets []Target + + // The CloudWatch alarm that was invoked during the association. + TriggeredAlarms []AlarmStateInformation + + noSmithyDocumentSerde +} + +// Includes information about the specified association. +type AssociationExecution struct { + + // The details for the CloudWatch alarm you want to apply to an automation or + // command. + AlarmConfiguration *AlarmConfiguration + + // The association ID. + AssociationId *string + + // The association version. + AssociationVersion *string + + // The time the execution started. + CreatedTime *time.Time + + // Detailed status information about the execution. + DetailedStatus *string + + // The execution ID for the association. + ExecutionId *string + + // The date of the last execution. + LastExecutionDate *time.Time + + // An aggregate status of the resources in the execution based on the status type. + ResourceCountByStatus *string + + // The status of the association execution. + Status *string + + // The CloudWatch alarms that were invoked by the association. + TriggeredAlarms []AlarmStateInformation + + noSmithyDocumentSerde +} + +// Filters used in the request. +type AssociationExecutionFilter struct { + + // The key value used in the request. + // + // This member is required. + Key AssociationExecutionFilterKey + + // The filter type specified in the request. + // + // This member is required. + Type AssociationFilterOperatorType + + // The value specified for the key. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Includes information about the specified association execution. +type AssociationExecutionTarget struct { + + // The association ID. + AssociationId *string + + // The association version. + AssociationVersion *string + + // Detailed information about the execution status. + DetailedStatus *string + + // The execution ID. + ExecutionId *string + + // The date of the last execution. + LastExecutionDate *time.Time + + // The location where the association details are saved. + OutputSource *OutputSource + + // The resource ID, for example, the managed node ID where the association ran. + ResourceId *string + + // The resource type, for example, EC2. + ResourceType *string + + // The association execution status. + Status *string + + noSmithyDocumentSerde +} + +// Filters for the association execution. +type AssociationExecutionTargetsFilter struct { + + // The key value used in the request. + // + // This member is required. + Key AssociationExecutionTargetsFilterKey + + // The value specified for the key. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Describes a filter. +type AssociationFilter struct { + + // The name of the filter. + // + // InstanceId has been deprecated. + // + // This member is required. + Key AssociationFilterKey + + // The filter value. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Information about the association. +type AssociationOverview struct { + + // Returns the number of targets for the association status. For example, if you + // created an association with two managed nodes, and one of them was successful, + // this would return the count of managed nodes by status. + AssociationStatusAggregatedCount map[string]int32 + + // A detailed status of the association. + DetailedStatus *string + + // The status of the association. Status can be: Pending, Success, or Failed. + Status *string + + noSmithyDocumentSerde +} + +// Describes an association status. +type AssociationStatus struct { + + // The date when the status changed. + // + // This member is required. + Date *time.Time + + // The reason for the status. + // + // This member is required. + Message *string + + // The status. + // + // This member is required. + Name AssociationStatusName + + // A user-defined string. + AdditionalInfo *string + + noSmithyDocumentSerde +} + +// Information about the association version. +type AssociationVersionInfo struct { + + // By default, when you create new associations, the system runs it immediately + // after it is created and then according to the schedule you specified. Specify + // this option if you don't want an association to run immediately after you create + // it. This parameter isn't supported for rate expressions. + ApplyOnlyAtCronInterval bool + + // A role used by association to take actions on your behalf. State Manager will + // assume this role and call required APIs when dispatching configurations to + // nodes. If not specified, [service-linked role for Systems Manager]will be used by default. + // + // [service-linked role for Systems Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html + AssociationDispatchAssumeRole *string + + // The ID created by the system when the association was created. + AssociationId *string + + // The name specified for the association version when the association version was + // created. + AssociationName *string + + // The association version. + AssociationVersion *string + + // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents + // your associations are gated under. The associations for this version only run + // when that Change Calendar is open. For more information, see [Amazon Web Services Systems Manager Change Calendar]in the Amazon Web + // Services Systems Manager User Guide. + // + // [Amazon Web Services Systems Manager Change Calendar]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar + CalendarNames []string + + // The severity level that is assigned to the association. + ComplianceSeverity AssociationComplianceSeverity + + // The date the association version was created. + CreatedDate *time.Time + + // The version of an Amazon Web Services Systems Manager document (SSM document) + // used when the association version was created. + DocumentVersion *string + + // The number of hours that an association can run on specified targets. After the + // resulting cutoff time passes, associations that are currently running are + // cancelled, and no pending executions are started on remaining targets. + Duration *int32 + + // The maximum number of targets allowed to run the association at the same time. + // You can specify a number, for example 10, or a percentage of the target set, for + // example 10%. The default value is 100%, which means all targets run the + // association at the same time. + // + // If a new managed node starts and attempts to run an association while Systems + // Manager is running MaxConcurrency associations, the association is allowed to + // run. During the next association interval, the new managed node will process its + // association within the limit specified for MaxConcurrency . + MaxConcurrency *string + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for example + // 10%. If you specify 3, for example, the system stops sending requests when the + // fourth error is received. If you specify 0, then the system stops sending + // requests after the first error is returned. If you run an association on 50 + // managed nodes and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If you + // need to ensure that there won't be more than max-errors failed executions, set + // MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string + + // The name specified when the association was created. + Name *string + + // The location in Amazon S3 specified for the association when the association + // version was created. + OutputLocation *InstanceAssociationOutputLocation + + // Parameters specified when the association version was created. + Parameters map[string][]string + + // The cron or rate schedule specified for the association when the association + // version was created. + ScheduleExpression *string + + // Number of days to wait after the scheduled day to run an association. + ScheduleOffset *int32 + + // The mode for generating association compliance. You can specify AUTO or MANUAL . + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT . If the association execution doesn't run + // successfully, the association is NON-COMPLIANT . + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API + // operation. In this case, compliance data isn't managed by State Manager, a tool + // in Amazon Web Services Systems Manager. It is managed by your direct call to the + // PutComplianceItemsAPI operation. + // + // By default, all associations use AUTO mode. + SyncCompliance AssociationSyncCompliance + + // The combination of Amazon Web Services Regions and Amazon Web Services accounts + // where you wanted to run the association when this association version was + // created. + TargetLocations []TargetLocation + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The targets specified for the association when the association version was + // created. + Targets []Target + + noSmithyDocumentSerde +} + +// A structure that includes attributes that describe a document attachment. +type AttachmentContent struct { + + // The cryptographic hash value of the document content. + Hash *string + + // The hash algorithm used to calculate the hash value. + HashType AttachmentHashType + + // The name of an attachment. + Name *string + + // The size of an attachment in bytes. + Size int64 + + // The URL location of the attachment content. + Url *string + + noSmithyDocumentSerde +} + +// An attribute of an attachment, such as the attachment name. +type AttachmentInformation struct { + + // The name of the attachment. + Name *string + + noSmithyDocumentSerde +} + +// Identifying information about a document attachment, including the file name +// and a key-value pair that identifies the location of an attachment to a +// document. +type AttachmentsSource struct { + + // The key of a key-value pair that identifies the location of an attachment to a + // document. + Key AttachmentsSourceKey + + // The name of the document attachment file. + Name *string + + // The value of a key-value pair that identifies the location of an attachment to + // a document. The format for Value depends on the type of key you specify. + // + // - For the key SourceUrl, the value is an S3 bucket location. For example: + // + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix" ] + // + // - For the key S3FileUrl, the value is a file in an S3 bucket. For example: + // + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix/my-file.py" ] + // + // - For the key AttachmentReference, the value is constructed from the name of + // another SSM document in your account, a version number of that document, and a + // file attached to that document version that you want to reuse. For example: + // + // "Values": [ "MyOtherDocument/3/my-other-file.py" ] + // + // However, if the SSM document is shared with you from another account, the full + // SSM document ARN must be specified instead of the document name only. For + // example: + // + // "Values": [ + // "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py" + // ] + Values []string + + noSmithyDocumentSerde +} + +// Detailed information about the current state of an individual Automation +// execution. +type AutomationExecution struct { + + // The details for the CloudWatch alarm applied to your automation. + AlarmConfiguration *AlarmConfiguration + + // The ID of a State Manager association used in the Automation operation. + AssociationId *string + + // The execution ID. + AutomationExecutionId *string + + // The execution status of the Automation. + AutomationExecutionStatus AutomationExecutionStatus + + // The subtype of the Automation operation. Currently, the only supported value is + // ChangeRequest . + AutomationSubtype AutomationSubtype + + // The name of the Change Manager change request. + ChangeRequestName *string + + // The action of the step that is currently running. + CurrentAction *string + + // The name of the step that is currently running. + CurrentStepName *string + + // The name of the Automation runbook used during the execution. + DocumentName *string + + // The version of the document to use during execution. + DocumentVersion *string + + // The Amazon Resource Name (ARN) of the user who ran the automation. + ExecutedBy *string + + // The time the execution finished. + ExecutionEndTime *time.Time + + // The time the execution started. + ExecutionStartTime *time.Time + + // A message describing why an execution has failed, if the status is set to + // Failed. + FailureMessage *string + + // The MaxConcurrency value specified by the user when the execution started. + MaxConcurrency *string + + // The MaxErrors value specified by the user when the execution started. + MaxErrors *string + + // The automation execution mode. + Mode ExecutionMode + + // The ID of an OpsItem that is created to represent a Change Manager change + // request. + OpsItemId *string + + // The list of execution outputs as defined in the Automation runbook. + Outputs map[string][]string + + // The key-value map of execution parameters, which were supplied when calling StartAutomationExecution. + Parameters map[string][]string + + // The AutomationExecutionId of the parent automation. + ParentAutomationExecutionId *string + + // An aggregate of step execution statuses displayed in the Amazon Web Services + // Systems Manager console for a multi-Region and multi-account Automation + // execution. + ProgressCounters *ProgressCounters + + // A list of resolved targets in the rate control execution. + ResolvedTargets *ResolvedTargets + + // Information about the Automation runbooks that are run as part of a runbook + // workflow. + // + // The Automation runbooks specified for the runbook workflow can't run until all + // required approvals for the change request have been received. + Runbooks []Runbook + + // The date and time the Automation operation is scheduled to start. + ScheduledTime *time.Time + + // A list of details about the current state of all steps that comprise an + // execution. An Automation runbook contains a list of steps that are run in order. + StepExecutions []StepExecution + + // A boolean value that indicates if the response contains the full list of the + // Automation step executions. If true, use the DescribeAutomationStepExecutions + // API operation to get the full list of step executions. + StepExecutionsTruncated bool + + // The target of the execution. + Target *string + + // The combination of Amazon Web Services Regions and/or Amazon Web Services + // accounts where you want to run the Automation. + TargetLocations []TargetLocation + + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + + // The specified key-value mapping of document parameters to target resources. + TargetMaps []map[string][]string + + // The parameter name. + TargetParameterName *string + + // The specified targets. + Targets []Target + + // The CloudWatch alarm that was invoked by the automation. + TriggeredAlarms []AlarmStateInformation + + // Variables defined for the automation. + Variables map[string][]string + + noSmithyDocumentSerde +} + +// A filter used to match specific automation executions. This is used to limit +// the scope of Automation execution information returned. +type AutomationExecutionFilter struct { + + // One or more keys to limit the results. + // + // This member is required. + Key AutomationExecutionFilterKey + + // The values used to limit the execution information associated with the filter's + // key. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Information about the optional inputs that can be specified for an automation +// execution preview. +type AutomationExecutionInputs struct { + + // Information about parameters that can be specified for the preview operation. + Parameters map[string][]string + + // Information about the Amazon Web Services Regions and Amazon Web Services + // accounts targeted by the Automation execution preview operation. + TargetLocations []TargetLocation + + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported. + TargetLocationsURL *string + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The name of the parameter used as the target resource for the rate-controlled + // execution. Required if you specify targets. + TargetParameterName *string + + // Information about the resources that would be included in the actual runbook + // execution, if it were to be run. Both Targets and TargetMaps can't be specified + // together. + Targets []Target + + noSmithyDocumentSerde +} + +// Details about a specific Automation execution. +type AutomationExecutionMetadata struct { + + // The details for the CloudWatch alarm applied to your automation. + AlarmConfiguration *AlarmConfiguration + + // The ID of a State Manager association used in the Automation operation. + AssociationId *string + + // The execution ID. + AutomationExecutionId *string + + // The status of the execution. + AutomationExecutionStatus AutomationExecutionStatus + + // The subtype of the Automation operation. Currently, the only supported value is + // ChangeRequest . + AutomationSubtype AutomationSubtype + + // Use this filter with DescribeAutomationExecutions. Specify either Local or CrossAccount. CrossAccount is an + // Automation that runs in multiple Amazon Web Services Regions and Amazon Web + // Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems + // Manager User Guide. + // + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + AutomationType AutomationType + + // The name of the Change Manager change request. + ChangeRequestName *string + + // The action of the step that is currently running. + CurrentAction *string + + // The name of the step that is currently running. + CurrentStepName *string + + // The name of the Automation runbook used during execution. + DocumentName *string + + // The document version used during the execution. + DocumentVersion *string + + // The IAM role ARN of the user who ran the automation. + ExecutedBy *string + + // The time the execution finished. This isn't populated if the execution is still + // in progress. + ExecutionEndTime *time.Time + + // The time the execution started. + ExecutionStartTime *time.Time + + // The list of execution outputs as defined in the Automation runbook. + FailureMessage *string + + // An S3 bucket where execution information is stored. + LogFile *string + + // The MaxConcurrency value specified by the user when starting the automation. + MaxConcurrency *string + + // The MaxErrors value specified by the user when starting the automation. + MaxErrors *string + + // The Automation execution mode. + Mode ExecutionMode + + // The ID of an OpsItem that is created to represent a Change Manager change + // request. + OpsItemId *string + + // The list of execution outputs as defined in the Automation runbook. + Outputs map[string][]string + + // The execution ID of the parent automation. + ParentAutomationExecutionId *string + + // A list of targets that resolved during the execution. + ResolvedTargets *ResolvedTargets + + // Information about the Automation runbooks that are run during a runbook + // workflow in Change Manager. + // + // The Automation runbooks specified for the runbook workflow can't run until all + // required approvals for the change request have been received. + Runbooks []Runbook + + // The date and time the Automation operation is scheduled to start. + ScheduledTime *time.Time + + // The list of execution outputs as defined in the Automation runbook. + Target *string + + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + + // The specified key-value mapping of document parameters to target resources. + TargetMaps []map[string][]string + + // The list of execution outputs as defined in the Automation runbook. + TargetParameterName *string + + // The targets defined by the user when starting the automation. + Targets []Target + + // The CloudWatch alarm that was invoked by the automation. + TriggeredAlarms []AlarmStateInformation + + noSmithyDocumentSerde +} + +// Information about the results of the execution preview. +type AutomationExecutionPreview struct { + + // Information about the Amazon Web Services Regions targeted by the execution + // preview. + Regions []string + + // Information about the type of impact a runbook step would have on a resource. + // + // - Mutating : The runbook step would make changes to the targets through + // actions that create, modify, or delete resources. + // + // - Non_Mutating : The runbook step would retrieve data about resources but not + // make changes to them. This category generally includes Describe* , List* , + // Get* , and similar read-only API actions. + // + // - Undetermined : An undetermined step invokes executions performed by another + // orchestration service like Lambda, Step Functions, or Amazon Web Services + // Systems Manager Run Command. An undetermined step might also call a third-party + // API. Systems Manager Automation doesn't know the outcome of the orchestration + // processes or third-party API executions, so the results of the steps are + // undetermined. + StepPreviews map[string]int32 + + // Information that provides a preview of what the impact of running the specified + // Automation runbook would be. + TargetPreviews []TargetPreview + + // Information about the Amazon Web Services accounts that were included in the + // execution preview. + TotalAccounts int32 + + noSmithyDocumentSerde +} + +// Defines the basic information about a patch baseline override. +type BaselineOverride struct { + + // A set of rules defining the approval rules for a patch baseline. + ApprovalRules *PatchRuleGroup + + // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + ApprovedPatches []string + + // Defines the compliance level for approved patches. When an approved patch is + // reported as missing, this value describes the severity of the compliance + // violation. + ApprovedPatchesComplianceLevel PatchComplianceLevel + + // Indicates whether the list of approved patches includes non-security updates + // that should be applied to the managed nodes. The default value is false . + // Applies to Linux managed nodes only. + ApprovedPatchesEnableNonSecurity bool + + // Indicates whether managed nodes for which there are available security-related + // patches that have not been approved by the baseline are being defined as + // COMPLIANT or NON_COMPLIANT . This option is specified when the + // CreatePatchBaseline or UpdatePatchBaseline commands are run. + // + // Applies to Windows Server managed nodes only. + AvailableSecurityUpdatesComplianceStatus PatchComplianceStatus + + // A set of patch filters, typically used for approval rules. + GlobalFilters *PatchFilterGroup + + // The operating system rule used by the patch baseline override. + OperatingSystem OperatingSystem + + // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + RejectedPatches []string + + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. A patch can be allowed only if it is a dependency of another package, or + // blocked entirely along with packages that include it as a dependency. + RejectedPatchesAction PatchAction + + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. + Sources []PatchSource + + noSmithyDocumentSerde +} + +// Configuration options for sending command output to Amazon CloudWatch Logs. +type CloudWatchOutputConfig struct { + + // The name of the CloudWatch Logs log group where you want to send command + // output. If you don't specify a group name, Amazon Web Services Systems Manager + // automatically creates a log group for you. The log group uses the following + // naming format: + // + // aws/ssm/SystemsManagerDocumentName + CloudWatchLogGroupName *string + + // Enables Systems Manager to send command output to CloudWatch Logs. + CloudWatchOutputEnabled bool + + noSmithyDocumentSerde +} + +// Describes a command request. +type Command struct { + + // The details for the CloudWatch alarm applied to your command. + AlarmConfiguration *AlarmConfiguration + + // Amazon CloudWatch Logs information where you want Amazon Web Services Systems + // Manager to send the command output. + CloudWatchOutputConfig *CloudWatchOutputConfig + + // A unique identifier for this command. + CommandId *string + + // User-specified information about the command, such as a brief description of + // what the command should do. + Comment *string + + // The number of targets for which the command invocation reached a terminal + // state. Terminal states include the following: Success, Failed, Execution Timed + // Out, Delivery Timed Out, Cancelled, Terminated, or Undeliverable. + CompletedCount int32 + + // The number of targets for which the status is Delivery Timed Out. + DeliveryTimedOutCount int32 + + // The name of the document requested for execution. + DocumentName *string + + // The Systems Manager document (SSM document) version. + DocumentVersion *string + + // The number of targets for which the status is Failed or Execution Timed Out. + ErrorCount int32 + + // If a command expires, it changes status to DeliveryTimedOut for all invocations + // that have the status InProgress , Pending , or Delayed . ExpiresAfter is + // calculated based on the total timeout for the overall command. For more + // information, see [Understanding command timeout values]in the Amazon Web Services Systems Manager User Guide. + // + // [Understanding command timeout values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html?icmpid=docs_ec2_console#monitor-about-status-timeouts + ExpiresAfter *time.Time + + // The managed node IDs against which this command was requested. + InstanceIds []string + + // The maximum number of managed nodes that are allowed to run the command at the + // same time. You can specify a number of managed nodes, such as 10, or a + // percentage of nodes, such as 10%. The default value is 50. For more information + // about how to use MaxConcurrency , see [Amazon Web Services Systems Manager Run Command] in the Amazon Web Services Systems + // Manager User Guide. + // + // [Amazon Web Services Systems Manager Run Command]: https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html + MaxConcurrency *string + + // The maximum number of errors allowed before the system stops sending the + // command to additional targets. You can specify a number of errors, such as 10, + // or a percentage or errors, such as 10%. The default value is 0 . For more + // information about how to use MaxErrors , see [Amazon Web Services Systems Manager Run Command] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Amazon Web Services Systems Manager Run Command]: https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html + MaxErrors *string + + // Configurations for sending notifications about command status changes. + NotificationConfig *NotificationConfig + + // The S3 bucket where the responses to the command executions should be stored. + // This was requested when issuing the command. + OutputS3BucketName *string + + // The S3 directory path inside the bucket where the responses to the command + // executions should be stored. This was requested when issuing the command. + OutputS3KeyPrefix *string + + // (Deprecated) You can no longer specify this parameter. The system ignores it. + // Instead, Systems Manager automatically determines the Amazon Web Services Region + // of the S3 bucket. + OutputS3Region *string + + // The parameter values to be inserted in the document when running the command. + Parameters map[string][]string + + // The date and time the command was requested. + RequestedDateTime *time.Time + + // The Identity and Access Management (IAM) service role that Run Command, a tool + // in Amazon Web Services Systems Manager, uses to act on your behalf when sending + // notifications about command status changes. + ServiceRole *string + + // The status of the command. + Status CommandStatus + + // A detailed status of the command execution. StatusDetails includes more + // information than Status because it includes states resulting from error and + // concurrency control parameters. StatusDetails can show different results than + // Status. For more information about these statuses, see [Understanding command statuses]in the Amazon Web + // Services Systems Manager User Guide. StatusDetails can be one of the following + // values: + // + // - Pending: The command hasn't been sent to any managed nodes. + // + // - In Progress: The command has been sent to at least one managed node but + // hasn't reached a final state on all managed nodes. + // + // - Success: The command successfully ran on all invocations. This is a + // terminal state. + // + // - Delivery Timed Out: The value of MaxErrors or more command invocations + // shows a status of Delivery Timed Out. This is a terminal state. + // + // - Execution Timed Out: The value of MaxErrors or more command invocations + // shows a status of Execution Timed Out. This is a terminal state. + // + // - Failed: The value of MaxErrors or more command invocations shows a status + // of Failed. This is a terminal state. + // + // - Incomplete: The command was attempted on all managed nodes and one or more + // invocations doesn't have a value of Success but not enough invocations failed + // for the status to be Failed. This is a terminal state. + // + // - Cancelled: The command was terminated before it was completed. This is a + // terminal state. + // + // - Rate Exceeded: The number of managed nodes targeted by the command exceeded + // the account limit for pending invocations. The system has canceled the command + // before running it on any managed node. This is a terminal state. + // + // - Delayed: The system attempted to send the command to the managed node but + // wasn't successful. The system retries again. + // + // [Understanding command statuses]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html + StatusDetails *string + + // The number of targets for the command. + TargetCount int32 + + // An array of search criteria that targets managed nodes using a Key,Value + // combination that you specify. Targets is required if you don't provide one or + // more managed node IDs in the call. + Targets []Target + + // The TimeoutSeconds value specified for a command. + TimeoutSeconds *int32 + + // The CloudWatch alarm that was invoked by the command. + TriggeredAlarms []AlarmStateInformation + + noSmithyDocumentSerde +} + +// Describes a command filter. +// +// A managed node ID can't be specified when a command status is Pending because +// the command hasn't run on the node yet. +type CommandFilter struct { + + // The name of the filter. + // + // The ExecutionStage filter can't be used with the ListCommandInvocations + // operation, only with ListCommands . + // + // This member is required. + Key CommandFilterKey + + // The filter value. Valid values for each filter key are as follows: + // + // - InvokedAfter: Specify a timestamp to limit your results. For example, + // specify 2024-07-07T00:00:00Z to see a list of command executions occurring + // July 7, 2021, and later. + // + // - InvokedBefore: Specify a timestamp to limit your results. For example, + // specify 2024-07-07T00:00:00Z to see a list of command executions from before + // July 7, 2021. + // + // - Status: Specify a valid command status to see a list of all command + // executions with that status. The status choices depend on the API you call. + // + // The status values you can specify for ListCommands are: + // + // - Pending + // + // - InProgress + // + // - Success + // + // - Cancelled + // + // - Failed + // + // - TimedOut (this includes both Delivery and Execution time outs) + // + // - AccessDenied + // + // - DeliveryTimedOut + // + // - ExecutionTimedOut + // + // - Incomplete + // + // - NoInstancesInTag + // + // - LimitExceeded + // + // The status values you can specify for ListCommandInvocations are: + // + // - Pending + // + // - InProgress + // + // - Delayed + // + // - Success + // + // - Cancelled + // + // - Failed + // + // - TimedOut (this includes both Delivery and Execution time outs) + // + // - AccessDenied + // + // - DeliveryTimedOut + // + // - ExecutionTimedOut + // + // - Undeliverable + // + // - InvalidPlatform + // + // - Terminated + // + // - DocumentName: Specify name of the Amazon Web Services Systems Manager + // document (SSM document) for which you want to see command execution results. For + // example, specify AWS-RunPatchBaseline to see command executions that used this + // SSM document to perform security patching operations on managed nodes. + // + // - ExecutionStage: Specify one of the following values ( ListCommands + // operations only): + // + // - Executing : Returns a list of command executions that are currently still + // running. + // + // - Complete : Returns a list of command executions that have already completed. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// An invocation is a copy of a command sent to a specific managed node. A command +// can apply to one or more managed nodes. A command invocation applies to one +// managed node. For example, if a user runs SendCommand against three managed +// nodes, then a command invocation is created for each requested managed node ID. +// A command invocation returns status and detail information about a command you +// ran. +type CommandInvocation struct { + + // Amazon CloudWatch Logs information where you want Amazon Web Services Systems + // Manager to send the command output. + CloudWatchOutputConfig *CloudWatchOutputConfig + + // The command against which this invocation was requested. + CommandId *string + + // Plugins processed by the command. + CommandPlugins []CommandPlugin + + // User-specified information about the command, such as a brief description of + // what the command should do. + Comment *string + + // The document name that was requested for execution. + DocumentName *string + + // The Systems Manager document (SSM document) version. + DocumentVersion *string + + // The managed node ID in which this invocation was requested. + InstanceId *string + + // The fully qualified host name of the managed node. + InstanceName *string + + // Configurations for sending notifications about command status changes on a per + // managed node basis. + NotificationConfig *NotificationConfig + + // The time and date the request was sent to this managed node. + RequestedDateTime *time.Time + + // The Identity and Access Management (IAM) service role that Run Command, a tool + // in Amazon Web Services Systems Manager, uses to act on your behalf when sending + // notifications about command status changes on a per managed node basis. + ServiceRole *string + + // The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon + // S3), if the S3 bucket was defined for the parent command. For an invocation, + // StandardErrorUrl is populated if there is just one plugin defined for the + // command, and the S3 bucket was defined for the command. + StandardErrorUrl *string + + // The URL to the plugin's StdOut file in Amazon Simple Storage Service (Amazon + // S3), if the S3 bucket was defined for the parent command. For an invocation, + // StandardOutputUrl is populated if there is just one plugin defined for the + // command, and the S3 bucket was defined for the command. + StandardOutputUrl *string + + // Whether or not the invocation succeeded, failed, or is pending. + Status CommandInvocationStatus + + // A detailed status of the command execution for each invocation (each managed + // node targeted by the command). StatusDetails includes more information than + // Status because it includes states resulting from error and concurrency control + // parameters. StatusDetails can show different results than Status. For more + // information about these statuses, see [Understanding command statuses]in the Amazon Web Services Systems + // Manager User Guide. StatusDetails can be one of the following values: + // + // - Pending: The command hasn't been sent to the managed node. + // + // - In Progress: The command has been sent to the managed node but hasn't + // reached a terminal state. + // + // - Success: The execution of the command or plugin was successfully completed. + // This is a terminal state. + // + // - Delivery Timed Out: The command wasn't delivered to the managed node before + // the delivery timeout expired. Delivery timeouts don't count against the parent + // command's MaxErrors limit, but they do contribute to whether the parent + // command status is Success or Incomplete. This is a terminal state. + // + // - Execution Timed Out: Command execution started on the managed node, but the + // execution wasn't complete before the execution timeout expired. Execution + // timeouts count against the MaxErrors limit of the parent command. This is a + // terminal state. + // + // - Failed: The command wasn't successful on the managed node. For a plugin, + // this indicates that the result code wasn't zero. For a command invocation, this + // indicates that the result code for one or more plugins wasn't zero. Invocation + // failures count against the MaxErrors limit of the parent command. This is a + // terminal state. + // + // - Cancelled: The command was terminated before it was completed. This is a + // terminal state. + // + // - Undeliverable: The command can't be delivered to the managed node. The + // managed node might not exist or might not be responding. Undeliverable + // invocations don't count against the parent command's MaxErrors limit and don't + // contribute to whether the parent command status is Success or Incomplete. This + // is a terminal state. + // + // - Terminated: The parent command exceeded its MaxErrors limit and subsequent + // command invocations were canceled by the system. This is a terminal state. + // + // - Delayed: The system attempted to send the command to the managed node but + // wasn't successful. The system retries again. + // + // [Understanding command statuses]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html + StatusDetails *string + + // Gets the trace output sent by the agent. + TraceOutput *string + + noSmithyDocumentSerde +} + +// Describes plugin details. +type CommandPlugin struct { + + // The name of the plugin. Must be one of the following: aws:updateAgent , + // aws:domainjoin , aws:applications , aws:runPowerShellScript , aws:psmodule , + // aws:cloudWatch , aws:runShellScript , or aws:updateSSMAgent . + Name *string + + // Output of the plugin execution. + Output *string + + // The S3 bucket where the responses to the command executions should be stored. + // This was requested when issuing the command. For example, in the following + // response: + // + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript + // + // amzn-s3-demo-bucket is the name of the S3 bucket; + // + // my-prefix is the name of the S3 prefix; + // + // i-02573cafcfEXAMPLE is the managed node ID; + // + // awsrunShellScript is the name of the plugin. + OutputS3BucketName *string + + // The S3 directory path inside the bucket where the responses to the command + // executions should be stored. This was requested when issuing the command. For + // example, in the following response: + // + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript + // + // amzn-s3-demo-bucket is the name of the S3 bucket; + // + // my-prefix is the name of the S3 prefix; + // + // i-02573cafcfEXAMPLE is the managed node ID; + // + // awsrunShellScript is the name of the plugin. + OutputS3KeyPrefix *string + + // (Deprecated) You can no longer specify this parameter. The system ignores it. + // Instead, Amazon Web Services Systems Manager automatically determines the S3 + // bucket region. + OutputS3Region *string + + // A numeric response code generated after running the plugin. + ResponseCode int32 + + // The time the plugin stopped running. Could stop prematurely if, for example, a + // cancel command was sent. + ResponseFinishDateTime *time.Time + + // The time the plugin started running. + ResponseStartDateTime *time.Time + + // The URL for the complete text written by the plugin to stderr. If execution + // isn't yet complete, then this string is empty. + StandardErrorUrl *string + + // The URL for the complete text written by the plugin to stdout in Amazon S3. If + // the S3 bucket for the command wasn't specified, then this string is empty. + StandardOutputUrl *string + + // The status of this plugin. You can run a document with multiple plugins. + Status CommandPluginStatus + + // A detailed status of the plugin execution. StatusDetails includes more + // information than Status because it includes states resulting from error and + // concurrency control parameters. StatusDetails can show different results than + // Status. For more information about these statuses, see [Understanding command statuses]in the Amazon Web + // Services Systems Manager User Guide. StatusDetails can be one of the following + // values: + // + // - Pending: The command hasn't been sent to the managed node. + // + // - In Progress: The command has been sent to the managed node but hasn't + // reached a terminal state. + // + // - Success: The execution of the command or plugin was successfully completed. + // This is a terminal state. + // + // - Delivery Timed Out: The command wasn't delivered to the managed node before + // the delivery timeout expired. Delivery timeouts don't count against the parent + // command's MaxErrors limit, but they do contribute to whether the parent + // command status is Success or Incomplete. This is a terminal state. + // + // - Execution Timed Out: Command execution started on the managed node, but the + // execution wasn't complete before the execution timeout expired. Execution + // timeouts count against the MaxErrors limit of the parent command. This is a + // terminal state. + // + // - Failed: The command wasn't successful on the managed node. For a plugin, + // this indicates that the result code wasn't zero. For a command invocation, this + // indicates that the result code for one or more plugins wasn't zero. Invocation + // failures count against the MaxErrors limit of the parent command. This is a + // terminal state. + // + // - Cancelled: The command was terminated before it was completed. This is a + // terminal state. + // + // - Undeliverable: The command can't be delivered to the managed node. The + // managed node might not exist, or it might not be responding. Undeliverable + // invocations don't count against the parent command's MaxErrors limit, and they + // don't contribute to whether the parent command status is Success or Incomplete. + // This is a terminal state. + // + // - Terminated: The parent command exceeded its MaxErrors limit and subsequent + // command invocations were canceled by the system. This is a terminal state. + // + // [Understanding command statuses]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html + StatusDetails *string + + noSmithyDocumentSerde +} + +// A summary of the call execution that includes an execution ID, the type of +// execution (for example, Command ), and the date/time of the execution using a +// datetime object that is saved in the following format: yyyy-MM-dd'T'HH:mm:ss'Z' +type ComplianceExecutionSummary struct { + + // The time the execution ran as a datetime object that is saved in the following + // format: yyyy-MM-dd'T'HH:mm:ss'Z' + // + // For State Manager associations, this timestamp represents when the compliance + // status was captured and reported by the Systems Manager service, not when the + // underlying association was actually executed on the managed node. To track + // actual association execution times, use the DescribeAssociationExecutionTargetscommand or check the association + // execution history in the Systems Manager console. + // + // This member is required. + ExecutionTime *time.Time + + // An ID created by the system when PutComplianceItems was called. For example, + // CommandID is a valid execution ID. You can use this ID in subsequent calls. + ExecutionId *string + + // The type of execution. For example, Command is a valid execution type. + ExecutionType *string + + noSmithyDocumentSerde +} + +// Information about the compliance as defined by the resource type. For example, +// for a patch resource type, Items includes information about the PatchSeverity, +// Classification, and so on. +type ComplianceItem struct { + + // The compliance type. For example, Association (for a State Manager + // association), Patch, or Custom: string are all valid compliance types. + ComplianceType *string + + // A "Key": "Value" tag combination for the compliance item. + Details map[string]string + + // A summary for the compliance item. The summary includes an execution ID, the + // execution type (for example, command), and the execution time. + // + // For State Manager associations, the ExecutionTime value represents when the + // compliance status was captured and aggregated by the Systems Manager service, + // not necessarily when the underlying association was executed on the managed + // node. State Manager updates compliance status for all associations on an + // instance whenever any association executes, which means multiple associations + // may show the same execution time even if they were executed at different times. + ExecutionSummary *ComplianceExecutionSummary + + // An ID for the compliance item. For example, if the compliance item is a Windows + // patch, the ID could be the number of the KB article; for example: KB4010320. + Id *string + + // An ID for the resource. For a managed node, this is the node ID. + ResourceId *string + + // The type of resource. ManagedInstance is currently the only supported resource + // type. + ResourceType *string + + // The severity of the compliance status. Severity can be one of the following: + // Critical, High, Medium, Low, Informational, Unspecified. + Severity ComplianceSeverity + + // The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, + // or an empty string (for Windows patches that aren't applicable). + Status ComplianceStatus + + // A title for the compliance item. For example, if the compliance item is a + // Windows patch, the title could be the title of the KB article for the patch; for + // example: Security Update for Active Directory Federation Services. + Title *string + + noSmithyDocumentSerde +} + +// Information about a compliance item. +type ComplianceItemEntry struct { + + // The severity of the compliance status. Severity can be one of the following: + // Critical, High, Medium, Low, Informational, Unspecified. + // + // This member is required. + Severity ComplianceSeverity + + // The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT. + // + // This member is required. + Status ComplianceStatus + + // A "Key": "Value" tag combination for the compliance item. + Details map[string]string + + // The compliance item ID. For example, if the compliance item is a Windows patch, + // the ID could be the number of the KB article. + Id *string + + // The title of the compliance item. For example, if the compliance item is a + // Windows patch, the title could be the title of the KB article for the patch; for + // example: Security Update for Active Directory Federation Services. + Title *string + + noSmithyDocumentSerde +} + +// One or more filters. Use a filter to return a more specific list of results. +type ComplianceStringFilter struct { + + // The name of the filter. + Key *string + + // The type of comparison that should be performed for the value: Equal, NotEqual, + // BeginWith, LessThan, or GreaterThan. + Type ComplianceQueryOperatorType + + // The value for which to search. + Values []string + + noSmithyDocumentSerde +} + +// A summary of compliance information by compliance type. +type ComplianceSummaryItem struct { + + // The type of compliance item. For example, the compliance type can be + // Association, Patch, or Custom:string. + ComplianceType *string + + // A list of COMPLIANT items for the specified compliance type. + CompliantSummary *CompliantSummary + + // A list of NON_COMPLIANT items for the specified compliance type. + NonCompliantSummary *NonCompliantSummary + + noSmithyDocumentSerde +} + +// A summary of resources that are compliant. The summary is organized according +// to the resource count for each compliance type. +type CompliantSummary struct { + + // The total number of resources that are compliant. + CompliantCount int32 + + // A summary of the compliance severity by compliance type. + SeveritySummary *SeveritySummary + + noSmithyDocumentSerde +} + +// Describes the association of a Amazon Web Services Systems Manager document +// (SSM document) and a managed node. +type CreateAssociationBatchRequestEntry struct { + + // The name of the SSM document that contains the configuration information for + // the managed node. You can specify Command or Automation runbooks. + // + // You can specify Amazon Web Services-predefined documents, documents you + // created, or a document that is shared with you from another account. + // + // For SSM documents that are shared with you from other Amazon Web Services + // accounts, you must specify the complete SSM document ARN, in the following + // format: + // + // arn:aws:ssm:region:account-id:document/document-name + // + // For example: + // + // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document + // + // For Amazon Web Services-predefined documents and SSM documents you created in + // your account, you only need to specify the document name. For example, + // AWS-ApplyPatchBaseline or My-Document . + // + // This member is required. + Name *string + + // The details for the CloudWatch alarm you want to apply to an automation or + // command. + AlarmConfiguration *AlarmConfiguration + + // By default, when you create a new association, the system runs it immediately + // after it is created and then according to the schedule you specified and when + // target changes are detected. Specify true for ApplyOnlyAtCronInterval if you + // want the association to run only according to the schedule you specified. + // + // For more information, see [Understanding when associations are applied to resources] and [>About target updates with Automation runbooks] in the Amazon Web Services Systems Manager User + // Guide. + // + // This parameter isn't supported for rate expressions. + // + // [Understanding when associations are applied to resources]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling + // [>About target updates with Automation runbooks]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates + ApplyOnlyAtCronInterval bool + + // Specify a descriptive name for the association. + AssociationName *string + + // Specify the target for the association. This target is required for + // associations that use an Automation runbook and target resources by using rate + // controls. Automation is a tool in Amazon Web Services Systems Manager. + AutomationTargetParameterName *string + + // The names or Amazon Resource Names (ARNs) of the Change Calendar type documents + // your associations are gated under. The associations only run when that Change + // Calendar is open. For more information, see [Amazon Web Services Systems Manager Change Calendar]in the Amazon Web Services Systems + // Manager User Guide. + // + // [Amazon Web Services Systems Manager Change Calendar]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar + CalendarNames []string + + // The severity level to assign to the association. + ComplianceSeverity AssociationComplianceSeverity + + // The document version. + DocumentVersion *string + + // The number of hours the association can run before it is canceled. Duration + // applies to associations that are currently running, and any pending and in + // progress commands on all targets. If a target was taken offline for the + // association to run, it is made available again immediately, without a reboot. + // + // The Duration parameter applies only when both these conditions are true: + // + // - The association for which you specify a duration is cancelable according to + // the parameters of the SSM command document or Automation runbook associated with + // this execution. + // + // - The command specifies the [ApplyOnlyAtCronInterval]parameter, which means that the association + // doesn't run immediately after it is created, but only according to the specified + // schedule. + // + // [ApplyOnlyAtCronInterval]: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociationBatchRequestEntry.html#systemsmanager-Type-CreateAssociationBatchRequestEntry-ApplyOnlyAtCronInterval + Duration *int32 + + // The managed node ID. + // + // InstanceId has been deprecated. To specify a managed node ID for an + // association, use the Targets parameter. Requests that include the parameter + // InstanceID with Systems Manager documents (SSM documents) that use schema + // version 2.0 or later will fail. In addition, if you use the parameter InstanceId + // , you can't use the parameters AssociationName , DocumentVersion , MaxErrors , + // MaxConcurrency , OutputLocation , or ScheduleExpression . To use these + // parameters, you must use the Targets parameter. + InstanceId *string + + // The maximum number of targets allowed to run the association at the same time. + // You can specify a number, for example 10, or a percentage of the target set, for + // example 10%. The default value is 100%, which means all targets run the + // association at the same time. + // + // If a new managed node starts and attempts to run an association while Systems + // Manager is running MaxConcurrency associations, the association is allowed to + // run. During the next association interval, the new managed node will process its + // association within the limit specified for MaxConcurrency . + MaxConcurrency *string + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for example + // 10%. If you specify 3, for example, the system stops sending requests when the + // fourth error is received. If you specify 0, then the system stops sending + // requests after the first error is returned. If you run an association on 50 + // managed nodes and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If you + // need to ensure that there won't be more than max-errors failed executions, set + // MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string + + // An S3 bucket where you want to store the results of this request. + OutputLocation *InstanceAssociationOutputLocation + + // A description of the parameters for a document. + Parameters map[string][]string + + // A cron expression that specifies a schedule when the association runs. + ScheduleExpression *string + + // Number of days to wait after the scheduled day to run an association. + ScheduleOffset *int32 + + // The mode for generating association compliance. You can specify AUTO or MANUAL . + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT . If the association execution doesn't run + // successfully, the association is NON-COMPLIANT . + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API + // operation. In this case, compliance data isn't managed by State Manager, a tool + // in Amazon Web Services Systems Manager. It is managed by your direct call to the + // PutComplianceItemsAPI operation. + // + // By default, all associations use AUTO mode. + SyncCompliance AssociationSyncCompliance + + // Use this action to create an association in multiple Regions and multiple + // accounts. + TargetLocations []TargetLocation + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The managed nodes targeted by the request. + Targets []Target + + noSmithyDocumentSerde +} + +// The temporary security credentials, which include an access key ID, a secret +// access key, and a security (or session) token. +type Credentials struct { + + // The access key ID that identifies the temporary security credentials. + // + // This member is required. + AccessKeyId *string + + // The datetime on which the current credentials expire. + // + // This member is required. + ExpirationTime *time.Time + + // The secret access key that can be used to sign requests. + // + // This member is required. + SecretAccessKey *string + + // The token that users must pass to the service API to use the temporary + // credentials. + // + // This member is required. + SessionToken *string + + noSmithyDocumentSerde +} + +// Filter for the DescribeActivation API. +type DescribeActivationsFilter struct { + + // The name of the filter. + FilterKey DescribeActivationsFilterKeys + + // The filter values. + FilterValues []string + + noSmithyDocumentSerde +} + +// A default version of a document. +type DocumentDefaultVersionDescription struct { + + // The default version of the document. + DefaultVersion *string + + // The default version of the artifact associated with the document. + DefaultVersionName *string + + // The name of the document. + Name *string + + noSmithyDocumentSerde +} + +// Describes an Amazon Web Services Systems Manager document (SSM document). +type DocumentDescription struct { + + // The version of the document currently approved for use in the organization. + ApprovedVersion *string + + // Details about the document attachments, including names, locations, sizes, and + // so on. + AttachmentsInformation []AttachmentInformation + + // The user in your organization who created the document. + Author *string + + // The classification of a document to help you identify and categorize its use. + Category []string + + // The value that identifies a document's category. + CategoryEnum []string + + // The date when the document was created. + CreatedDate *time.Time + + // The default version. + DefaultVersion *string + + // A description of the document. + Description *string + + // The friendly name of the SSM document. This value can differ for each version + // of the document. If you want to update this value, see UpdateDocument. + DisplayName *string + + // The document format, either JSON or YAML. + DocumentFormat DocumentFormat + + // The type of document. + DocumentType DocumentType + + // The document version. + DocumentVersion *string + + // The Sha256 or Sha1 hash created by the system when the document was created. + // + // Sha1 hashes have been deprecated. + Hash *string + + // The hash type of the document. Valid values include Sha256 or Sha1 . + // + // Sha1 hashes have been deprecated. + HashType DocumentHashType + + // The latest version of the document. + LatestVersion *string + + // The name of the SSM document. + Name *string + + // The Amazon Web Services user that created the document. + Owner *string + + // A description of the parameters for a document. + Parameters []DocumentParameter + + // The version of the document that is currently under review. + PendingReviewVersion *string + + // The list of operating system (OS) platforms compatible with this SSM document. + PlatformTypes []PlatformType + + // A list of SSM documents required by a document. For example, an + // ApplicationConfiguration document requires an ApplicationConfigurationSchema + // document. + Requires []DocumentRequires + + // Details about the review of a document. + ReviewInformation []ReviewInformation + + // The current status of the review. + ReviewStatus ReviewStatus + + // The schema version. + SchemaVersion *string + + // The SHA1 hash of the document, which you can use for verification. + Sha1 *string + + // The status of the SSM document. + Status DocumentStatus + + // A message returned by Amazon Web Services Systems Manager that explains the + // Status value. For example, a Failed status might be explained by the + // StatusInformation message, "The specified S3 bucket doesn't exist. Verify that + // the URL of the S3 bucket is correct." + StatusInformation *string + + // The tags, or metadata, that have been applied to the document. + Tags []Tag + + // The target type which defines the kinds of resources the document can run on. + // For example, /AWS::EC2::Instance . For a list of valid resource types, see [Amazon Web Services resource and property types reference] in + // the CloudFormation User Guide. + // + // [Amazon Web Services resource and property types reference]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html + TargetType *string + + // The version of the artifact associated with the document. + VersionName *string + + noSmithyDocumentSerde +} + +// This data type is deprecated. Instead, use DocumentKeyValuesFilter. +type DocumentFilter struct { + + // The name of the filter. + // + // This member is required. + Key DocumentFilterKey + + // The value of the filter. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Describes the name of a SSM document. +type DocumentIdentifier struct { + + // The user in your organization who created the document. + Author *string + + // The date the SSM document was created. + CreatedDate *time.Time + + // An optional field where you can specify a friendly name for the SSM document. + // This value can differ for each version of the document. If you want to update + // this value, see UpdateDocument. + DisplayName *string + + // The document format, either JSON or YAML. + DocumentFormat DocumentFormat + + // The document type. + DocumentType DocumentType + + // The document version. + DocumentVersion *string + + // The name of the SSM document. + Name *string + + // The Amazon Web Services user that created the document. + Owner *string + + // The operating system platform. + PlatformTypes []PlatformType + + // A list of SSM documents required by a document. For example, an + // ApplicationConfiguration document requires an ApplicationConfigurationSchema + // document. + Requires []DocumentRequires + + // The current status of a document review. + ReviewStatus ReviewStatus + + // The schema version. + SchemaVersion *string + + // The tags, or metadata, that have been applied to the document. + Tags []Tag + + // The target type which defines the kinds of resources the document can run on. + // For example, /AWS::EC2::Instance . For a list of valid resource types, see [Amazon Web Services resource and property types reference] in + // the CloudFormation User Guide. + // + // [Amazon Web Services resource and property types reference]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html + TargetType *string + + // An optional field specifying the version of the artifact associated with the + // document. For example, 12.6. This value is unique across all versions of a + // document, and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +// One or more filters. Use a filter to return a more specific list of documents. +// +// For keys, you can specify one or more tags that have been applied to a +// document. +// +// You can also use Amazon Web Services-provided keys, some of which have specific +// allowed values. These keys and their associated values are as follows: +// +// DocumentType +// +// - ApplicationConfiguration +// +// - ApplicationConfigurationSchema +// +// - Automation +// +// - ChangeCalendar +// +// - Command +// +// - Package +// +// - Policy +// +// - Session +// +// Owner Note that only one Owner can be specified in a request. For example: +// Key=Owner,Values=Self . +// +// - Amazon +// +// - Private +// +// - Public +// +// - Self +// +// - ThirdParty +// +// PlatformTypes +// +// - Linux +// +// - Windows +// +// Name is another Amazon Web Services-provided key. If you use Name as a key, you +// can use a name prefix to return a list of documents. For example, in the Amazon +// Web Services CLI, to return a list of all documents that begin with Te , run the +// following command: +// +// aws ssm list-documents --filters Key=Name,Values=Te +// +// You can also use the TargetType Amazon Web Services-provided key. For a list of +// valid resource type values that can be used with this key, see [Amazon Web Services resource and property types reference]in the +// CloudFormation User Guide. +// +// If you specify more than two keys, only documents that are identified by all +// the tags are returned in the results. If you specify more than two values for a +// key, documents that are identified by any of the values are returned in the +// results. +// +// To specify a custom key-value pair, use the format +// Key=tag:tagName,Values=valueName . +// +// For example, if you created a key called region and are using the Amazon Web +// Services CLI to call the list-documents command: +// +// aws ssm list-documents --filters Key=tag:region,Values=east,west +// Key=Owner,Values=Self +// +// [Amazon Web Services resource and property types reference]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html +type DocumentKeyValuesFilter struct { + + // The name of the filter key. + Key *string + + // The value for the filter key. + Values []string + + noSmithyDocumentSerde +} + +// Details about the response to a document review request. +type DocumentMetadataResponseInfo struct { + + // Details about a reviewer's response to a document review request. + ReviewerResponse []DocumentReviewerResponseSource + + noSmithyDocumentSerde +} + +// Parameters specified in a Systems Manager document that run on the server when +// the command is run. +type DocumentParameter struct { + + // If specified, the default values for the parameters. Parameters without a + // default value are required. Parameters with a default value are optional. + DefaultValue *string + + // A description of what the parameter does, how to use it, the default value, and + // whether or not the parameter is optional. + Description *string + + // The name of the parameter. + Name *string + + // The type of parameter. The type can be either String or StringList. + Type DocumentParameterType + + noSmithyDocumentSerde +} + +// An SSM document required by the current document. +type DocumentRequires struct { + + // The name of the required SSM document. The name can be an Amazon Resource Name + // (ARN). + // + // This member is required. + Name *string + + // The document type of the required SSM document. + RequireType *string + + // The document version required by the current document. + Version *string + + // An optional field specifying the version of the artifact associated with the + // document. For example, 12.6. This value is unique across all versions of a + // document, and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +// Information about comments added to a document review request. +type DocumentReviewCommentSource struct { + + // The content of a comment entered by a user who requests a review of a new + // document version, or who reviews the new version. + Content *string + + // The type of information added to a review request. Currently, only the value + // Comment is supported. + Type DocumentReviewCommentType + + noSmithyDocumentSerde +} + +// Information about a reviewer's response to a document review request. +type DocumentReviewerResponseSource struct { + + // The comment entered by a reviewer as part of their document review response. + Comment []DocumentReviewCommentSource + + // The date and time that a reviewer entered a response to a document review + // request. + CreateTime *time.Time + + // The current review status of a new custom SSM document created by a member of + // your organization, or of the latest version of an existing SSM document. + // + // Only one version of a document can be in the APPROVED state at a time. When a + // new version is approved, the status of the previous version changes to REJECTED. + // + // Only one version of a document can be in review, or PENDING, at a time. + ReviewStatus ReviewStatus + + // The user in your organization assigned to review a document request. + Reviewer *string + + // The date and time that a reviewer last updated a response to a document review + // request. + UpdatedTime *time.Time + + noSmithyDocumentSerde +} + +// Information about a document approval review. +type DocumentReviews struct { + + // The action to take on a document approval review request. + // + // This member is required. + Action DocumentReviewAction + + // A comment entered by a user in your organization about the document review + // request. + Comment []DocumentReviewCommentSource + + noSmithyDocumentSerde +} + +// Version information about the document. +type DocumentVersionInfo struct { + + // The date the document was created. + CreatedDate *time.Time + + // The friendly name of the SSM document. This value can differ for each version + // of the document. If you want to update this value, see UpdateDocument. + DisplayName *string + + // The document format, either JSON or YAML. + DocumentFormat DocumentFormat + + // The document version. + DocumentVersion *string + + // An identifier for the default version of the document. + IsDefaultVersion bool + + // The document name. + Name *string + + // The current status of the approval review for the latest version of the + // document. + ReviewStatus ReviewStatus + + // The status of the SSM document, such as Creating , Active , Failed , and + // Deleting . + Status DocumentStatus + + // A message returned by Amazon Web Services Systems Manager that explains the + // Status value. For example, a Failed status might be explained by the + // StatusInformation message, "The specified S3 bucket doesn't exist. Verify that + // the URL of the S3 bucket is correct." + StatusInformation *string + + // The version of the artifact associated with the document. For example, 12.6. + // This value is unique across all versions of a document, and can't be changed. + VersionName *string + + noSmithyDocumentSerde +} + +// The EffectivePatch structure defines metadata about a patch along with the +// approval state of the patch in a particular patch baseline. The approval state +// includes information about whether the patch is currently approved, due to be +// approved by a rule, explicitly approved, or explicitly rejected and the date the +// patch was or will be approved. +type EffectivePatch struct { + + // Provides metadata for a patch, including information such as the KB ID, + // severity, classification and a URL for where more information can be obtained + // about the patch. + Patch *Patch + + // The status of the patch in a patch baseline. This includes information about + // whether the patch is currently approved, due to be approved by a rule, + // explicitly approved, or explicitly rejected and the date the patch was or will + // be approved. + PatchStatus *PatchStatus + + noSmithyDocumentSerde +} + +// Information about the inputs for an execution preview. +// +// The following types satisfy this interface: +// +// ExecutionInputsMemberAutomation +type ExecutionInputs interface { + isExecutionInputs() +} + +// Information about the optional inputs that can be specified for an automation +// execution preview. +type ExecutionInputsMemberAutomation struct { + Value AutomationExecutionInputs + + noSmithyDocumentSerde +} + +func (*ExecutionInputsMemberAutomation) isExecutionInputs() {} + +// Information about the changes that would be made if an execution were run. +// +// The following types satisfy this interface: +// +// ExecutionPreviewMemberAutomation +type ExecutionPreview interface { + isExecutionPreview() +} + +// Information about the changes that would be made if an Automation workflow were +// run. +type ExecutionPreviewMemberAutomation struct { + Value AutomationExecutionPreview + + noSmithyDocumentSerde +} + +func (*ExecutionPreviewMemberAutomation) isExecutionPreview() {} + +// Describes a failed association. +type FailedCreateAssociation struct { + + // The association. + Entry *CreateAssociationBatchRequestEntry + + // The source of the failure. + Fault Fault + + // A description of the failure. + Message *string + + noSmithyDocumentSerde +} + +// Information about an Automation failure. +type FailureDetails struct { + + // Detailed information about the Automation step failure. + Details map[string][]string + + // The stage of the Automation execution when the failure occurred. The stages + // include the following: InputValidation, PreVerification, Invocation, + // PostVerification. + FailureStage *string + + // The type of Automation failure. Failure types include the following: Action, + // Permission, Throttling, Verification, Internal. + FailureType *string + + noSmithyDocumentSerde +} + +// A resource policy helps you to define the IAM entity (for example, an Amazon +// Web Services account) that can manage your Systems Manager resources. Currently, +// OpsItemGroup is the only resource that supports Systems Manager resource +// policies. The resource policy for OpsItemGroup enables Amazon Web Services +// accounts to view and interact with OpsCenter operational work items (OpsItems). +type GetResourcePoliciesResponseEntry struct { + + // A resource policy helps you to define the IAM entity (for example, an Amazon + // Web Services account) that can manage your Systems Manager resources. Currently, + // OpsItemGroup is the only resource that supports Systems Manager resource + // policies. The resource policy for OpsItemGroup enables Amazon Web Services + // accounts to view and interact with OpsCenter operational work items (OpsItems). + Policy *string + + // ID of the current policy version. The hash helps to prevent a situation where + // multiple users attempt to overwrite a policy. You must provide this hash when + // updating or deleting a policy. + PolicyHash *string + + // A policy ID. + PolicyId *string + + noSmithyDocumentSerde +} + +// Status information about the aggregated associations. +type InstanceAggregatedAssociationOverview struct { + + // Detailed status information about the aggregated associations. + DetailedStatus *string + + // The number of associations for the managed nodes. + InstanceAssociationStatusAggregatedCount map[string]int32 + + noSmithyDocumentSerde +} + +// One or more association documents on the managed node. +type InstanceAssociation struct { + + // The association ID. + AssociationId *string + + // Version information for the association on the managed node. + AssociationVersion *string + + // The content of the association document for the managed nodes. + Content *string + + // The managed node ID. + InstanceId *string + + noSmithyDocumentSerde +} + +// An S3 bucket where you want to store the results of this request. +// +// For the minimal permissions required to enable Amazon S3 output for an +// association, see [Create an association (console)]in the Systems Manager User Guide. +// +// [Create an association (console)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-associations-creating.html#state-manager-associations-console +type InstanceAssociationOutputLocation struct { + + // An S3 bucket where you want to store the results of this request. + S3Location *S3OutputLocation + + noSmithyDocumentSerde +} + +// The URL of S3 bucket where you want to store the results of this request. +type InstanceAssociationOutputUrl struct { + + // The URL of S3 bucket where you want to store the results of this request. + S3OutputUrl *S3OutputUrl + + noSmithyDocumentSerde +} + +// Status information about the association. +type InstanceAssociationStatusInfo struct { + + // The association ID. + AssociationId *string + + // The name of the association applied to the managed node. + AssociationName *string + + // The version of the association applied to the managed node. + AssociationVersion *string + + // Detailed status information about the association. + DetailedStatus *string + + // The association document versions. + DocumentVersion *string + + // An error code returned by the request to create the association. + ErrorCode *string + + // The date the association ran. + ExecutionDate *time.Time + + // Summary information about association execution. + ExecutionSummary *string + + // The managed node ID where the association was created. + InstanceId *string + + // The name of the association. + Name *string + + // A URL for an S3 bucket where you want to store the results of this request. + OutputUrl *InstanceAssociationOutputUrl + + // Status information about the association. + Status *string + + noSmithyDocumentSerde +} + +// Details about a specific managed node. +type InstanceInfo struct { + + // The type of agent installed on the node. + AgentType *string + + // The version number of the agent installed on the node. + AgentVersion *string + + // The fully qualified host name of the managed node. + ComputerName *string + + // The current status of the managed node. + InstanceStatus *string + + // The IP address of the managed node. + IpAddress *string + + // Indicates whether the node is managed by Systems Manager. + ManagedStatus ManagedStatus + + // The name of the operating system platform running on your managed node. + PlatformName *string + + // The operating system platform type of the managed node. + PlatformType PlatformType + + // The version of the OS platform running on your managed node. + PlatformVersion *string + + // The type of instance, either an EC2 instance or another supported machine type + // in a hybrid fleet. + ResourceType ResourceType + + noSmithyDocumentSerde +} + +// Describes a filter for a specific list of managed nodes. +type InstanceInformation struct { + + // The activation ID created by Amazon Web Services Systems Manager when the + // server or virtual machine (VM) was registered. + ActivationId *string + + // The version of SSM Agent running on your Linux managed node. + AgentVersion *string + + // Information about the association. + AssociationOverview *InstanceAggregatedAssociationOverview + + // The status of the association. + AssociationStatus *string + + // The fully qualified host name of the managed node. + ComputerName *string + + // The IP address of the managed node. + IPAddress *string + + // The role assigned to an Amazon EC2 instance configured with a Systems Manager + // Quick Setup host management configuration or the role assigned to an on-premises + // managed node. + // + // This call doesn't return the IAM role for unmanaged Amazon EC2 instances + // (instances not configured for Systems Manager). To retrieve the role for an + // unmanaged instance, use the Amazon EC2 DescribeInstances operation. For + // information, see [DescribeInstances]in the Amazon EC2 API Reference or [describe-instances] in the Amazon Web Services + // CLI Command Reference. + // + // [DescribeInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html + // [describe-instances]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html + IamRole *string + + // The managed node ID. + InstanceId *string + + // Indicates whether the latest version of SSM Agent is running on your Linux + // managed node. This field doesn't indicate whether or not the latest version is + // installed on Windows managed nodes, because some older versions of Windows + // Server use the EC2Config service to process Systems Manager requests. + IsLatestVersion *bool + + // The date the association was last run. + LastAssociationExecutionDate *time.Time + + // The date and time when the agent last pinged the Systems Manager service. + LastPingDateTime *time.Time + + // The last date the association was successfully run. + LastSuccessfulAssociationExecutionDate *time.Time + + // The name assigned to an on-premises server, edge device, or virtual machine + // (VM) when it is activated as a Systems Manager managed node. The name is + // specified as the DefaultInstanceName property using the CreateActivation command. It is applied + // to the managed node by specifying the Activation Code and Activation ID when you + // install SSM Agent on the node, as explained in [How to install SSM Agent on hybrid Linux nodes]and [How to install SSM Agent on hybrid Windows Server nodes]. To retrieve the Name tag + // of an EC2 instance, use the Amazon EC2 DescribeInstances operation. For + // information, see [DescribeInstances]in the Amazon EC2 API Reference or [describe-instances] in the Amazon Web Services + // CLI Command Reference. + // + // [How to install SSM Agent on hybrid Linux nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-linux.html + // [How to install SSM Agent on hybrid Windows Server nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.html + // [DescribeInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html + // [describe-instances]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html + Name *string + + // Connection status of SSM Agent. + // + // The status Inactive has been deprecated and is no longer in use. + PingStatus PingStatus + + // The name of the operating system platform running on your managed node. + PlatformName *string + + // The operating system platform type. + PlatformType PlatformType + + // The version of the OS platform running on your managed node. + PlatformVersion *string + + // The date the server or VM was registered with Amazon Web Services as a managed + // node. + RegistrationDate *time.Time + + // The type of instance. Instances are either EC2 instances or managed instances. + ResourceType ResourceType + + // The ID of the source resource. For IoT Greengrass devices, SourceId is the + // Thing name. + SourceId *string + + // The type of the source resource. For IoT Greengrass devices, SourceType is + // AWS::IoT::Thing . + SourceType SourceType + + noSmithyDocumentSerde +} + +// Describes a filter for a specific list of managed nodes. You can filter node +// information by using tags. You specify tags by using a key-value mapping. +// +// Use this operation instead of the DescribeInstanceInformationRequest$InstanceInformationFilterList method. The InstanceInformationFilterList +// method is a legacy method and doesn't support tags. +type InstanceInformationFilter struct { + + // The name of the filter. + // + // This member is required. + Key InstanceInformationFilterKey + + // The filter values. + // + // This member is required. + ValueSet []string + + noSmithyDocumentSerde +} + +// The filters to describe or get information about your managed nodes. +type InstanceInformationStringFilter struct { + + // The filter key name to describe your managed nodes. + // + // Valid filter key values: ActivationIds | AgentVersion | AssociationStatus | + // IamRole | InstanceIds | PingStatus | PlatformType | ResourceType | SourceIds | + // SourceTypes | "tag-key" | "tag: {keyname} + // + // - Valid values for the AssociationStatus filter key: Success | Pending | Failed + // + // - Valid values for the PingStatus filter key: Online | ConnectionLost | + // Inactive (deprecated) + // + // - Valid values for the PlatformType filter key: Windows | Linux | MacOS + // + // - Valid values for the ResourceType filter key: EC2Instance | ManagedInstance + // + // - Valid values for the SourceType filter key: AWS::EC2::Instance | + // AWS::SSM::ManagedInstance | AWS::IoT::Thing + // + // - Valid tag examples: Key=tag-key,Values=Purpose | Key=tag:Purpose,Values=Test + // . + // + // This member is required. + Key *string + + // The filter values. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Defines the high-level patch compliance state for a managed node, providing +// information about the number of installed, missing, not applicable, and failed +// patches along with metadata about the operation when this information was +// gathered for the managed node. +type InstancePatchState struct { + + // The ID of the patch baseline used to patch the managed node. + // + // This member is required. + BaselineId *string + + // The ID of the managed node the high-level patch compliance information was + // collected for. + // + // This member is required. + InstanceId *string + + // The type of patching operation that was performed: or + // + // - SCAN assesses the patch compliance state. + // + // - INSTALL installs missing patches. + // + // This member is required. + Operation PatchOperationType + + // The time the most recent patching operation completed on the managed node. + // + // This member is required. + OperationEndTime *time.Time + + // The time the most recent patching operation was started on the managed node. + // + // This member is required. + OperationStartTime *time.Time + + // The name of the patch group the managed node belongs to. + // + // This member is required. + PatchGroup *string + + // The number of security-related patches that are available but not approved + // because they didn't meet the patch baseline requirements. For example, an + // updated version of a patch might have been released before the specified + // auto-approval period was over. + // + // Applies to Windows Server managed nodes only. + AvailableSecurityUpdateCount *int32 + + // The number of patches per node that are specified as Critical for compliance + // reporting in the patch baseline aren't installed. These patches might be + // missing, have failed installation, were rejected, or were installed but awaiting + // a required managed node reboot. The status of these managed nodes is + // NON_COMPLIANT . + CriticalNonCompliantCount *int32 + + // The number of patches from the patch baseline that were attempted to be + // installed during the last patching operation, but failed to install. + FailedCount int32 + + // An https URL or an Amazon Simple Storage Service (Amazon S3) path-style URL to + // a list of patches to be installed. This patch installation list, which you + // maintain in an S3 bucket in YAML format and specify in the SSM document + // AWS-RunPatchBaseline , overrides the patches specified by the default patch + // baseline. + // + // For more information about the InstallOverrideList parameter, see [SSM Command document for patching: AWS-RunPatchBaseline] + // AWS-RunPatchBaseline in the Amazon Web Services Systems Manager User Guide. + // + // [SSM Command document for patching: AWS-RunPatchBaseline]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html + InstallOverrideList *string + + // The number of patches from the patch baseline that are installed on the managed + // node. + InstalledCount int32 + + // The number of patches not specified in the patch baseline that are installed on + // the managed node. + InstalledOtherCount int32 + + // The number of patches installed by Patch Manager since the last time the + // managed node was rebooted. + InstalledPendingRebootCount *int32 + + // The number of patches installed on a managed node that are specified in a + // RejectedPatches list. Patches with a status of InstalledRejected were typically + // installed before they were added to a RejectedPatches list. + // + // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction , the + // value of InstalledRejectedCount will always be 0 (zero). + InstalledRejectedCount *int32 + + // The time of the last attempt to patch the managed node with NoReboot specified + // as the reboot option. + LastNoRebootInstallOperationTime *time.Time + + // The number of patches from the patch baseline that are applicable for the + // managed node but aren't currently installed. + MissingCount int32 + + // The number of patches from the patch baseline that aren't applicable for the + // managed node and therefore aren't installed on the node. This number may be + // truncated if the list of patch names is very large. The number of patches beyond + // this limit are reported in UnreportedNotApplicableCount . + NotApplicableCount int32 + + // The number of patches per node that are specified as other than Critical or + // Security but aren't compliant with the patch baseline. The status of these + // managed nodes is NON_COMPLIANT . + OtherNonCompliantCount *int32 + + // Placeholder information. This field will always be empty in the current release + // of the service. + OwnerInformation *string + + // Indicates the reboot option specified in the patch baseline. + // + // Reboot options apply to Install operations only. Reboots aren't attempted for + // Patch Manager Scan operations. + // + // - RebootIfNeeded : Patch Manager tries to reboot the managed node if it + // installed any patches, or if any patches are detected with a status of + // InstalledPendingReboot . + // + // - NoReboot : Patch Manager attempts to install missing packages without trying + // to reboot the system. Patches installed with this option are assigned a status + // of InstalledPendingReboot . These patches might not be in effect until a + // reboot is performed. + RebootOption RebootOption + + // The number of patches per node that are specified as Security in a patch + // advisory aren't installed. These patches might be missing, have failed + // installation, were rejected, or were installed but awaiting a required managed + // node reboot. The status of these managed nodes is NON_COMPLIANT . + SecurityNonCompliantCount *int32 + + // The ID of the patch baseline snapshot used during the patching operation when + // this compliance data was collected. + SnapshotId *string + + // The number of patches beyond the supported limit of NotApplicableCount that + // aren't reported by name to Inventory. Inventory is a tool in Amazon Web Services + // Systems Manager. + UnreportedNotApplicableCount *int32 + + noSmithyDocumentSerde +} + +// Defines a filter used in DescribeInstancePatchStatesForPatchGroup to scope down the information returned by the API. +// +// Example: To filter for all managed nodes in a patch group having more than +// three patches with a FailedCount status, use the following for the filter: +// +// - Value for Key : FailedCount +// +// - Value for Type : GreaterThan +// +// - Value for Values : 3 +type InstancePatchStateFilter struct { + + // The key for the filter. Supported values include the following: + // + // - InstalledCount + // + // - InstalledOtherCount + // + // - InstalledPendingRebootCount + // + // - InstalledRejectedCount + // + // - MissingCount + // + // - FailedCount + // + // - UnreportedNotApplicableCount + // + // - NotApplicableCount + // + // This member is required. + Key *string + + // The type of comparison that should be performed for the value. + // + // This member is required. + Type InstancePatchStateOperatorType + + // The value for the filter. Must be an integer greater than or equal to 0. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// An object containing various properties of a managed node. +type InstanceProperty struct { + + // The activation ID created by Systems Manager when the server or virtual machine + // (VM) was registered + ActivationId *string + + // The version of SSM Agent running on your managed node. + AgentVersion *string + + // The CPU architecture of the node. For example, x86_64 . + Architecture *string + + // Status information about the aggregated associations. + AssociationOverview *InstanceAggregatedAssociationOverview + + // The status of the State Manager association applied to the managed node. + AssociationStatus *string + + // The fully qualified host name of the managed node. + ComputerName *string + + // The public IPv4 address assigned to the node. If a public IPv4 address isn't + // assigned to the node, this value is blank. + IPAddress *string + + // The IAM role used in the hybrid activation to register the node with Systems + // Manager. + IamRole *string + + // The ID of the managed node. + InstanceId *string + + // The instance profile attached to the node. If an instance profile isn't + // attached to the node, this value is blank. + InstanceRole *string + + // The current state of the node. + InstanceState *string + + // The instance type of the managed node. For example, t3.large. + InstanceType *string + + // The name of the key pair associated with the node. If a key pair isnt't + // associated with the node, this value is blank. + KeyName *string + + // The date the association was last run. + LastAssociationExecutionDate *time.Time + + // The date and time when the SSM Agent last pinged the Systems Manager service. + LastPingDateTime *time.Time + + // The last date the association was successfully run. + LastSuccessfulAssociationExecutionDate *time.Time + + // The timestamp for when the node was launched. + LaunchTime *time.Time + + // The value of the EC2 Name tag associated with the node. If a Name tag hasn't + // been applied to the node, this value is blank. + Name *string + + // Connection status of the SSM Agent on the managed node. + PingStatus PingStatus + + // The name of the operating system platform running on your managed node. + PlatformName *string + + // The operating system platform type of the managed node. For example, Windows + // Server or Amazon Linux 2. + PlatformType PlatformType + + // The version of the OS platform running on your managed node. + PlatformVersion *string + + // The date the node was registered with Systems Manager. + RegistrationDate *time.Time + + // The type of managed node. + ResourceType *string + + // The ID of the source resource. + SourceId *string + + // The type of the source resource. + SourceType SourceType + + noSmithyDocumentSerde +} + +// Describes a filter for a specific list of managed nodes. You can filter node +// information by using tags. You specify tags by using a key-value mapping. +type InstancePropertyFilter struct { + + // The name of the filter. + // + // This member is required. + Key InstancePropertyFilterKey + + // The filter values. + // + // This member is required. + ValueSet []string + + noSmithyDocumentSerde +} + +// The filters to describe or get information about your managed nodes. +type InstancePropertyStringFilter struct { + + // The filter key name to describe your managed nodes. + // + // This member is required. + Key *string + + // The filter key name to describe your managed nodes. + // + // This member is required. + Values []string + + // The operator used by the filter call. + Operator InstancePropertyFilterOperator + + noSmithyDocumentSerde +} + +// Specifies the inventory type and attribute for the aggregation execution. +type InventoryAggregator struct { + + // Nested aggregators to further refine aggregation for an inventory type. + Aggregators []InventoryAggregator + + // The inventory type and attribute name for aggregation. + Expression *string + + // A user-defined set of one or more filters on which to aggregate inventory data. + // Groups return a count of resources that match and don't match the specified + // criteria. + Groups []InventoryGroup + + noSmithyDocumentSerde +} + +// Status information returned by the DeleteInventory operation. +type InventoryDeletionStatusItem struct { + + // The deletion ID returned by the DeleteInventory operation. + DeletionId *string + + // The UTC timestamp when the delete operation started. + DeletionStartTime *time.Time + + // Information about the delete operation. For more information about this + // summary, see [Understanding the delete inventory summary]in the Amazon Web Services Systems Manager User Guide. + // + // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory + DeletionSummary *InventoryDeletionSummary + + // The status of the operation. Possible values are InProgress and Complete. + LastStatus InventoryDeletionStatus + + // Information about the status. + LastStatusMessage *string + + // The UTC timestamp of when the last status report. + LastStatusUpdateTime *time.Time + + // The name of the inventory data type. + TypeName *string + + noSmithyDocumentSerde +} + +// Information about the delete operation. +type InventoryDeletionSummary struct { + + // Remaining number of items to delete. + RemainingCount int32 + + // A list of counts and versions for deleted items. + SummaryItems []InventoryDeletionSummaryItem + + // The total number of items to delete. This count doesn't change during the + // delete operation. + TotalCount int32 + + noSmithyDocumentSerde +} + +// Either a count, remaining count, or a version number in a delete inventory +// summary. +type InventoryDeletionSummaryItem struct { + + // A count of the number of deleted items. + Count int32 + + // The remaining number of items to delete. + RemainingCount int32 + + // The inventory type version. + Version *string + + noSmithyDocumentSerde +} + +// One or more filters. Use a filter to return a more specific list of results. +// +// Example formats for the aws ssm get-inventory command: +// +// --filters +// Key=AWS:InstanceInformation.AgentType,Values=amazon-ssm-agent,Type=Equal +// +// --filters Key=AWS:InstanceInformation.AgentVersion,Values=3.3.2299.0,Type=Equal +// +// --filters +// Key=AWS:InstanceInformation.ComputerName,Values=ip-192.0.2.0.us-east-2.compute.internal,Type=Equal +// +// --filters +// Key=AWS:InstanceInformation.InstanceId,Values=i-0a4cd6ceffEXAMPLE,i-1a2b3c4d5e6EXAMPLE,Type=Equal +// +// --filters Key=AWS:InstanceInformation.InstanceStatus,Values=Active,Type=Equal +// +// --filters Key=AWS:InstanceInformation.IpAddress,Values=198.51.100.0,Type=Equal +// +// --filters Key=AWS:InstanceInformation.PlatformName,Values="Amazon +// Linux",Type=Equal +// +// --filters Key=AWS:InstanceInformation.PlatformType,Values=Linux,Type=Equal +// +// --filters Key=AWS:InstanceInformation.PlatformVersion,Values=2023,Type=BeginWith +// +// --filters Key=AWS:InstanceInformation.ResourceType,Values=EC2Instance,Type=Equal +type InventoryFilter struct { + + // The name of the filter key. + // + // This member is required. + Key *string + + // Inventory filter values. + // + // This member is required. + Values []string + + // The type of filter. + // + // The Exists filter must be used with aggregators. For more information, see [Aggregating inventory data] in + // the Amazon Web Services Systems Manager User Guide. + // + // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-aggregate.html + Type InventoryQueryOperatorType + + noSmithyDocumentSerde +} + +// A user-defined set of one or more filters on which to aggregate inventory data. +// Groups return a count of resources that match and don't match the specified +// criteria. +type InventoryGroup struct { + + // Filters define the criteria for the group. The matchingCount field displays the + // number of resources that match the criteria. The notMatchingCount field + // displays the number of resources that don't match the criteria. + // + // This member is required. + Filters []InventoryFilter + + // The name of the group. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Information collected from managed nodes based on your inventory policy document +type InventoryItem struct { + + // The time the inventory information was collected. + // + // This member is required. + CaptureTime *string + + // The schema version for the inventory item. + // + // This member is required. + SchemaVersion *string + + // The name of the inventory type. Default inventory item type names start with AWS + // . Custom inventory type names will start with Custom. Default inventory item + // types include the following: AWS:AWSComponent , AWS:Application , + // AWS:InstanceInformation , AWS:Network , and AWS:WindowsUpdate . + // + // This member is required. + TypeName *string + + // The inventory data of the inventory type. + Content []map[string]string + + // MD5 hash of the inventory item type contents. The content hash is used to + // determine whether to update inventory information. The PutInventory API doesn't + // update the inventory item type contents if the MD5 hash hasn't changed since + // last update. + ContentHash *string + + // A map of associated properties for a specified inventory type. For example, + // with this attribute, you can specify the ExecutionId , ExecutionType , + // ComplianceType properties of the AWS:ComplianceItem type. + Context map[string]string + + noSmithyDocumentSerde +} + +// Attributes are the entries within the inventory item content. It contains name +// and value. +type InventoryItemAttribute struct { + + // The data type of the inventory item attribute. + // + // This member is required. + DataType InventoryAttributeDataType + + // Name of the inventory item attribute. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// The inventory item schema definition. Users can use this to compose inventory +// query filters. +type InventoryItemSchema struct { + + // The schema attributes for inventory. This contains data type and attribute name. + // + // This member is required. + Attributes []InventoryItemAttribute + + // The name of the inventory type. Default inventory item type names start with + // Amazon Web Services. Custom inventory type names will start with Custom. Default + // inventory item types include the following: AWS:AWSComponent , AWS:Application , + // AWS:InstanceInformation , AWS:Network , and AWS:WindowsUpdate . + // + // This member is required. + TypeName *string + + // The alias name of the inventory type. The alias name is used for display + // purposes. + DisplayName *string + + // The schema version for the inventory item. + Version *string + + noSmithyDocumentSerde +} + +// Inventory query results. +type InventoryResultEntity struct { + + // The data section in the inventory result entity JSON. + Data map[string]InventoryResultItem + + // ID of the inventory result entity. For example, for managed node inventory the + // result will be the managed node ID. For EC2 instance inventory, the result will + // be the instance ID. + Id *string + + noSmithyDocumentSerde +} + +// The inventory result item. +type InventoryResultItem struct { + + // Contains all the inventory data of the item type. Results include attribute + // names and values. + // + // This member is required. + Content []map[string]string + + // The schema version for the inventory result item/ + // + // This member is required. + SchemaVersion *string + + // The name of the inventory result item type. + // + // This member is required. + TypeName *string + + // The time inventory item data was captured. + CaptureTime *string + + // MD5 hash of the inventory item type contents. The content hash is used to + // determine whether to update inventory information. The PutInventory API doesn't + // update the inventory item type contents if the MD5 hash hasn't changed since + // last update. + ContentHash *string + + noSmithyDocumentSerde +} + +// Information about an Amazon Simple Storage Service (Amazon S3) bucket to write +// managed node-level logs to. +// +// LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service +// (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and +// OutputS3KeyPrefix options in the TaskInvocationParameters structure. For +// information about how Amazon Web Services Systems Manager handles these options +// for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +type LoggingInfo struct { + + // The name of an S3 bucket where execution logs are stored. + // + // This member is required. + S3BucketName *string + + // The Amazon Web Services Region where the S3 bucket is located. + // + // This member is required. + S3Region *string + + // (Optional) The S3 bucket subfolder. + S3KeyPrefix *string + + noSmithyDocumentSerde +} + +// The parameters for an AUTOMATION task type. +type MaintenanceWindowAutomationParameters struct { + + // The version of an Automation runbook to use during task execution. + DocumentVersion *string + + // The parameters for the AUTOMATION task. + // + // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask. + // + // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service + // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and + // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For + // information about how Amazon Web Services Systems Manager handles these options + // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + // + // For AUTOMATION task types, Amazon Web Services Systems Manager ignores any + // values specified for these parameters. + Parameters map[string][]string + + noSmithyDocumentSerde +} + +// Describes the information about an execution of a maintenance window. +type MaintenanceWindowExecution struct { + + // The time the execution finished. + EndTime *time.Time + + // The time the execution started. + StartTime *time.Time + + // The status of the execution. + Status MaintenanceWindowExecutionStatus + + // The details explaining the status. Not available for all status values. + StatusDetails *string + + // The ID of the maintenance window execution. + WindowExecutionId *string + + // The ID of the maintenance window. + WindowId *string + + noSmithyDocumentSerde +} + +// Information about a task execution performed as part of a maintenance window +// execution. +type MaintenanceWindowExecutionTaskIdentity struct { + + // The details for the CloudWatch alarm applied to your maintenance window task. + AlarmConfiguration *AlarmConfiguration + + // The time the task execution finished. + EndTime *time.Time + + // The time the task execution started. + StartTime *time.Time + + // The status of the task execution. + Status MaintenanceWindowExecutionStatus + + // The details explaining the status of the task execution. Not available for all + // status values. + StatusDetails *string + + // The Amazon Resource Name (ARN) of the task that ran. + TaskArn *string + + // The ID of the specific task execution in the maintenance window execution. + TaskExecutionId *string + + // The type of task that ran. + TaskType MaintenanceWindowTaskType + + // The CloudWatch alarm that was invoked by the maintenance window task. + TriggeredAlarms []AlarmStateInformation + + // The ID of the maintenance window execution that ran the task. + WindowExecutionId *string + + noSmithyDocumentSerde +} + +// Describes the information about a task invocation for a particular target as +// part of a task execution performed as part of a maintenance window execution. +type MaintenanceWindowExecutionTaskInvocationIdentity struct { + + // The time the invocation finished. + EndTime *time.Time + + // The ID of the action performed in the service that actually handled the task + // invocation. If the task type is RUN_COMMAND , this value is the command ID. + ExecutionId *string + + // The ID of the task invocation. + InvocationId *string + + // User-provided value that was specified when the target was registered with the + // maintenance window. This was also included in any Amazon CloudWatch Events + // events raised during the task invocation. + OwnerInformation *string + + // The parameters that were provided for the invocation when it was run. + Parameters *string + + // The time the invocation started. + StartTime *time.Time + + // The status of the task invocation. + Status MaintenanceWindowExecutionStatus + + // The details explaining the status of the task invocation. Not available for all + // status values. + StatusDetails *string + + // The ID of the specific task execution in the maintenance window execution. + TaskExecutionId *string + + // The task type. + TaskType MaintenanceWindowTaskType + + // The ID of the maintenance window execution that ran the task. + WindowExecutionId *string + + // The ID of the target definition in this maintenance window the invocation was + // performed for. + WindowTargetId *string + + noSmithyDocumentSerde +} + +// Filter used in the request. Supported filter keys depend on the API operation +// that includes the filter. API operations that use MaintenanceWindowFilter> +// include the following: +// +// # DescribeMaintenanceWindowExecutions +// +// # DescribeMaintenanceWindowExecutionTaskInvocations +// +// # DescribeMaintenanceWindowExecutionTasks +// +// # DescribeMaintenanceWindows +// +// # DescribeMaintenanceWindowTargets +// +// DescribeMaintenanceWindowTasks +type MaintenanceWindowFilter struct { + + // The name of the filter. + Key *string + + // The filter values. + Values []string + + noSmithyDocumentSerde +} + +// Information about the maintenance window. +type MaintenanceWindowIdentity struct { + + // The number of hours before the end of the maintenance window that Amazon Web + // Services Systems Manager stops scheduling new tasks for execution. + Cutoff int32 + + // A description of the maintenance window. + Description *string + + // The duration of the maintenance window in hours. + Duration *int32 + + // Indicates whether the maintenance window is enabled. + Enabled bool + + // The date and time, in ISO-8601 Extended format, for when the maintenance window + // is scheduled to become inactive. + EndDate *string + + // The name of the maintenance window. + Name *string + + // The next time the maintenance window will actually run, taking into account any + // specified times for the maintenance window to become active or inactive. + NextExecutionTime *string + + // The schedule of the maintenance window in the form of a cron or rate expression. + Schedule *string + + // The number of days to wait to run a maintenance window after the scheduled cron + // expression date and time. + ScheduleOffset *int32 + + // The time zone that the scheduled maintenance window executions are based on, in + // Internet Assigned Numbers Authority (IANA) format. + ScheduleTimezone *string + + // The date and time, in ISO-8601 Extended format, for when the maintenance window + // is scheduled to become active. + StartDate *string + + // The ID of the maintenance window. + WindowId *string + + noSmithyDocumentSerde +} + +// The maintenance window to which the specified target belongs. +type MaintenanceWindowIdentityForTarget struct { + + // The name of the maintenance window. + Name *string + + // The ID of the maintenance window. + WindowId *string + + noSmithyDocumentSerde +} + +// The parameters for a LAMBDA task type. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service +// (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and +// OutputS3KeyPrefix options in the TaskInvocationParameters structure. For +// information about how Amazon Web Services Systems Manager handles these options +// for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options for +// the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Lambda tasks, Systems Manager ignores any values specified for +// TaskParameters and LoggingInfo. +type MaintenanceWindowLambdaParameters struct { + + // Pass client-specific information to the Lambda function that you are invoking. + // You can then process the client information in your Lambda function as you + // choose through the context variable. + ClientContext *string + + // JSON to provide to your Lambda function as input. + Payload []byte + + // (Optional) Specify an Lambda function version or alias name. If you specify a + // function version, the operation uses the qualified function Amazon Resource Name + // (ARN) to invoke a specific Lambda function. If you specify an alias name, the + // operation uses the alias ARN to invoke the Lambda function version to which the + // alias points. + Qualifier *string + + noSmithyDocumentSerde +} + +// The parameters for a RUN_COMMAND task type. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service +// (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and +// OutputS3KeyPrefix options in the TaskInvocationParameters structure. For +// information about how Amazon Web Services Systems Manager handles these options +// for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options for +// the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For RUN_COMMAND tasks, Systems Manager uses specified values for TaskParameters +// and LoggingInfo only if no values are specified for TaskInvocationParameters . +type MaintenanceWindowRunCommandParameters struct { + + // Configuration options for sending command output to Amazon CloudWatch Logs. + CloudWatchOutputConfig *CloudWatchOutputConfig + + // Information about the commands to run. + Comment *string + + // The SHA-256 or SHA-1 hash created by the system when the document was created. + // SHA-1 hashes have been deprecated. + DocumentHash *string + + // SHA-256 or SHA-1. SHA-1 hashes have been deprecated. + DocumentHashType DocumentHashType + + // The Amazon Web Services Systems Manager document (SSM document) version to use + // in the request. You can specify $DEFAULT , $LATEST , or a specific version + // number. If you run commands by using the Amazon Web Services CLI, then you must + // escape the first two options by using a backslash. If you specify a version + // number, then you don't need to use the backslash. For example: + // + // --document-version "\$DEFAULT" + // + // --document-version "\$LATEST" + // + // --document-version "3" + DocumentVersion *string + + // Configurations for sending notifications about command status changes on a + // per-managed node basis. + NotificationConfig *NotificationConfig + + // The name of the Amazon Simple Storage Service (Amazon S3) bucket. + OutputS3BucketName *string + + // The S3 bucket subfolder. + OutputS3KeyPrefix *string + + // The parameters for the RUN_COMMAND task execution. + Parameters map[string][]string + + // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services + // Systems Manager to assume when running a maintenance window task. If you do not + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the + // Amazon Web Services Systems Manager User Guide. + // + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + ServiceRoleArn *string + + // If this time is reached and the command hasn't already started running, it + // doesn't run. + TimeoutSeconds *int32 + + noSmithyDocumentSerde +} + +// The parameters for a STEP_FUNCTIONS task. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service +// (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and +// OutputS3KeyPrefix options in the TaskInvocationParameters structure. For +// information about how Amazon Web Services Systems Manager handles these options +// for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options for +// the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Step Functions tasks, Systems Manager ignores any values specified for +// TaskParameters and LoggingInfo . +type MaintenanceWindowStepFunctionsParameters struct { + + // The inputs for the STEP_FUNCTIONS task. + Input *string + + // The name of the STEP_FUNCTIONS task. + Name *string + + noSmithyDocumentSerde +} + +// The target registered with the maintenance window. +type MaintenanceWindowTarget struct { + + // A description for the target. + Description *string + + // The name for the maintenance window target. + Name *string + + // A user-provided value that will be included in any Amazon CloudWatch Events + // events that are raised while running tasks for these targets in this maintenance + // window. + OwnerInformation *string + + // The type of target that is being registered with the maintenance window. + ResourceType MaintenanceWindowResourceType + + // The targets, either managed nodes or tags. + // + // Specify managed nodes using the following format: + // + // Key=instanceids,Values=, + // + // Tags are specified using the following format: + // + // Key=,Values= . + Targets []Target + + // The ID of the maintenance window to register the target with. + WindowId *string + + // The ID of the target. + WindowTargetId *string + + noSmithyDocumentSerde +} + +// Information about a task defined for a maintenance window. +type MaintenanceWindowTask struct { + + // The details for the CloudWatch alarm applied to your maintenance window task. + AlarmConfiguration *AlarmConfiguration + + // The specification for whether tasks should continue to run after the cutoff + // time specified in the maintenance windows is reached. + CutoffBehavior MaintenanceWindowTaskCutoffBehavior + + // A description of the task. + Description *string + + // Information about an S3 bucket to write task-level logs to. + // + // LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service + // (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and + // OutputS3KeyPrefix options in the TaskInvocationParameters structure. For + // information about how Amazon Web Services Systems Manager handles these options + // for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + LoggingInfo *LoggingInfo + + // The maximum number of targets this task can be run for, in parallel. + // + // Although this element is listed as "Required: No", a value can be omitted only + // when you are registering or updating a [targetless task]You must provide a value in all other + // cases. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 . + // This value doesn't affect the running of your task. + // + // [targetless task]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + MaxConcurrency *string + + // The maximum number of errors allowed before this task stops being scheduled. + // + // Although this element is listed as "Required: No", a value can be omitted only + // when you are registering or updating a [targetless task]You must provide a value in all other + // cases. + // + // For maintenance window tasks without a target specified, you can't supply a + // value for this option. Instead, the system inserts a placeholder value of 1 . + // This value doesn't affect the running of your task. + // + // [targetless task]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html + MaxErrors *string + + // The task name. + Name *string + + // The priority of the task in the maintenance window. The lower the number, the + // higher the priority. Tasks that have the same priority are scheduled in + // parallel. + Priority int32 + + // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services + // Systems Manager to assume when running a maintenance window task. If you do not + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the + // Amazon Web Services Systems Manager User Guide. + // + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + ServiceRoleArn *string + + // The targets (either managed nodes or tags). Managed nodes are specified using + // Key=instanceids,Values=, . Tags are specified using Key=,Values= . + Targets []Target + + // The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION + // task types, TaskArn is the Amazon Web Services Systems Manager (SSM document) + // name or ARN. For LAMBDA tasks, it's the function name or ARN. For STEP_FUNCTIONS + // tasks, it's the state machine ARN. + TaskArn *string + + // The parameters that should be passed to the task when it is run. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options for + // the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters. + TaskParameters map[string]MaintenanceWindowTaskParameterValueExpression + + // The type of task. + Type MaintenanceWindowTaskType + + // The ID of the maintenance window where the task is registered. + WindowId *string + + // The task ID. + WindowTaskId *string + + noSmithyDocumentSerde +} + +// The parameters for task execution. +type MaintenanceWindowTaskInvocationParameters struct { + + // The parameters for an AUTOMATION task type. + Automation *MaintenanceWindowAutomationParameters + + // The parameters for a LAMBDA task type. + Lambda *MaintenanceWindowLambdaParameters + + // The parameters for a RUN_COMMAND task type. + RunCommand *MaintenanceWindowRunCommandParameters + + // The parameters for a STEP_FUNCTIONS task type. + StepFunctions *MaintenanceWindowStepFunctionsParameters + + noSmithyDocumentSerde +} + +// Defines the values for a task parameter. +type MaintenanceWindowTaskParameterValueExpression struct { + + // This field contains an array of 0 or more strings, each 1 to 255 characters in + // length. + Values []string + + noSmithyDocumentSerde +} + +// Metadata to assign to an Application Manager application. +type MetadataValue struct { + + // Metadata value to assign to an Application Manager application. + Value *string + + noSmithyDocumentSerde +} + +// Details about an individual managed node. +type Node struct { + + // The UTC timestamp for when the managed node data was last captured. + CaptureTime *time.Time + + // The ID of the managed node. + Id *string + + // Information about the type of node. + NodeType NodeType + + // Information about the ownership of the managed node. + Owner *NodeOwnerInfo + + // The Amazon Web Services Region that a managed node was created in or assigned + // to. + Region *string + + noSmithyDocumentSerde +} + +// One or more aggregators for viewing counts of nodes using different dimensions. +type NodeAggregator struct { + + // The aggregator type for limiting a node summary. Currently, only Count is + // supported. + // + // This member is required. + AggregatorType NodeAggregatorType + + // The name of a node attribute on which to limit the count of nodes. + // + // This member is required. + AttributeName NodeAttributeName + + // The data type name to use for viewing counts of nodes. Currently, only Instance + // is supported. + // + // This member is required. + TypeName NodeTypeName + + // Information about aggregators used to refine a node summary. + Aggregators []NodeAggregator + + noSmithyDocumentSerde +} + +// The filters for the operation. +type NodeFilter struct { + + // The name of the filter. + // + // This member is required. + Key NodeFilterKey + + // A filter value supported by the specified key. For example, for the key + // PlatformType , supported values include Linux and Windows . + // + // This member is required. + Values []string + + // The type of filter operator. + Type NodeFilterOperatorType + + noSmithyDocumentSerde +} + +// Information about ownership of a managed node. +type NodeOwnerInfo struct { + + // The ID of the Amazon Web Services account that owns the managed node. + AccountId *string + + // The ID of the organization unit (OU) that the account is part of. + OrganizationalUnitId *string + + // The path for the organizational unit (OU) that owns the managed node. The path + // for the OU is built using the IDs of the organization, root, and all OUs in the + // path down to and including the OU. For example: + // + // o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/ + OrganizationalUnitPath *string + + noSmithyDocumentSerde +} + +// Information about a managed node's type. +// +// The following types satisfy this interface: +// +// NodeTypeMemberInstance +type NodeType interface { + isNodeType() +} + +// Information about a specific managed node. +type NodeTypeMemberInstance struct { + Value InstanceInfo + + noSmithyDocumentSerde +} + +func (*NodeTypeMemberInstance) isNodeType() {} + +// A summary of resources that aren't compliant. The summary is organized +// according to resource type. +type NonCompliantSummary struct { + + // The total number of compliance items that aren't compliant. + NonCompliantCount int32 + + // A summary of the non-compliance severity by compliance type + SeveritySummary *SeveritySummary + + noSmithyDocumentSerde +} + +// Configurations for sending notifications. +type NotificationConfig struct { + + // An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon + // SNS) topic. Run Command pushes notifications about command status changes to + // this topic. + NotificationArn *string + + // The different events for which you can receive notifications. To learn more + // about these events, see [Monitoring Systems Manager status changes using Amazon SNS notifications]in the Amazon Web Services Systems Manager User Guide. + // + // [Monitoring Systems Manager status changes using Amazon SNS notifications]: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html + NotificationEvents []NotificationEvent + + // The type of notification. + // + // - Command : Receive notification when the status of a command changes. + // + // - Invocation : For commands sent to multiple managed nodes, receive + // notification on a per-node basis when the status of a command changes. + NotificationType NotificationType + + noSmithyDocumentSerde +} + +// One or more aggregators for viewing counts of OpsData using different +// dimensions such as Source , CreatedTime , or Source and CreatedTime , to name a +// few. +type OpsAggregator struct { + + // Either a Range or Count aggregator for limiting an OpsData summary. + AggregatorType *string + + // A nested aggregator for viewing counts of OpsData. + Aggregators []OpsAggregator + + // The name of an OpsData attribute on which to limit the count of OpsData. + AttributeName *string + + // The aggregator filters. + Filters []OpsFilter + + // The data type name to use for viewing counts of OpsData. + TypeName *string + + // The aggregator value. + Values map[string]string + + noSmithyDocumentSerde +} + +// The result of the query. +type OpsEntity struct { + + // The data returned by the query. + Data map[string]OpsEntityItem + + // The query ID. + Id *string + + noSmithyDocumentSerde +} + +// The OpsData summary. +type OpsEntityItem struct { + + // The time the OpsData was captured. + CaptureTime *string + + // The details of an OpsData summary. + Content []map[string]string + + noSmithyDocumentSerde +} + +// A filter for viewing OpsData summaries. +type OpsFilter struct { + + // The name of the filter. + // + // This member is required. + Key *string + + // The filter value. + // + // This member is required. + Values []string + + // The type of filter. + Type OpsFilterOperatorType + + noSmithyDocumentSerde +} + +// Operations engineers and IT professionals use Amazon Web Services Systems +// Manager OpsCenter to view, investigate, and remediate operational work items +// (OpsItems) impacting the performance and health of their Amazon Web Services +// resources. OpsCenter is integrated with Amazon EventBridge and Amazon +// CloudWatch. This means you can configure these services to automatically create +// an OpsItem in OpsCenter when a CloudWatch alarm enters the ALARM state or when +// EventBridge processes an event from any Amazon Web Services service that +// publishes events. Configuring Amazon CloudWatch alarms and EventBridge events to +// automatically create OpsItems allows you to quickly diagnose and remediate +// issues with Amazon Web Services resources from a single console. +// +// To help you diagnose issues, each OpsItem includes contextually relevant +// information such as the name and ID of the Amazon Web Services resource that +// generated the OpsItem, alarm or event details, alarm history, and an alarm +// timeline graph. For the Amazon Web Services resource, OpsCenter aggregates +// information from Config, CloudTrail logs, and EventBridge, so you don't have to +// navigate across multiple console pages during your investigation. For more +// information, see [Amazon Web Services Systems Manager OpsCenter]in the Amazon Web Services Systems Manager User Guide. +// +// [Amazon Web Services Systems Manager OpsCenter]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html +type OpsItem struct { + + // The time a runbook workflow ended. Currently reported only for the OpsItem type + // /aws/changerequest . + ActualEndTime *time.Time + + // The time a runbook workflow started. Currently reported only for the OpsItem + // type /aws/changerequest . + ActualStartTime *time.Time + + // An OpsItem category. Category options include: Availability, Cost, Performance, + // Recovery, Security. + Category *string + + // The ARN of the Amazon Web Services account that created the OpsItem. + CreatedBy *string + + // The date and time the OpsItem was created. + CreatedTime *time.Time + + // The OpsItem description. + Description *string + + // The ARN of the Amazon Web Services account that last updated the OpsItem. + LastModifiedBy *string + + // The date and time the OpsItem was last updated. + LastModifiedTime *time.Time + + // The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon + // SNS) topic where notifications are sent when this OpsItem is edited or changed. + Notifications []OpsItemNotification + + // Operational data is custom data that provides useful reference details about + // the OpsItem. For example, you can specify log files, error strings, license + // keys, troubleshooting tips, or other relevant data. You enter operational data + // as key-value pairs. The key has a maximum length of 128 characters. The value + // has a maximum size of 20 KB. + // + // Operational data keys can't begin with the following: amazon , aws , amzn , ssm + // , /amazon , /aws , /amzn , /ssm . + // + // You can choose to make the data searchable by other users in the account or you + // can restrict search access. Searchable data means that all users with access to + // the OpsItem Overview page (as provided by the DescribeOpsItemsAPI operation) can view and + // search on the specified data. Operational data that isn't searchable is only + // viewable by users who have access to the OpsItem (as provided by the GetOpsItemAPI + // operation). + // + // Use the /aws/resources key in OperationalData to specify a related resource in + // the request. Use the /aws/automations key in OperationalData to associate an + // Automation runbook with the OpsItem. To view Amazon Web Services CLI example + // commands that use these keys, see [Creating OpsItems manually]in the Amazon Web Services Systems Manager + // User Guide. + // + // [Creating OpsItems manually]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-manually-create-OpsItems.html + OperationalData map[string]OpsItemDataValue + + // The OpsItem Amazon Resource Name (ARN). + OpsItemArn *string + + // The ID of the OpsItem. + OpsItemId *string + + // The type of OpsItem. Systems Manager supports the following types of OpsItems: + // + // - /aws/issue + // + // This type of OpsItem is used for default OpsItems created by OpsCenter. + // + // - /aws/changerequest + // + // This type of OpsItem is used by Change Manager for reviewing and approving or + // rejecting change requests. + // + // - /aws/insight + // + // This type of OpsItem is used by OpsCenter for aggregating and reporting on + // duplicate OpsItems. + OpsItemType *string + + // The time specified in a change request for a runbook workflow to end. Currently + // supported only for the OpsItem type /aws/changerequest . + PlannedEndTime *time.Time + + // The time specified in a change request for a runbook workflow to start. + // Currently supported only for the OpsItem type /aws/changerequest . + PlannedStartTime *time.Time + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int32 + + // One or more OpsItems that share something in common with the current OpsItem. + // For example, related OpsItems can include OpsItems with similar error messages, + // impacted resources, or statuses for the impacted resource. + RelatedOpsItems []RelatedOpsItem + + // The severity of the OpsItem. Severity options range from 1 to 4. + Severity *string + + // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The impacted + // resource is a subset of source. + Source *string + + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. + // + // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html + Status OpsItemStatus + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + Title *string + + // The version of this OpsItem. Each time the OpsItem is edited the version number + // increments by one. + Version *string + + noSmithyDocumentSerde +} + +// An object that defines the value of the key and its type in the OperationalData +// map. +type OpsItemDataValue struct { + + // The type of key-value pair. Valid types include SearchableString and String . + Type OpsItemDataType + + // The value of the OperationalData key. + Value *string + + noSmithyDocumentSerde +} + +// Describes a filter for a specific list of OpsItem events. You can filter event +// information by using tags. You specify tags by using a key-value pair mapping. +type OpsItemEventFilter struct { + + // The name of the filter key. Currently, the only supported value is OpsItemId . + // + // This member is required. + Key OpsItemEventFilterKey + + // The operator used by the filter call. Currently, the only supported value is + // Equal . + // + // This member is required. + Operator OpsItemEventFilterOperator + + // The values for the filter, consisting of one or more OpsItem IDs. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Summary information about an OpsItem event or that associated an OpsItem with a +// related item. +type OpsItemEventSummary struct { + + // Information about the user or resource that created the OpsItem event. + CreatedBy *OpsItemIdentity + + // The date and time the OpsItem event was created. + CreatedTime *time.Time + + // Specific information about the OpsItem event. + Detail *string + + // The type of information provided as a detail. + DetailType *string + + // The ID of the OpsItem event. + EventId *string + + // The ID of the OpsItem. + OpsItemId *string + + // The source of the OpsItem event. + Source *string + + noSmithyDocumentSerde +} + +// Describes an OpsItem filter. +type OpsItemFilter struct { + + // The name of the filter. + // + // This member is required. + Key OpsItemFilterKey + + // The operator used by the filter call. + // + // This member is required. + Operator OpsItemFilterOperator + + // The filter value. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Information about the user or resource that created an OpsItem event. +type OpsItemIdentity struct { + + // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem event. + Arn *string + + noSmithyDocumentSerde +} + +// A notification about the OpsItem. +type OpsItemNotification struct { + + // The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon + // SNS) topic where notifications are sent when this OpsItem is edited or changed. + Arn *string + + noSmithyDocumentSerde +} + +// Describes a filter for a specific list of related-item resources. +type OpsItemRelatedItemsFilter struct { + + // The name of the filter key. Supported values include ResourceUri , ResourceType + // , or AssociationId . + // + // This member is required. + Key OpsItemRelatedItemsFilterKey + + // The operator used by the filter call. The only supported operator is EQUAL . + // + // This member is required. + Operator OpsItemRelatedItemsFilterOperator + + // The values for the filter. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Summary information about related-item resources for an OpsItem. +type OpsItemRelatedItemSummary struct { + + // The association ID. + AssociationId *string + + // The association type. + AssociationType *string + + // Information about the user or resource that created an OpsItem event. + CreatedBy *OpsItemIdentity + + // The time the related-item association was created. + CreatedTime *time.Time + + // Information about the user or resource that created an OpsItem event. + LastModifiedBy *OpsItemIdentity + + // The time the related-item association was last updated. + LastModifiedTime *time.Time + + // The OpsItem ID. + OpsItemId *string + + // The resource type. + ResourceType *string + + // The Amazon Resource Name (ARN) of the related-item resource. + ResourceUri *string + + noSmithyDocumentSerde +} + +// A count of OpsItems. +type OpsItemSummary struct { + + // The time a runbook workflow ended. Currently reported only for the OpsItem type + // /aws/changerequest . + ActualEndTime *time.Time + + // The time a runbook workflow started. Currently reported only for the OpsItem + // type /aws/changerequest . + ActualStartTime *time.Time + + // A list of OpsItems by category. + Category *string + + // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem. + CreatedBy *string + + // The date and time the OpsItem was created. + CreatedTime *time.Time + + // The Amazon Resource Name (ARN) of the IAM entity that created the OpsItem. + LastModifiedBy *string + + // The date and time the OpsItem was last updated. + LastModifiedTime *time.Time + + // Operational data is custom data that provides useful reference details about + // the OpsItem. + OperationalData map[string]OpsItemDataValue + + // The ID of the OpsItem. + OpsItemId *string + + // The type of OpsItem. Systems Manager supports the following types of OpsItems: + // + // - /aws/issue + // + // This type of OpsItem is used for default OpsItems created by OpsCenter. + // + // - /aws/changerequest + // + // This type of OpsItem is used by Change Manager for reviewing and approving or + // rejecting change requests. + // + // - /aws/insight + // + // This type of OpsItem is used by OpsCenter for aggregating and reporting on + // duplicate OpsItems. + OpsItemType *string + + // The time specified in a change request for a runbook workflow to end. Currently + // supported only for the OpsItem type /aws/changerequest . + PlannedEndTime *time.Time + + // The time specified in a change request for a runbook workflow to start. + // Currently supported only for the OpsItem type /aws/changerequest . + PlannedStartTime *time.Time + + // The importance of this OpsItem in relation to other OpsItems in the system. + Priority *int32 + + // A list of OpsItems by severity. + Severity *string + + // The impacted Amazon Web Services resource. + Source *string + + // The OpsItem status. + Status OpsItemStatus + + // A short heading that describes the nature of the OpsItem and the impacted + // resource. + Title *string + + noSmithyDocumentSerde +} + +// Operational metadata for an application in Application Manager. +type OpsMetadata struct { + + // The date the OpsMetadata objects was created. + CreationDate *time.Time + + // The date the OpsMetadata object was last updated. + LastModifiedDate *time.Time + + // The user name who last updated the OpsMetadata object. + LastModifiedUser *string + + // The Amazon Resource Name (ARN) of the OpsMetadata Object or blob. + OpsMetadataArn *string + + // The ID of the Application Manager application. + ResourceId *string + + noSmithyDocumentSerde +} + +// A filter to limit the number of OpsMetadata objects displayed. +type OpsMetadataFilter struct { + + // A filter key. + // + // This member is required. + Key *string + + // A filter value. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// The OpsItem data type to return. +type OpsResultAttribute struct { + + // Name of the data type. Valid value: AWS:OpsItem , AWS:EC2InstanceInformation , + // AWS:OpsItemTrendline , or AWS:ComplianceSummary . + // + // This member is required. + TypeName *string + + noSmithyDocumentSerde +} + +// Information about the source where the association execution details are stored. +type OutputSource struct { + + // The ID of the output source, for example the URL of an S3 bucket. + OutputSourceId *string + + // The type of source where the association execution details are stored, for + // example, Amazon S3. + OutputSourceType *string + + noSmithyDocumentSerde +} + +// An Amazon Web Services Systems Manager parameter in Parameter Store. +type Parameter struct { + + // The Amazon Resource Name (ARN) of the parameter. + ARN *string + + // The data type of the parameter, such as text or aws:ec2:image . The default is + // text . + DataType *string + + // Date the parameter was last changed or updated and the parameter version was + // created. + LastModifiedDate *time.Time + + // The name of the parameter. + Name *string + + // Either the version number or the label used to retrieve the parameter value. + // Specify selectors by using one of the following formats: + // + // parameter_name:version + // + // parameter_name:label + Selector *string + + // Applies to parameters that reference information in other Amazon Web Services + // services. SourceResult is the raw result or response from the source. + SourceResult *string + + // The type of parameter. Valid values include the following: String , StringList , + // and SecureString . + // + // If type is StringList , the system returns a comma-separated string with no + // spaces between commas in the Value field. + Type ParameterType + + // The parameter value. + // + // If type is StringList , the system returns a comma-separated string with no + // spaces between commas in the Value field. + Value *string + + // The parameter version. + Version int64 + + noSmithyDocumentSerde +} + +// Information about parameter usage. +type ParameterHistory struct { + + // Parameter names can include the following letters and symbols. + // + // a-zA-Z0-9_.- + AllowedPattern *string + + // The data type of the parameter, such as text or aws:ec2:image . The default is + // text . + DataType *string + + // Information about the parameter. + Description *string + + // The alias of the Key Management Service (KMS) key used to encrypt the + // parameter. Applies to SecureString parameters only + KeyId *string + + // Labels assigned to the parameter version. + Labels []string + + // Date the parameter was last changed or updated. + LastModifiedDate *time.Time + + // Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the + // parameter. + LastModifiedUser *string + + // The name of the parameter. + Name *string + + // Information about the policies assigned to a parameter. + // + // [Assigning parameter policies]in the Amazon Web Services Systems Manager User Guide. + // + // [Assigning parameter policies]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html + Policies []ParameterInlinePolicy + + // The parameter tier. + Tier ParameterTier + + // The type of parameter used. + Type ParameterType + + // The parameter value. + Value *string + + // The parameter version. + Version int64 + + noSmithyDocumentSerde +} + +// One or more policies assigned to a parameter. +type ParameterInlinePolicy struct { + + // The status of the policy. Policies report the following statuses: Pending (the + // policy hasn't been enforced or applied yet), Finished (the policy was applied), + // Failed (the policy wasn't applied), or InProgress (the policy is being applied + // now). + PolicyStatus *string + + // The JSON text of the policy. + PolicyText *string + + // The type of policy. Parameter Store, a tool in Amazon Web Services Systems + // Manager, supports the following policy types: Expiration, + // ExpirationNotification, and NoChangeNotification. + PolicyType *string + + noSmithyDocumentSerde +} + +// Metadata includes information like the Amazon Resource Name (ARN) of the last +// user to update the parameter and the date and time the parameter was last used. +type ParameterMetadata struct { + + // The Amazon Resource Name (ARN) of the parameter. + ARN *string + + // A parameter name can include only the following letters and symbols. + // + // a-zA-Z0-9_.- + AllowedPattern *string + + // The data type of the parameter, such as text or aws:ec2:image . The default is + // text . + DataType *string + + // Description of the parameter actions. + Description *string + + // The alias of the Key Management Service (KMS) key used to encrypt the + // parameter. Applies to SecureString parameters only. + KeyId *string + + // Date the parameter was last changed or updated. + LastModifiedDate *time.Time + + // Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the + // parameter. + LastModifiedUser *string + + // The parameter name. + Name *string + + // A list of policies associated with a parameter. + Policies []ParameterInlinePolicy + + // The parameter tier. + Tier ParameterTier + + // The type of parameter. Valid parameter types include the following: String , + // StringList , and SecureString . + Type ParameterType + + // The parameter version. + Version int64 + + noSmithyDocumentSerde +} + +// This data type is deprecated. Instead, use ParameterStringFilter. +type ParametersFilter struct { + + // The name of the filter. + // + // This member is required. + Key ParametersFilterKey + + // The filter values. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// One or more filters. Use a filter to return a more specific list of results. +type ParameterStringFilter struct { + + // The name of the filter. + // + // The ParameterStringFilter object is used by the DescribeParameters and GetParametersByPath API operations. However, + // not all of the pattern values listed for Key can be used with both operations. + // + // For DescribeParameters , all of the listed patterns are valid except Label . + // + // For GetParametersByPath , the following patterns listed for Key aren't valid: + // tag , DataType , Name , Path , and Tier . + // + // For examples of Amazon Web Services CLI commands demonstrating valid parameter + // filter constructions, see [Searching for Systems Manager parameters]in the Amazon Web Services Systems Manager User Guide. + // + // [Searching for Systems Manager parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html + // + // This member is required. + Key *string + + // For all filters used with DescribeParameters, valid options include Equals and BeginsWith . The + // Name filter additionally supports the Contains option. (Exception: For filters + // using the key Path , valid options include Recursive and OneLevel .) + // + // For filters used with GetParametersByPath, valid options include Equals and BeginsWith . + // (Exception: For filters using Label as the Key name, the only valid option is + // Equals .) + Option *string + + // The value you want to search for. + Values []string + + noSmithyDocumentSerde +} + +// A detailed status of the parent step. +type ParentStepDetails struct { + + // The name of the automation action. + Action *string + + // The current repetition of the loop represented by an integer. + Iteration *int32 + + // The current value of the specified iterator in the loop. + IteratorValue *string + + // The unique ID of a step execution. + StepExecutionId *string + + // The name of the step. + StepName *string + + noSmithyDocumentSerde +} + +// Represents metadata about a patch. +type Patch struct { + + // The Advisory ID of the patch. For example, RHSA-2020:3779 . Applies to + // Linux-based managed nodes only. + AdvisoryIds []string + + // The architecture of the patch. For example, in + // example-pkg-0.710.10-2.7.abcd.x86_64 , the architecture is indicated by x86_64 . + // Applies to Linux-based managed nodes only. + Arch *string + + // The Bugzilla ID of the patch. For example, 1600646 . Applies to Linux-based + // managed nodes only. + BugzillaIds []string + + // The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example, + // CVE-2011-3192 . Applies to Linux-based managed nodes only. + CVEIds []string + + // The classification of the patch. For example, SecurityUpdates , Updates , or + // CriticalUpdates . + Classification *string + + // The URL where more information can be obtained about the patch. + ContentUrl *string + + // The description of the patch. + Description *string + + // The epoch of the patch. For example in pkg-example-EE-20180914-2.2.amzn1.noarch + // , the epoch value is 20180914-2 . Applies to Linux-based managed nodes only. + Epoch int32 + + // The ID of the patch. Applies to Windows patches only. + // + // This ID isn't the same as the Microsoft Knowledge Base ID. + Id *string + + // The Microsoft Knowledge Base ID of the patch. Applies to Windows patches only. + KbNumber *string + + // The language of the patch if it's language-specific. + Language *string + + // The ID of the Microsoft Security Response Center (MSRC) bulletin the patch is + // related to. For example, MS14-045 . Applies to Windows patches only. + MsrcNumber *string + + // The severity of the patch, such as Critical , Important , or Moderate . Applies + // to Windows patches only. + MsrcSeverity *string + + // The name of the patch. Applies to Linux-based managed nodes only. + Name *string + + // The specific product the patch is applicable for. For example, WindowsServer2016 + // or AmazonLinux2018.03 . + Product *string + + // The product family the patch is applicable for. For example, Windows or Amazon + // Linux 2 . + ProductFamily *string + + // The particular release of a patch. For example, in + // pkg-example-EE-20180914-2.2.amzn1.noarch , the release is 2.amaz1 . Applies to + // Linux-based managed nodes only. + Release *string + + // The date the patch was released. + ReleaseDate *time.Time + + // The source patch repository for the operating system and version, such as + // trusty-security for Ubuntu Server 14.04 LTE and focal-security for Ubuntu + // Server 20.04 LTE. Applies to Linux-based managed nodes only. + Repository *string + + // The severity level of the patch. For example, CRITICAL or MODERATE . + Severity *string + + // The title of the patch. + Title *string + + // The name of the vendor providing the patch. + Vendor *string + + // The version number of the patch. For example, in + // example-pkg-1.710.10-2.7.abcd.x86_64 , the version number is indicated by -1 . + // Applies to Linux-based managed nodes only. + Version *string + + noSmithyDocumentSerde +} + +// Defines the basic information about a patch baseline. +type PatchBaselineIdentity struct { + + // The description of the patch baseline. + BaselineDescription *string + + // The ID of the patch baseline. + BaselineId *string + + // The name of the patch baseline. + BaselineName *string + + // Indicates whether this is the default baseline. Amazon Web Services Systems + // Manager supports creating multiple default patch baselines. For example, you can + // create a default patch baseline for each operating system. + DefaultBaseline bool + + // Defines the operating system the patch baseline applies to. The default value + // is WINDOWS . + OperatingSystem OperatingSystem + + noSmithyDocumentSerde +} + +// Information about the state of a patch on a particular managed node as it +// relates to the patch baseline used to patch the node. +type PatchComplianceData struct { + + // The classification of the patch, such as SecurityUpdates , Updates , and + // CriticalUpdates . + // + // This member is required. + Classification *string + + // The date/time the patch was installed on the managed node. Not all operating + // systems provide this level of information. + // + // This member is required. + InstalledTime *time.Time + + // The operating system-specific ID of the patch. + // + // This member is required. + KBId *string + + // The severity of the patch such as Critical , Important , and Moderate . + // + // This member is required. + Severity *string + + // The state of the patch on the managed node, such as INSTALLED or FAILED. + // + // For descriptions of each patch state, see [About patch compliance] in the Amazon Web Services Systems + // Manager User Guide. + // + // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch + // + // This member is required. + State PatchComplianceDataState + + // The title of the patch. + // + // This member is required. + Title *string + + // The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that + // are resolved by the patch. + // + // Currently, CVE ID values are reported only for patches with a status of Missing + // or Failed . + CVEIds *string + + noSmithyDocumentSerde +} + +// Defines which patches should be included in a patch baseline. +// +// A patch filter consists of a key and a set of values. The filter key is a patch +// property. For example, the available filter keys for WINDOWS are PATCH_SET , +// PRODUCT , PRODUCT_FAMILY , CLASSIFICATION , and MSRC_SEVERITY . +// +// The filter values define a matching criterion for the patch property indicated +// by the key. For example, if the filter key is PRODUCT and the filter values are +// ["Office 2013", "Office 2016"] , then the filter accepts all patches where +// product name is either "Office 2013" or "Office 2016". The filter values can be +// exact values for the patch property given as a key, or a wildcard (*), which +// matches all values. +// +// You can view lists of valid values for the patch properties by running the +// DescribePatchProperties command. For information about which patch properties +// can be used with each major operating system, see DescribePatchProperties. +type PatchFilter struct { + + // The key for the filter. + // + // Run the DescribePatchProperties command to view lists of valid keys for each operating system type. + // + // This member is required. + Key PatchFilterKey + + // The value for the filter key. + // + // Run the DescribePatchProperties command to view lists of valid values for each key based on operating + // system type. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// A set of patch filters, typically used for approval rules. +type PatchFilterGroup struct { + + // The set of patch filters that make up the group. + // + // This member is required. + PatchFilters []PatchFilter + + noSmithyDocumentSerde +} + +// The mapping between a patch group and the patch baseline the patch group is +// registered with. +type PatchGroupPatchBaselineMapping struct { + + // The patch baseline the patch group is registered with. + BaselineIdentity *PatchBaselineIdentity + + // The name of the patch group registered with the patch baseline. + PatchGroup *string + + noSmithyDocumentSerde +} + +// Defines a filter used in Patch Manager APIs. Supported filter keys depend on +// the API operation that includes the filter. Patch Manager API operations that +// use PatchOrchestratorFilter include the following: +// +// # DescribeAvailablePatches +// +// # DescribeInstancePatches +// +// # DescribePatchBaselines +// +// DescribePatchGroups +type PatchOrchestratorFilter struct { + + // The key for the filter. + Key *string + + // The value for the filter. + Values []string + + noSmithyDocumentSerde +} + +// Defines an approval rule for a patch baseline. +type PatchRule struct { + + // The patch filter group that defines the criteria for the rule. + // + // This member is required. + PatchFilterGroup *PatchFilterGroup + + // The number of days after the release date of each patch matched by the rule + // that the patch is marked as approved in the patch baseline. For example, a value + // of 7 means that patches are approved seven days after they are released. + // + // Patch Manager evaluates patch release dates using Coordinated Universal Time + // (UTC). If the day represented by 7 is 2025-11-16 , patches released between + // 2025-11-16T00:00:00Z and 2025-11-16T23:59:59Z will be included in the approval. + // + // This parameter is marked as Required: No , but your request must include a value + // for either ApproveAfterDays or ApproveUntilDate . + // + // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html + ApproveAfterDays *int32 + + // The cutoff date for auto approval of released patches. Any patches released on + // or before this date are installed automatically. + // + // Enter dates in the format YYYY-MM-DD . For example, 2025-11-16 . + // + // Patch Manager evaluates patch release dates using Coordinated Universal Time + // (UTC). If you enter the date 2025-11-16 , patches released between + // 2025-11-16T00:00:00Z and 2025-11-16T23:59:59Z will be included in the approval. + // + // This parameter is marked as Required: No , but your request must include a value + // for either ApproveUntilDate or ApproveAfterDays . + // + // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html + ApproveUntilDate *string + + // A compliance severity level for all approved patches in a patch baseline. + ComplianceLevel PatchComplianceLevel + + // For managed nodes identified by the approval rule filters, enables a patch + // baseline to apply non-security updates available in the specified repository. + // The default value is false . Applies to Linux managed nodes only. + EnableNonSecurity *bool + + noSmithyDocumentSerde +} + +// A set of rules defining the approval rules for a patch baseline. +type PatchRuleGroup struct { + + // The rules that make up the rule group. + // + // This member is required. + PatchRules []PatchRule + + noSmithyDocumentSerde +} + +// Information about the patches to use to update the managed nodes, including +// target operating systems and source repository. Applies to Linux managed nodes +// only. +type PatchSource struct { + + // The value of the repo configuration. + // + // Example for yum repositories + // + // [main] + // + // name=MyCustomRepository + // + // baseurl=https://my-custom-repository + // + // enabled=1 + // + // For information about other options available for your yum repository + // configuration, see [dnf.conf(5)]on the man7.org website. + // + // Examples for Ubuntu Server and Debian Server + // + // deb http://security.ubuntu.com/ubuntu jammy main + // + // deb https://site.example.com/debian distribution component1 component2 + // component3 + // + // Repo information for Ubuntu Server repositories must be specifed in a single + // line. For more examples and information, see [jammy (5) sources.list.5.gz]on the Ubuntu Server Manuals + // website and [sources.list format]on the Debian Wiki. + // + // [dnf.conf(5)]: https://man7.org/linux/man-pages/man5/dnf.conf.5.html + // [jammy (5) sources.list.5.gz]: https://manpages.ubuntu.com/manpages/jammy/man5/sources.list.5.html + // [sources.list format]: https://wiki.debian.org/SourcesList#sources.list_format + // + // This member is required. + Configuration *string + + // The name specified to identify the patch source. + // + // This member is required. + Name *string + + // The specific operating system versions a patch repository applies to, such as + // "Ubuntu16.04", "AmazonLinux2016.09", "RedhatEnterpriseLinux7.2" or "Suse12.7". + // For lists of supported product values, see PatchFilter. + // + // This member is required. + Products []string + + noSmithyDocumentSerde +} + +// Information about the approval status of a patch. +type PatchStatus struct { + + // The date the patch was approved (or will be approved if the status is + // PENDING_APPROVAL ). + ApprovalDate *time.Time + + // The compliance severity level for a patch. + ComplianceLevel PatchComplianceLevel + + // The approval status of a patch. + DeploymentStatus PatchDeploymentStatus + + noSmithyDocumentSerde +} + +// An aggregate of step execution statuses displayed in the Amazon Web Services +// Systems Manager console for a multi-Region and multi-account Automation +// execution. +type ProgressCounters struct { + + // The total number of steps that the system cancelled in all specified Amazon Web + // Services Regions and Amazon Web Services accounts for the current Automation + // execution. + CancelledSteps int32 + + // The total number of steps that failed to run in all specified Amazon Web + // Services Regions and Amazon Web Services accounts for the current Automation + // execution. + FailedSteps int32 + + // The total number of steps that successfully completed in all specified Amazon + // Web Services Regions and Amazon Web Services accounts for the current Automation + // execution. + SuccessSteps int32 + + // The total number of steps that timed out in all specified Amazon Web Services + // Regions and Amazon Web Services accounts for the current Automation execution. + TimedOutSteps int32 + + // The total number of steps run in all specified Amazon Web Services Regions and + // Amazon Web Services accounts for the current Automation execution. + TotalSteps int32 + + noSmithyDocumentSerde +} + +// Reserved for internal use. +type RegistrationMetadataItem struct { + + // Reserved for internal use. + // + // This member is required. + Key *string + + // Reserved for internal use. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// An OpsItems that shares something in common with the current OpsItem. For +// example, related OpsItems can include OpsItems with similar error messages, +// impacted resources, or statuses for the impacted resource. +type RelatedOpsItem struct { + + // The ID of an OpsItem related to the current OpsItem. + // + // This member is required. + OpsItemId *string + + noSmithyDocumentSerde +} + +// Information about targets that resolved during the Automation execution. +type ResolvedTargets struct { + + // A list of parameter values sent to targets that resolved during the Automation + // execution. + ParameterValues []string + + // A boolean value indicating whether the resolved target list is truncated. + Truncated bool + + noSmithyDocumentSerde +} + +// Compliance summary information for a specific resource. +type ResourceComplianceSummaryItem struct { + + // The compliance type. + ComplianceType *string + + // A list of items that are compliant for the resource. + CompliantSummary *CompliantSummary + + // Information about the execution. + ExecutionSummary *ComplianceExecutionSummary + + // A list of items that aren't compliant for the resource. + NonCompliantSummary *NonCompliantSummary + + // The highest severity item found for the resource. The resource is compliant for + // this item. + OverallSeverity ComplianceSeverity + + // The resource ID. + ResourceId *string + + // The resource type. + ResourceType *string + + // The compliance status for the resource. + Status ComplianceStatus + + noSmithyDocumentSerde +} + +// Information about the AwsOrganizationsSource resource data sync source. A sync +// source of this type can synchronize data from Organizations or, if an Amazon Web +// Services organization isn't present, from multiple Amazon Web Services Regions. +type ResourceDataSyncAwsOrganizationsSource struct { + + // If an Amazon Web Services organization is present, this is either + // OrganizationalUnits or EntireOrganization . For OrganizationalUnits , the data + // is aggregated from a set of organization units. For EntireOrganization , the + // data is aggregated from the entire Amazon Web Services organization. + // + // This member is required. + OrganizationSourceType *string + + // The Organizations organization units included in the sync. + OrganizationalUnits []ResourceDataSyncOrganizationalUnit + + noSmithyDocumentSerde +} + +// Synchronize Amazon Web Services Systems Manager Inventory data from multiple +// Amazon Web Services accounts defined in Organizations to a centralized Amazon S3 +// bucket. Data is synchronized to individual key prefixes in the central bucket. +// Each key prefix represents a different Amazon Web Services account ID. +type ResourceDataSyncDestinationDataSharing struct { + + // The sharing data type. Only Organization is supported. + DestinationDataSharingType *string + + noSmithyDocumentSerde +} + +// Information about a resource data sync configuration, including its current +// status and last successful sync. +type ResourceDataSyncItem struct { + + // The status reported by the last sync. + LastStatus LastResourceDataSyncStatus + + // The last time the sync operations returned a status of SUCCESSFUL (UTC). + LastSuccessfulSyncTime *time.Time + + // The status message details reported by the last sync. + LastSyncStatusMessage *string + + // The last time the configuration attempted to sync (UTC). + LastSyncTime *time.Time + + // Configuration information for the target S3 bucket. + S3Destination *ResourceDataSyncS3Destination + + // The date and time the configuration was created (UTC). + SyncCreatedTime *time.Time + + // The date and time the resource data sync was changed. + SyncLastModifiedTime *time.Time + + // The name of the resource data sync. + SyncName *string + + // Information about the source where the data was synchronized. + SyncSource *ResourceDataSyncSourceWithState + + // The type of resource data sync. If SyncType is SyncToDestination , then the + // resource data sync synchronizes data to an S3 bucket. If the SyncType is + // SyncFromSource then the resource data sync synchronizes data from Organizations + // or from multiple Amazon Web Services Regions. + SyncType *string + + noSmithyDocumentSerde +} + +// The Organizations organizational unit data source for the sync. +type ResourceDataSyncOrganizationalUnit struct { + + // The Organizations unit ID data source for the sync. + OrganizationalUnitId *string + + noSmithyDocumentSerde +} + +// Information about the target S3 bucket for the resource data sync. +type ResourceDataSyncS3Destination struct { + + // The name of the S3 bucket where the aggregated data is stored. + // + // This member is required. + BucketName *string + + // The Amazon Web Services Region with the S3 bucket targeted by the resource data + // sync. + // + // This member is required. + Region *string + + // A supported sync format. The following format is currently supported: JsonSerDe + // + // This member is required. + SyncFormat ResourceDataSyncS3Format + + // The ARN of an encryption key for a destination in Amazon S3. Must belong to the + // same Region as the destination S3 bucket. + AWSKMSKeyARN *string + + // Enables destination data sharing. By default, this field is null . + DestinationDataSharing *ResourceDataSyncDestinationDataSharing + + // An Amazon S3 prefix for the bucket. + Prefix *string + + noSmithyDocumentSerde +} + +// Information about the source of the data included in the resource data sync. +type ResourceDataSyncSource struct { + + // The SyncSource Amazon Web Services Regions included in the resource data sync. + // + // This member is required. + SourceRegions []string + + // The type of data source for the resource data sync. SourceType is either + // AwsOrganizations (if an organization is present in Organizations) or + // SingleAccountMultiRegions . + // + // This member is required. + SourceType *string + + // Information about the AwsOrganizationsSource resource data sync source. A sync + // source of this type can synchronize data from Organizations. + AwsOrganizationsSource *ResourceDataSyncAwsOrganizationsSource + + // When you create a resource data sync, if you choose one of the Organizations + // options, then Systems Manager automatically enables all OpsData sources in the + // selected Amazon Web Services Regions for all Amazon Web Services accounts in + // your organization (or in the selected organization units). For more information, + // see [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]in the Amazon Web Services Systems Manager User Guide. + // + // [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html + EnableAllOpsDataSources bool + + // Whether to automatically synchronize and aggregate data from new Amazon Web + // Services Regions when those Regions come online. + IncludeFutureRegions bool + + noSmithyDocumentSerde +} + +// The data type name for including resource data sync state. There are four sync +// states: +// +// OrganizationNotExists (Your organization doesn't exist) +// +// NoPermissions (The system can't locate the service-linked role. This role is +// automatically created when a user creates a resource data sync in Amazon Web +// Services Systems Manager Explorer.) +// +// InvalidOrganizationalUnit (You specified or selected an invalid unit in the +// resource data sync configuration.) +// +// TrustedAccessDisabled (You disabled Systems Manager access in the organization +// in Organizations.) +type ResourceDataSyncSourceWithState struct { + + // The field name in SyncSource for the ResourceDataSyncAwsOrganizationsSource + // type. + AwsOrganizationsSource *ResourceDataSyncAwsOrganizationsSource + + // When you create a resource data sync, if you choose one of the Organizations + // options, then Systems Manager automatically enables all OpsData sources in the + // selected Amazon Web Services Regions for all Amazon Web Services accounts in + // your organization (or in the selected organization units). For more information, + // see [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]in the Amazon Web Services Systems Manager User Guide. + // + // [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html + EnableAllOpsDataSources bool + + // Whether to automatically synchronize and aggregate data from new Amazon Web + // Services Regions when those Regions come online. + IncludeFutureRegions bool + + // The SyncSource Amazon Web Services Regions included in the resource data sync. + SourceRegions []string + + // The type of data source for the resource data sync. SourceType is either + // AwsOrganizations (if an organization is present in Organizations) or + // singleAccountMultiRegions . + SourceType *string + + // The data type name for including resource data sync state. There are four sync + // states: + // + // OrganizationNotExists : Your organization doesn't exist. + // + // NoPermissions : The system can't locate the service-linked role. This role is + // automatically created when a user creates a resource data sync in Explorer. + // + // InvalidOrganizationalUnit : You specified or selected an invalid unit in the + // resource data sync configuration. + // + // TrustedAccessDisabled : You disabled Systems Manager access in the organization + // in Organizations. + State *string + + noSmithyDocumentSerde +} + +// The inventory item result attribute. +type ResultAttribute struct { + + // Name of the inventory item type. Valid value: AWS:InstanceInformation . Default + // Value: AWS:InstanceInformation . + // + // This member is required. + TypeName *string + + noSmithyDocumentSerde +} + +// Information about the result of a document review request. +type ReviewInformation struct { + + // The time that the reviewer took action on the document review request. + ReviewedTime *time.Time + + // The reviewer assigned to take action on the document review request. + Reviewer *string + + // The current status of the document review request. + Status ReviewStatus + + noSmithyDocumentSerde +} + +// Information about an Automation runbook used in a runbook workflow in Change +// Manager. +// +// The Automation runbooks specified for the runbook workflow can't run until all +// required approvals for the change request have been received. +type Runbook struct { + + // The name of the Automation runbook used in a runbook workflow. + // + // This member is required. + DocumentName *string + + // The version of the Automation runbook used in a runbook workflow. + DocumentVersion *string + + // The MaxConcurrency value specified by the user when the operation started, + // indicating the maximum number of resources that the runbook operation can run on + // at the same time. + MaxConcurrency *string + + // The MaxErrors value specified by the user when the execution started, + // indicating the maximum number of errors that can occur during the operation + // before the updates are stopped or rolled back. + MaxErrors *string + + // The key-value map of execution parameters, which were supplied when calling + // StartChangeRequestExecution . + Parameters map[string][]string + + // Information about the Amazon Web Services Regions and Amazon Web Services + // accounts targeted by the current Runbook operation. + TargetLocations []TargetLocation + + // A key-value mapping of runbook parameters to target resources. Both Targets and + // TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The name of the parameter used as the target resource for the rate-controlled + // runbook workflow. Required if you specify Targets . + TargetParameterName *string + + // A key-value mapping to target resources that the runbook operation performs + // tasks on. Required if you specify TargetParameterName . + Targets []Target + + noSmithyDocumentSerde +} + +// An S3 bucket where you want to store the results of this request. +type S3OutputLocation struct { + + // The name of the S3 bucket. + OutputS3BucketName *string + + // The S3 bucket subfolder. + OutputS3KeyPrefix *string + + // The Amazon Web Services Region of the S3 bucket. + OutputS3Region *string + + noSmithyDocumentSerde +} + +// A URL for the Amazon Web Services Systems Manager (Systems Manager) bucket +// where you want to store the results of this request. +type S3OutputUrl struct { + + // A URL for an S3 bucket where you want to store the results of this request. + OutputUrl *string + + noSmithyDocumentSerde +} + +// Information about a scheduled execution for a maintenance window. +type ScheduledWindowExecution struct { + + // The time, in ISO-8601 Extended format, that the maintenance window is scheduled + // to be run. + ExecutionTime *string + + // The name of the maintenance window to be run. + Name *string + + // The ID of the maintenance window to be run. + WindowId *string + + noSmithyDocumentSerde +} + +// The service setting data structure. +// +// ServiceSetting is an account-level setting for an Amazon Web Services service. +// This setting defines how a user interacts with or uses a service or a feature of +// a service. For example, if an Amazon Web Services service charges money to the +// account based on feature or service usage, then the Amazon Web Services service +// team might create a default setting of "false". This means the user can't use +// this feature unless they change the setting to "true" and intentionally opt in +// for a paid feature. +// +// Services map a SettingId object to a setting value. Amazon Web Services +// services teams define the default value for a SettingId . You can't create a new +// SettingId , but you can overwrite the default value if you have the +// ssm:UpdateServiceSetting permission for the setting. Use the UpdateServiceSetting API operation to +// change the default setting. Or, use the ResetServiceSettingto change the value back to the +// original value defined by the Amazon Web Services service team. +type ServiceSetting struct { + + // The ARN of the service setting. + ARN *string + + // The last time the service setting was modified. + LastModifiedDate *time.Time + + // The ARN of the last modified user. This field is populated only if the setting + // value was overwritten. + LastModifiedUser *string + + // The ID of the service setting. + SettingId *string + + // The value of the service setting. + SettingValue *string + + // The status of the service setting. The value can be Default, Customized or + // PendingUpdate. + // + // - Default: The current setting uses a default value provisioned by the Amazon + // Web Services service team. + // + // - Customized: The current setting use a custom value specified by the + // customer. + // + // - PendingUpdate: The current setting uses a default or custom value, but a + // setting change request is pending approval. + Status *string + + noSmithyDocumentSerde +} + +// Information about a Session Manager connection to a managed node. +type Session struct { + + // Standard access type is the default for Session Manager sessions. JustInTime is + // the access type for [Just-in-time node access]. + // + // [Just-in-time node access]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-just-in-time-node-access.html + AccessType AccessType + + // Reserved for future use. + Details *string + + // The name of the Session Manager SSM document used to define the parameters and + // plugin settings for the session. For example, SSM-SessionManagerRunShell . + DocumentName *string + + // The date and time, in ISO-8601 Extended format, when the session was terminated. + EndDate *time.Time + + // The maximum duration of a session before it terminates. + MaxSessionDuration *string + + // Reserved for future use. + OutputUrl *SessionManagerOutputUrl + + // The ID of the Amazon Web Services user that started the session. + Owner *string + + // The reason for connecting to the instance. + Reason *string + + // The ID of the session. + SessionId *string + + // The date and time, in ISO-8601 Extended format, when the session began. + StartDate *time.Time + + // The status of the session. For example, "Connected" or "Terminated". + Status SessionStatus + + // The managed node that the Session Manager session connected to. + Target *string + + noSmithyDocumentSerde +} + +// Describes a filter for Session Manager information. +type SessionFilter struct { + + // The name of the filter. + // + // This member is required. + Key SessionFilterKey + + // The filter value. Valid values for each filter key are as follows: + // + // - InvokedAfter: Specify a timestamp to limit your results. For example, + // specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and + // later. + // + // - InvokedBefore: Specify a timestamp to limit your results. For example, + // specify 2024-08-29T00:00:00Z to see sessions that started before August 29, + // 2024. + // + // - Target: Specify a managed node to which session connections have been made. + // + // - Owner: Specify an Amazon Web Services user to see a list of sessions + // started by that user. + // + // - Status: Specify a valid session status to see a list of all sessions with + // that status. Status values you can specify include: + // + // - Connected + // + // - Connecting + // + // - Disconnected + // + // - Terminated + // + // - Terminating + // + // - Failed + // + // - SessionId: Specify a session ID to return details about the session. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Reserved for future use. +type SessionManagerOutputUrl struct { + + // Reserved for future use. + CloudWatchOutputUrl *string + + // Reserved for future use. + S3OutputUrl *string + + noSmithyDocumentSerde +} + +// The number of managed nodes found for each patch severity level defined in the +// request filter. +type SeveritySummary struct { + + // The total number of resources or compliance items that have a severity level of + // Critical . Critical severity is determined by the organization that published + // the compliance items. + CriticalCount int32 + + // The total number of resources or compliance items that have a severity level of + // high. High severity is determined by the organization that published the + // compliance items. + HighCount int32 + + // The total number of resources or compliance items that have a severity level of + // informational. Informational severity is determined by the organization that + // published the compliance items. + InformationalCount int32 + + // The total number of resources or compliance items that have a severity level of + // low. Low severity is determined by the organization that published the + // compliance items. + LowCount int32 + + // The total number of resources or compliance items that have a severity level of + // medium. Medium severity is determined by the organization that published the + // compliance items. + MediumCount int32 + + // The total number of resources or compliance items that have a severity level of + // unspecified. Unspecified severity is determined by the organization that + // published the compliance items. + UnspecifiedCount int32 + + noSmithyDocumentSerde +} + +// Detailed information about an the execution state of an Automation step. +type StepExecution struct { + + // The action this step performs. The action determines the behavior of the step. + Action *string + + // If a step has finished execution, this contains the time the execution ended. + // If the step hasn't yet concluded, this field isn't populated. + ExecutionEndTime *time.Time + + // If a step has begun execution, this contains the time the step started. If the + // step is in Pending status, this field isn't populated. + ExecutionStartTime *time.Time + + // Information about the Automation failure. + FailureDetails *FailureDetails + + // If a step failed, this message explains why the execution failed. + FailureMessage *string + + // Fully-resolved values passed into the step before execution. + Inputs map[string]string + + // The flag which can be used to help decide whether the failure of current step + // leads to the Automation failure. + IsCritical *bool + + // The flag which can be used to end automation no matter whether the step + // succeeds or fails. + IsEnd *bool + + // The maximum number of tries to run the action of the step. The default value is + // 1 . + MaxAttempts *int32 + + // The next step after the step succeeds. + NextStep *string + + // The action to take if the step fails. The default value is Abort . + OnFailure *string + + // Returned values from the execution of the step. + Outputs map[string][]string + + // A user-specified list of parameters to override when running a step. + OverriddenParameters map[string][]string + + // Information about the parent step. + ParentStepDetails *ParentStepDetails + + // A message associated with the response code for an execution. + Response *string + + // The response code returned by the execution of the step. + ResponseCode *string + + // The unique ID of a step execution. + StepExecutionId *string + + // The name of this execution step. + StepName *string + + // The execution status for this step. + StepStatus AutomationExecutionStatus + + // The combination of Amazon Web Services Regions and Amazon Web Services accounts + // targeted by the current Automation execution. + TargetLocation *TargetLocation + + // The targets for the step execution. + Targets []Target + + // The timeout seconds of the step. + TimeoutSeconds *int64 + + // The CloudWatch alarms that were invoked by the automation. + TriggeredAlarms []AlarmStateInformation + + // Strategies used when step fails, we support Continue and Abort. Abort will fail + // the automation when the step fails. Continue will ignore the failure of current + // step and allow automation to run the next step. With conditional branching, we + // add step:stepName to support the automation to go to another specific step. + ValidNextSteps []string + + noSmithyDocumentSerde +} + +// A filter to limit the amount of step execution information returned by the call. +type StepExecutionFilter struct { + + // One or more keys to limit the results. + // + // This member is required. + Key StepExecutionFilterKey + + // The values of the filter key. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Metadata that you assign to your Amazon Web Services resources. Tags enable you +// to categorize your resources in different ways, for example, by purpose, owner, +// or environment. In Amazon Web Services Systems Manager, you can apply tags to +// Systems Manager documents (SSM documents), managed nodes, maintenance windows, +// parameters, patch baselines, OpsItems, and OpsMetadata. +type Tag struct { + + // The name of the tag. + // + // This member is required. + Key *string + + // The value of the tag. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// An array of search criteria that targets managed nodes using a key-value pair +// that you specify. +// +// One or more targets must be specified for maintenance window Run Command-type +// tasks. Depending on the task, targets are optional for other maintenance window +// task types (Automation, Lambda, and Step Functions). For more information about +// running tasks that don't specify targets, see [Registering maintenance window tasks without targets]in the Amazon Web Services +// Systems Manager User Guide. +// +// Supported formats include the following. +// +// For all Systems Manager tools: +// +// - Key=tag-key,Values=tag-value-1,tag-value-2 +// +// For Automation and Change Manager: +// +// - Key=tag:tag-key,Values=tag-value +// +// - Key=ResourceGroup,Values=resource-group-name +// +// - Key=ParameterValues,Values=value-1,value-2,value-3 +// +// - To target all instances in the Amazon Web Services Region: +// +// - Key=AWS::EC2::Instance,Values=* +// +// - Key=InstanceIds,Values=* +// +// For Run Command and Maintenance Windows: +// +// - Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 +// +// - Key=tag:tag-key,Values=tag-value-1,tag-value-2 +// +// - Key=resource-groups:Name,Values=resource-group-name +// +// - Additionally, Maintenance Windows support targeting resource types: +// +// - +// Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 +// +// For State Manager: +// +// - Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 +// +// - Key=tag:tag-key,Values=tag-value-1,tag-value-2 +// +// - To target all instances in the Amazon Web Services Region: +// +// - Key=InstanceIds,Values=* +// +// For more information about how to send commands that target managed nodes using +// Key,Value parameters, see [Targeting multiple managed nodes] in the Amazon Web Services Systems Manager User +// Guide. +// +// [Targeting multiple managed nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting +// [Registering maintenance window tasks without targets]: https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html +type Target struct { + + // User-defined criteria for sending commands that target managed nodes that meet + // the criteria. + Key *string + + // User-defined criteria that maps to Key . For example, if you specified + // tag:ServerRole , you could specify value:WebServer to run a command on + // instances that include EC2 tags of ServerRole,WebServer . + // + // Depending on the type of target, the maximum number of values for a key might + // be lower than the global maximum of 50. + Values []string + + noSmithyDocumentSerde +} + +// The combination of Amazon Web Services Regions and Amazon Web Services accounts +// targeted by the current Automation execution. +type TargetLocation struct { + + // The Amazon Web Services accounts targeted by the current Automation execution. + Accounts []string + + // Amazon Web Services accounts or organizational units to exclude as expanded + // targets. + ExcludeAccounts []string + + // The Automation execution role used by the currently running Automation. If not + // specified, the default value is AWS-SystemsManager-AutomationExecutionRole . + ExecutionRoleName *string + + // Indicates whether to include child organizational units (OUs) that are children + // of the targeted OUs. The default is false . + // + // This parameter is not supported by State Manager. + IncludeChildOrganizationUnits bool + + // The Amazon Web Services Regions targeted by the current Automation execution. + Regions []string + + // The details for the CloudWatch alarm you want to apply to an automation or + // command. + TargetLocationAlarmConfiguration *AlarmConfiguration + + // The maximum number of Amazon Web Services Regions and Amazon Web Services + // accounts allowed to run the Automation concurrently. + // TargetLocationMaxConcurrency has a default value of 1. + TargetLocationMaxConcurrency *string + + // The maximum number of errors allowed before the system stops queueing + // additional Automation executions for the currently running Automation. + // TargetLocationMaxErrors has a default value of 0. + TargetLocationMaxErrors *string + + // A list of key-value mappings to target resources. If you specify values for + // this data type, you must also specify a value for TargetParameterName . + // + // This Targets parameter takes precedence over the + // StartAutomationExecution:Targets parameter if both are supplied. + Targets []Target + + // The maximum number of targets allowed to run this task in parallel. This + // TargetsMaxConcurrency takes precedence over the + // StartAutomationExecution:MaxConcurrency parameter if both are supplied. + TargetsMaxConcurrency *string + + // The maximum number of errors that are allowed before the system stops running + // the automation on additional targets. This TargetsMaxErrors parameter takes + // precedence over the StartAutomationExecution:MaxErrors parameter if both are + // supplied. + TargetsMaxErrors *string + + noSmithyDocumentSerde +} + +// Information about the resources that would be included in the actual runbook +// execution, if it were to be run. +type TargetPreview struct { + + // The number of resources of a certain type included in an execution preview. + Count int32 + + // A type of resource that was included in the execution preview. + TargetType *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isExecutionInputs() {} +func (*UnknownUnionMember) isExecutionPreview() {} +func (*UnknownUnionMember) isNodeType() {} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go new file mode 100644 index 00000000000..1a9d28662f7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go @@ -0,0 +1,7346 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAddTagsToResource struct { +} + +func (*validateOpAddTagsToResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddTagsToResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddTagsToResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddTagsToResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAssociateOpsItemRelatedItem struct { +} + +func (*validateOpAssociateOpsItemRelatedItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateOpsItemRelatedItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateOpsItemRelatedItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateOpsItemRelatedItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCancelCommand struct { +} + +func (*validateOpCancelCommand) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelCommand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelCommandInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelCommandInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCancelMaintenanceWindowExecution struct { +} + +func (*validateOpCancelMaintenanceWindowExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelMaintenanceWindowExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelMaintenanceWindowExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelMaintenanceWindowExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateActivation struct { +} + +func (*validateOpCreateActivation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateActivation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateActivationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateActivationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAssociationBatch struct { +} + +func (*validateOpCreateAssociationBatch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAssociationBatch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAssociationBatchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAssociationBatchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAssociation struct { +} + +func (*validateOpCreateAssociation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAssociationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAssociationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateDocument struct { +} + +func (*validateOpCreateDocument) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDocumentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDocumentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateMaintenanceWindow struct { +} + +func (*validateOpCreateMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOpsItem struct { +} + +func (*validateOpCreateOpsItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOpsItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOpsItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOpsItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOpsMetadata struct { +} + +func (*validateOpCreateOpsMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOpsMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOpsMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOpsMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreatePatchBaseline struct { +} + +func (*validateOpCreatePatchBaseline) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePatchBaselineInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateResourceDataSync struct { +} + +func (*validateOpCreateResourceDataSync) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateResourceDataSync) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateResourceDataSyncInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateResourceDataSyncInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteActivation struct { +} + +func (*validateOpDeleteActivation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteActivation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteActivationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteActivationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDocument struct { +} + +func (*validateOpDeleteDocument) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDocumentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDocumentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteInventory struct { +} + +func (*validateOpDeleteInventory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteInventory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteInventoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteInventoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteMaintenanceWindow struct { +} + +func (*validateOpDeleteMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteOpsItem struct { +} + +func (*validateOpDeleteOpsItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOpsItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOpsItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOpsItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteOpsMetadata struct { +} + +func (*validateOpDeleteOpsMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOpsMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOpsMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOpsMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteParameter struct { +} + +func (*validateOpDeleteParameter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteParameter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteParameterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteParameterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteParameters struct { +} + +func (*validateOpDeleteParameters) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteParametersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteParametersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePatchBaseline struct { +} + +func (*validateOpDeletePatchBaseline) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePatchBaselineInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteResourceDataSync struct { +} + +func (*validateOpDeleteResourceDataSync) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourceDataSync) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourceDataSyncInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourceDataSyncInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeregisterManagedInstance struct { +} + +func (*validateOpDeregisterManagedInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterManagedInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterManagedInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterManagedInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeregisterPatchBaselineForPatchGroup struct { +} + +func (*validateOpDeregisterPatchBaselineForPatchGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterPatchBaselineForPatchGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterPatchBaselineForPatchGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterPatchBaselineForPatchGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeregisterTargetFromMaintenanceWindow struct { +} + +func (*validateOpDeregisterTargetFromMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterTargetFromMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterTargetFromMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterTargetFromMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeregisterTaskFromMaintenanceWindow struct { +} + +func (*validateOpDeregisterTaskFromMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterTaskFromMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterTaskFromMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterTaskFromMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAssociationExecutions struct { +} + +func (*validateOpDescribeAssociationExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAssociationExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAssociationExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAssociationExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAssociationExecutionTargets struct { +} + +func (*validateOpDescribeAssociationExecutionTargets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAssociationExecutionTargets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAssociationExecutionTargetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAssociationExecutionTargetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAutomationExecutions struct { +} + +func (*validateOpDescribeAutomationExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAutomationExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAutomationExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAutomationExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAutomationStepExecutions struct { +} + +func (*validateOpDescribeAutomationStepExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAutomationStepExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAutomationStepExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAutomationStepExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDocument struct { +} + +func (*validateOpDescribeDocument) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDocumentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDocumentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDocumentPermission struct { +} + +func (*validateOpDescribeDocumentPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDocumentPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDocumentPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDocumentPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeEffectiveInstanceAssociations struct { +} + +func (*validateOpDescribeEffectiveInstanceAssociations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeEffectiveInstanceAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeEffectiveInstanceAssociationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeEffectiveInstanceAssociationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeEffectivePatchesForPatchBaseline struct { +} + +func (*validateOpDescribeEffectivePatchesForPatchBaseline) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeEffectivePatchesForPatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeEffectivePatchesForPatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeEffectivePatchesForPatchBaselineInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstanceAssociationsStatus struct { +} + +func (*validateOpDescribeInstanceAssociationsStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstanceAssociationsStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstanceAssociationsStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstanceAssociationsStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstanceInformation struct { +} + +func (*validateOpDescribeInstanceInformation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstanceInformation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstanceInformationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstanceInformationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstancePatches struct { +} + +func (*validateOpDescribeInstancePatches) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstancePatches) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstancePatchesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstancePatchesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstancePatchStatesForPatchGroup struct { +} + +func (*validateOpDescribeInstancePatchStatesForPatchGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstancePatchStatesForPatchGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstancePatchStatesForPatchGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstancePatchStatesForPatchGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstancePatchStates struct { +} + +func (*validateOpDescribeInstancePatchStates) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstancePatchStates) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstancePatchStatesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstancePatchStatesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstanceProperties struct { +} + +func (*validateOpDescribeInstanceProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstanceProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstancePropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstancePropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMaintenanceWindowExecutions struct { +} + +func (*validateOpDescribeMaintenanceWindowExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMaintenanceWindowExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMaintenanceWindowExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMaintenanceWindowExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMaintenanceWindowExecutionTaskInvocations struct { +} + +func (*validateOpDescribeMaintenanceWindowExecutionTaskInvocations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMaintenanceWindowExecutionTaskInvocations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMaintenanceWindowExecutionTaskInvocationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMaintenanceWindowExecutionTaskInvocationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMaintenanceWindowExecutionTasks struct { +} + +func (*validateOpDescribeMaintenanceWindowExecutionTasks) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMaintenanceWindowExecutionTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMaintenanceWindowExecutionTasksInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMaintenanceWindowExecutionTasksInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMaintenanceWindowsForTarget struct { +} + +func (*validateOpDescribeMaintenanceWindowsForTarget) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMaintenanceWindowsForTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMaintenanceWindowsForTargetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMaintenanceWindowsForTargetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMaintenanceWindowTargets struct { +} + +func (*validateOpDescribeMaintenanceWindowTargets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMaintenanceWindowTargets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMaintenanceWindowTargetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMaintenanceWindowTargetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMaintenanceWindowTasks struct { +} + +func (*validateOpDescribeMaintenanceWindowTasks) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMaintenanceWindowTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMaintenanceWindowTasksInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMaintenanceWindowTasksInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeOpsItems struct { +} + +func (*validateOpDescribeOpsItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeOpsItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeOpsItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeOpsItemsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeParameters struct { +} + +func (*validateOpDescribeParameters) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeParametersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeParametersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribePatchGroupState struct { +} + +func (*validateOpDescribePatchGroupState) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribePatchGroupState) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribePatchGroupStateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribePatchGroupStateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribePatchProperties struct { +} + +func (*validateOpDescribePatchProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribePatchProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribePatchPropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribePatchPropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeSessions struct { +} + +func (*validateOpDescribeSessions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeSessions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeSessionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeSessionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisassociateOpsItemRelatedItem struct { +} + +func (*validateOpDisassociateOpsItemRelatedItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateOpsItemRelatedItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateOpsItemRelatedItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateOpsItemRelatedItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAccessToken struct { +} + +func (*validateOpGetAccessToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAccessToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAccessTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAccessTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAutomationExecution struct { +} + +func (*validateOpGetAutomationExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAutomationExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAutomationExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAutomationExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCalendarState struct { +} + +func (*validateOpGetCalendarState) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCalendarState) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCalendarStateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCalendarStateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCommandInvocation struct { +} + +func (*validateOpGetCommandInvocation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCommandInvocation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCommandInvocationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCommandInvocationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetConnectionStatus struct { +} + +func (*validateOpGetConnectionStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetConnectionStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetConnectionStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetConnectionStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDeployablePatchSnapshotForInstance struct { +} + +func (*validateOpGetDeployablePatchSnapshotForInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDeployablePatchSnapshotForInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDeployablePatchSnapshotForInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDeployablePatchSnapshotForInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDocument struct { +} + +func (*validateOpGetDocument) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDocumentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDocumentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetExecutionPreview struct { +} + +func (*validateOpGetExecutionPreview) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExecutionPreview) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExecutionPreviewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExecutionPreviewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetInventory struct { +} + +func (*validateOpGetInventory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetInventory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetInventoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetInventoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMaintenanceWindowExecution struct { +} + +func (*validateOpGetMaintenanceWindowExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMaintenanceWindowExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMaintenanceWindowExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMaintenanceWindowExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMaintenanceWindowExecutionTask struct { +} + +func (*validateOpGetMaintenanceWindowExecutionTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMaintenanceWindowExecutionTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMaintenanceWindowExecutionTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMaintenanceWindowExecutionTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMaintenanceWindowExecutionTaskInvocation struct { +} + +func (*validateOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMaintenanceWindowExecutionTaskInvocation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMaintenanceWindowExecutionTaskInvocationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMaintenanceWindowExecutionTaskInvocationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMaintenanceWindow struct { +} + +func (*validateOpGetMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMaintenanceWindowTask struct { +} + +func (*validateOpGetMaintenanceWindowTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMaintenanceWindowTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMaintenanceWindowTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMaintenanceWindowTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOpsItem struct { +} + +func (*validateOpGetOpsItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOpsItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOpsItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOpsItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOpsMetadata struct { +} + +func (*validateOpGetOpsMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOpsMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOpsMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOpsMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOpsSummary struct { +} + +func (*validateOpGetOpsSummary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOpsSummary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOpsSummaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOpsSummaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetParameterHistory struct { +} + +func (*validateOpGetParameterHistory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetParameterHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetParameterHistoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetParameterHistoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetParameter struct { +} + +func (*validateOpGetParameter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetParameter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetParameterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetParameterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetParametersByPath struct { +} + +func (*validateOpGetParametersByPath) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetParametersByPath) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetParametersByPathInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetParametersByPathInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetParameters struct { +} + +func (*validateOpGetParameters) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetParametersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetParametersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPatchBaselineForPatchGroup struct { +} + +func (*validateOpGetPatchBaselineForPatchGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPatchBaselineForPatchGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPatchBaselineForPatchGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPatchBaselineForPatchGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPatchBaseline struct { +} + +func (*validateOpGetPatchBaseline) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPatchBaselineInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResourcePolicies struct { +} + +func (*validateOpGetResourcePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetServiceSetting struct { +} + +func (*validateOpGetServiceSetting) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetServiceSetting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetServiceSettingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetServiceSettingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpLabelParameterVersion struct { +} + +func (*validateOpLabelParameterVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpLabelParameterVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*LabelParameterVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpLabelParameterVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAssociations struct { +} + +func (*validateOpListAssociations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAssociationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAssociationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAssociationVersions struct { +} + +func (*validateOpListAssociationVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAssociationVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAssociationVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAssociationVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCommandInvocations struct { +} + +func (*validateOpListCommandInvocations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCommandInvocations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCommandInvocationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCommandInvocationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCommands struct { +} + +func (*validateOpListCommands) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCommands) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCommandsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCommandsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDocumentMetadataHistory struct { +} + +func (*validateOpListDocumentMetadataHistory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDocumentMetadataHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDocumentMetadataHistoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDocumentMetadataHistoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDocuments struct { +} + +func (*validateOpListDocuments) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDocuments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDocumentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDocumentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDocumentVersions struct { +} + +func (*validateOpListDocumentVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDocumentVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDocumentVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDocumentVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListInventoryEntries struct { +} + +func (*validateOpListInventoryEntries) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListInventoryEntries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListInventoryEntriesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListInventoryEntriesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListNodes struct { +} + +func (*validateOpListNodes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListNodes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListNodesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListNodesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListNodesSummary struct { +} + +func (*validateOpListNodesSummary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListNodesSummary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListNodesSummaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListNodesSummaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListOpsItemEvents struct { +} + +func (*validateOpListOpsItemEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOpsItemEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpsItemEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpsItemEventsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListOpsItemRelatedItems struct { +} + +func (*validateOpListOpsItemRelatedItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOpsItemRelatedItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpsItemRelatedItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpsItemRelatedItemsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListOpsMetadata struct { +} + +func (*validateOpListOpsMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOpsMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpsMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpsMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpModifyDocumentPermission struct { +} + +func (*validateOpModifyDocumentPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifyDocumentPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifyDocumentPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifyDocumentPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutComplianceItems struct { +} + +func (*validateOpPutComplianceItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutComplianceItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutComplianceItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutComplianceItemsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutInventory struct { +} + +func (*validateOpPutInventory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutInventory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutInventoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutInventoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutParameter struct { +} + +func (*validateOpPutParameter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutParameter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutParameterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutParameterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRegisterDefaultPatchBaseline struct { +} + +func (*validateOpRegisterDefaultPatchBaseline) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterDefaultPatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterDefaultPatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterDefaultPatchBaselineInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRegisterPatchBaselineForPatchGroup struct { +} + +func (*validateOpRegisterPatchBaselineForPatchGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterPatchBaselineForPatchGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterPatchBaselineForPatchGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterPatchBaselineForPatchGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRegisterTargetWithMaintenanceWindow struct { +} + +func (*validateOpRegisterTargetWithMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterTargetWithMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterTargetWithMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterTargetWithMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRegisterTaskWithMaintenanceWindow struct { +} + +func (*validateOpRegisterTaskWithMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterTaskWithMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterTaskWithMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterTaskWithMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveTagsFromResource struct { +} + +func (*validateOpRemoveTagsFromResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveTagsFromResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveTagsFromResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveTagsFromResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpResetServiceSetting struct { +} + +func (*validateOpResetServiceSetting) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpResetServiceSetting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ResetServiceSettingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpResetServiceSettingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpResumeSession struct { +} + +func (*validateOpResumeSession) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpResumeSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ResumeSessionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpResumeSessionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSendAutomationSignal struct { +} + +func (*validateOpSendAutomationSignal) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendAutomationSignal) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendAutomationSignalInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendAutomationSignalInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSendCommand struct { +} + +func (*validateOpSendCommand) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendCommand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendCommandInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendCommandInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartAccessRequest struct { +} + +func (*validateOpStartAccessRequest) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartAccessRequest) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartAccessRequestInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartAccessRequestInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartAssociationsOnce struct { +} + +func (*validateOpStartAssociationsOnce) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartAssociationsOnce) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartAssociationsOnceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartAssociationsOnceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartAutomationExecution struct { +} + +func (*validateOpStartAutomationExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartAutomationExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartAutomationExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartAutomationExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartChangeRequestExecution struct { +} + +func (*validateOpStartChangeRequestExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartChangeRequestExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartChangeRequestExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartChangeRequestExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartExecutionPreview struct { +} + +func (*validateOpStartExecutionPreview) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartExecutionPreview) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartExecutionPreviewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartExecutionPreviewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartSession struct { +} + +func (*validateOpStartSession) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartSessionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartSessionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopAutomationExecution struct { +} + +func (*validateOpStopAutomationExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopAutomationExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopAutomationExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopAutomationExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTerminateSession struct { +} + +func (*validateOpTerminateSession) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTerminateSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TerminateSessionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTerminateSessionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUnlabelParameterVersion struct { +} + +func (*validateOpUnlabelParameterVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUnlabelParameterVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UnlabelParameterVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUnlabelParameterVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAssociation struct { +} + +func (*validateOpUpdateAssociation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAssociationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAssociationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAssociationStatus struct { +} + +func (*validateOpUpdateAssociationStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAssociationStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAssociationStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAssociationStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDocumentDefaultVersion struct { +} + +func (*validateOpUpdateDocumentDefaultVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDocumentDefaultVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDocumentDefaultVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDocumentDefaultVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDocument struct { +} + +func (*validateOpUpdateDocument) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDocumentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDocumentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDocumentMetadata struct { +} + +func (*validateOpUpdateDocumentMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDocumentMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDocumentMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDocumentMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateMaintenanceWindow struct { +} + +func (*validateOpUpdateMaintenanceWindow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateMaintenanceWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateMaintenanceWindowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateMaintenanceWindowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateMaintenanceWindowTarget struct { +} + +func (*validateOpUpdateMaintenanceWindowTarget) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateMaintenanceWindowTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateMaintenanceWindowTargetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateMaintenanceWindowTargetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateMaintenanceWindowTask struct { +} + +func (*validateOpUpdateMaintenanceWindowTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateMaintenanceWindowTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateMaintenanceWindowTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateMaintenanceWindowTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateManagedInstanceRole struct { +} + +func (*validateOpUpdateManagedInstanceRole) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateManagedInstanceRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateManagedInstanceRoleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateManagedInstanceRoleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOpsItem struct { +} + +func (*validateOpUpdateOpsItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOpsItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOpsItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOpsItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOpsMetadata struct { +} + +func (*validateOpUpdateOpsMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOpsMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOpsMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOpsMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdatePatchBaseline struct { +} + +func (*validateOpUpdatePatchBaseline) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdatePatchBaseline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdatePatchBaselineInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdatePatchBaselineInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateResourceDataSync struct { +} + +func (*validateOpUpdateResourceDataSync) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateResourceDataSync) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateResourceDataSyncInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateResourceDataSyncInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateServiceSetting struct { +} + +func (*validateOpUpdateServiceSetting) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateServiceSetting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateServiceSettingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateServiceSettingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAddTagsToResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddTagsToResource{}, middleware.After) +} + +func addOpAssociateOpsItemRelatedItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateOpsItemRelatedItem{}, middleware.After) +} + +func addOpCancelCommandValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelCommand{}, middleware.After) +} + +func addOpCancelMaintenanceWindowExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelMaintenanceWindowExecution{}, middleware.After) +} + +func addOpCreateActivationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateActivation{}, middleware.After) +} + +func addOpCreateAssociationBatchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAssociationBatch{}, middleware.After) +} + +func addOpCreateAssociationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAssociation{}, middleware.After) +} + +func addOpCreateDocumentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDocument{}, middleware.After) +} + +func addOpCreateMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateMaintenanceWindow{}, middleware.After) +} + +func addOpCreateOpsItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOpsItem{}, middleware.After) +} + +func addOpCreateOpsMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOpsMetadata{}, middleware.After) +} + +func addOpCreatePatchBaselineValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePatchBaseline{}, middleware.After) +} + +func addOpCreateResourceDataSyncValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateResourceDataSync{}, middleware.After) +} + +func addOpDeleteActivationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteActivation{}, middleware.After) +} + +func addOpDeleteDocumentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDocument{}, middleware.After) +} + +func addOpDeleteInventoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteInventory{}, middleware.After) +} + +func addOpDeleteMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteMaintenanceWindow{}, middleware.After) +} + +func addOpDeleteOpsItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOpsItem{}, middleware.After) +} + +func addOpDeleteOpsMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOpsMetadata{}, middleware.After) +} + +func addOpDeleteParameterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteParameter{}, middleware.After) +} + +func addOpDeleteParametersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteParameters{}, middleware.After) +} + +func addOpDeletePatchBaselineValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePatchBaseline{}, middleware.After) +} + +func addOpDeleteResourceDataSyncValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourceDataSync{}, middleware.After) +} + +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + +func addOpDeregisterManagedInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterManagedInstance{}, middleware.After) +} + +func addOpDeregisterPatchBaselineForPatchGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterPatchBaselineForPatchGroup{}, middleware.After) +} + +func addOpDeregisterTargetFromMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterTargetFromMaintenanceWindow{}, middleware.After) +} + +func addOpDeregisterTaskFromMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterTaskFromMaintenanceWindow{}, middleware.After) +} + +func addOpDescribeAssociationExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAssociationExecutions{}, middleware.After) +} + +func addOpDescribeAssociationExecutionTargetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAssociationExecutionTargets{}, middleware.After) +} + +func addOpDescribeAutomationExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAutomationExecutions{}, middleware.After) +} + +func addOpDescribeAutomationStepExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAutomationStepExecutions{}, middleware.After) +} + +func addOpDescribeDocumentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDocument{}, middleware.After) +} + +func addOpDescribeDocumentPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDocumentPermission{}, middleware.After) +} + +func addOpDescribeEffectiveInstanceAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeEffectiveInstanceAssociations{}, middleware.After) +} + +func addOpDescribeEffectivePatchesForPatchBaselineValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeEffectivePatchesForPatchBaseline{}, middleware.After) +} + +func addOpDescribeInstanceAssociationsStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstanceAssociationsStatus{}, middleware.After) +} + +func addOpDescribeInstanceInformationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstanceInformation{}, middleware.After) +} + +func addOpDescribeInstancePatchesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstancePatches{}, middleware.After) +} + +func addOpDescribeInstancePatchStatesForPatchGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstancePatchStatesForPatchGroup{}, middleware.After) +} + +func addOpDescribeInstancePatchStatesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstancePatchStates{}, middleware.After) +} + +func addOpDescribeInstancePropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstanceProperties{}, middleware.After) +} + +func addOpDescribeMaintenanceWindowExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowExecutions{}, middleware.After) +} + +func addOpDescribeMaintenanceWindowExecutionTaskInvocationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowExecutionTaskInvocations{}, middleware.After) +} + +func addOpDescribeMaintenanceWindowExecutionTasksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowExecutionTasks{}, middleware.After) +} + +func addOpDescribeMaintenanceWindowsForTargetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowsForTarget{}, middleware.After) +} + +func addOpDescribeMaintenanceWindowTargetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowTargets{}, middleware.After) +} + +func addOpDescribeMaintenanceWindowTasksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowTasks{}, middleware.After) +} + +func addOpDescribeOpsItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeOpsItems{}, middleware.After) +} + +func addOpDescribeParametersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeParameters{}, middleware.After) +} + +func addOpDescribePatchGroupStateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribePatchGroupState{}, middleware.After) +} + +func addOpDescribePatchPropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribePatchProperties{}, middleware.After) +} + +func addOpDescribeSessionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeSessions{}, middleware.After) +} + +func addOpDisassociateOpsItemRelatedItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateOpsItemRelatedItem{}, middleware.After) +} + +func addOpGetAccessTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAccessToken{}, middleware.After) +} + +func addOpGetAutomationExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAutomationExecution{}, middleware.After) +} + +func addOpGetCalendarStateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCalendarState{}, middleware.After) +} + +func addOpGetCommandInvocationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCommandInvocation{}, middleware.After) +} + +func addOpGetConnectionStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetConnectionStatus{}, middleware.After) +} + +func addOpGetDeployablePatchSnapshotForInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDeployablePatchSnapshotForInstance{}, middleware.After) +} + +func addOpGetDocumentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDocument{}, middleware.After) +} + +func addOpGetExecutionPreviewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExecutionPreview{}, middleware.After) +} + +func addOpGetInventoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetInventory{}, middleware.After) +} + +func addOpGetMaintenanceWindowExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMaintenanceWindowExecution{}, middleware.After) +} + +func addOpGetMaintenanceWindowExecutionTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMaintenanceWindowExecutionTask{}, middleware.After) +} + +func addOpGetMaintenanceWindowExecutionTaskInvocationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMaintenanceWindowExecutionTaskInvocation{}, middleware.After) +} + +func addOpGetMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMaintenanceWindow{}, middleware.After) +} + +func addOpGetMaintenanceWindowTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMaintenanceWindowTask{}, middleware.After) +} + +func addOpGetOpsItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOpsItem{}, middleware.After) +} + +func addOpGetOpsMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOpsMetadata{}, middleware.After) +} + +func addOpGetOpsSummaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOpsSummary{}, middleware.After) +} + +func addOpGetParameterHistoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetParameterHistory{}, middleware.After) +} + +func addOpGetParameterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetParameter{}, middleware.After) +} + +func addOpGetParametersByPathValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetParametersByPath{}, middleware.After) +} + +func addOpGetParametersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetParameters{}, middleware.After) +} + +func addOpGetPatchBaselineForPatchGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPatchBaselineForPatchGroup{}, middleware.After) +} + +func addOpGetPatchBaselineValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPatchBaseline{}, middleware.After) +} + +func addOpGetResourcePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicies{}, middleware.After) +} + +func addOpGetServiceSettingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetServiceSetting{}, middleware.After) +} + +func addOpLabelParameterVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpLabelParameterVersion{}, middleware.After) +} + +func addOpListAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAssociations{}, middleware.After) +} + +func addOpListAssociationVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAssociationVersions{}, middleware.After) +} + +func addOpListCommandInvocationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCommandInvocations{}, middleware.After) +} + +func addOpListCommandsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCommands{}, middleware.After) +} + +func addOpListDocumentMetadataHistoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDocumentMetadataHistory{}, middleware.After) +} + +func addOpListDocumentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDocuments{}, middleware.After) +} + +func addOpListDocumentVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDocumentVersions{}, middleware.After) +} + +func addOpListInventoryEntriesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListInventoryEntries{}, middleware.After) +} + +func addOpListNodesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListNodes{}, middleware.After) +} + +func addOpListNodesSummaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListNodesSummary{}, middleware.After) +} + +func addOpListOpsItemEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpsItemEvents{}, middleware.After) +} + +func addOpListOpsItemRelatedItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpsItemRelatedItems{}, middleware.After) +} + +func addOpListOpsMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpsMetadata{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpModifyDocumentPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifyDocumentPermission{}, middleware.After) +} + +func addOpPutComplianceItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutComplianceItems{}, middleware.After) +} + +func addOpPutInventoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutInventory{}, middleware.After) +} + +func addOpPutParameterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutParameter{}, middleware.After) +} + +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + +func addOpRegisterDefaultPatchBaselineValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterDefaultPatchBaseline{}, middleware.After) +} + +func addOpRegisterPatchBaselineForPatchGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterPatchBaselineForPatchGroup{}, middleware.After) +} + +func addOpRegisterTargetWithMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterTargetWithMaintenanceWindow{}, middleware.After) +} + +func addOpRegisterTaskWithMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterTaskWithMaintenanceWindow{}, middleware.After) +} + +func addOpRemoveTagsFromResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveTagsFromResource{}, middleware.After) +} + +func addOpResetServiceSettingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpResetServiceSetting{}, middleware.After) +} + +func addOpResumeSessionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpResumeSession{}, middleware.After) +} + +func addOpSendAutomationSignalValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendAutomationSignal{}, middleware.After) +} + +func addOpSendCommandValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendCommand{}, middleware.After) +} + +func addOpStartAccessRequestValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartAccessRequest{}, middleware.After) +} + +func addOpStartAssociationsOnceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartAssociationsOnce{}, middleware.After) +} + +func addOpStartAutomationExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartAutomationExecution{}, middleware.After) +} + +func addOpStartChangeRequestExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartChangeRequestExecution{}, middleware.After) +} + +func addOpStartExecutionPreviewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartExecutionPreview{}, middleware.After) +} + +func addOpStartSessionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartSession{}, middleware.After) +} + +func addOpStopAutomationExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopAutomationExecution{}, middleware.After) +} + +func addOpTerminateSessionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTerminateSession{}, middleware.After) +} + +func addOpUnlabelParameterVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUnlabelParameterVersion{}, middleware.After) +} + +func addOpUpdateAssociationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAssociation{}, middleware.After) +} + +func addOpUpdateAssociationStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAssociationStatus{}, middleware.After) +} + +func addOpUpdateDocumentDefaultVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDocumentDefaultVersion{}, middleware.After) +} + +func addOpUpdateDocumentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDocument{}, middleware.After) +} + +func addOpUpdateDocumentMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDocumentMetadata{}, middleware.After) +} + +func addOpUpdateMaintenanceWindowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateMaintenanceWindow{}, middleware.After) +} + +func addOpUpdateMaintenanceWindowTargetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateMaintenanceWindowTarget{}, middleware.After) +} + +func addOpUpdateMaintenanceWindowTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateMaintenanceWindowTask{}, middleware.After) +} + +func addOpUpdateManagedInstanceRoleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateManagedInstanceRole{}, middleware.After) +} + +func addOpUpdateOpsItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOpsItem{}, middleware.After) +} + +func addOpUpdateOpsMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOpsMetadata{}, middleware.After) +} + +func addOpUpdatePatchBaselineValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePatchBaseline{}, middleware.After) +} + +func addOpUpdateResourceDataSyncValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateResourceDataSync{}, middleware.After) +} + +func addOpUpdateServiceSettingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateServiceSetting{}, middleware.After) +} + +func validateAlarm(v *types.Alarm) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Alarm"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAlarmConfiguration(v *types.AlarmConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AlarmConfiguration"} + if v.Alarms == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alarms")) + } else if v.Alarms != nil { + if err := validateAlarmList(v.Alarms); err != nil { + invalidParams.AddNested("Alarms", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAlarmList(v []types.Alarm) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AlarmList"} + for i := range v { + if err := validateAlarm(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationExecutionFilter(v *types.AssociationExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationExecutionFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationExecutionFilterList(v []types.AssociationExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationExecutionFilterList"} + for i := range v { + if err := validateAssociationExecutionFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationExecutionTargetsFilter(v *types.AssociationExecutionTargetsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationExecutionTargetsFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationExecutionTargetsFilterList(v []types.AssociationExecutionTargetsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationExecutionTargetsFilterList"} + for i := range v { + if err := validateAssociationExecutionTargetsFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationFilter(v *types.AssociationFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationFilterList(v []types.AssociationFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationFilterList"} + for i := range v { + if err := validateAssociationFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAssociationStatus(v *types.AssociationStatus) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociationStatus"} + if v.Date == nil { + invalidParams.Add(smithy.NewErrParamRequired("Date")) + } + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Message == nil { + invalidParams.Add(smithy.NewErrParamRequired("Message")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAutomationExecutionFilter(v *types.AutomationExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutomationExecutionFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAutomationExecutionFilterList(v []types.AutomationExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutomationExecutionFilterList"} + for i := range v { + if err := validateAutomationExecutionFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAutomationExecutionInputs(v *types.AutomationExecutionInputs) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutomationExecutionInputs"} + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBaselineOverride(v *types.BaselineOverride) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BaselineOverride"} + if v.GlobalFilters != nil { + if err := validatePatchFilterGroup(v.GlobalFilters); err != nil { + invalidParams.AddNested("GlobalFilters", err.(smithy.InvalidParamsError)) + } + } + if v.ApprovalRules != nil { + if err := validatePatchRuleGroup(v.ApprovalRules); err != nil { + invalidParams.AddNested("ApprovalRules", err.(smithy.InvalidParamsError)) + } + } + if v.Sources != nil { + if err := validatePatchSourceList(v.Sources); err != nil { + invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCommandFilter(v *types.CommandFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CommandFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCommandFilterList(v []types.CommandFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CommandFilterList"} + for i := range v { + if err := validateCommandFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComplianceExecutionSummary(v *types.ComplianceExecutionSummary) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComplianceExecutionSummary"} + if v.ExecutionTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionTime")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComplianceItemEntry(v *types.ComplianceItemEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComplianceItemEntry"} + if len(v.Severity) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Severity")) + } + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComplianceItemEntryList(v []types.ComplianceItemEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComplianceItemEntryList"} + for i := range v { + if err := validateComplianceItemEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreateAssociationBatchRequestEntries(v []types.CreateAssociationBatchRequestEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAssociationBatchRequestEntries"} + for i := range v { + if err := validateCreateAssociationBatchRequestEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreateAssociationBatchRequestEntry(v *types.CreateAssociationBatchRequestEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAssociationBatchRequestEntry"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDocumentFilter(v *types.DocumentFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DocumentFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDocumentFilterList(v []types.DocumentFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DocumentFilterList"} + for i := range v { + if err := validateDocumentFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDocumentRequires(v *types.DocumentRequires) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DocumentRequires"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDocumentRequiresList(v []types.DocumentRequires) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DocumentRequiresList"} + for i := range v { + if err := validateDocumentRequires(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDocumentReviews(v *types.DocumentReviews) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DocumentReviews"} + if len(v.Action) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExecutionInputs(v types.ExecutionInputs) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExecutionInputs"} + switch uv := v.(type) { + case *types.ExecutionInputsMemberAutomation: + if err := validateAutomationExecutionInputs(&uv.Value); err != nil { + invalidParams.AddNested("[Automation]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstanceInformationFilter(v *types.InstanceInformationFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceInformationFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.ValueSet == nil { + invalidParams.Add(smithy.NewErrParamRequired("ValueSet")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstanceInformationFilterList(v []types.InstanceInformationFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceInformationFilterList"} + for i := range v { + if err := validateInstanceInformationFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstanceInformationStringFilter(v *types.InstanceInformationStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceInformationStringFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstanceInformationStringFilterList(v []types.InstanceInformationStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceInformationStringFilterList"} + for i := range v { + if err := validateInstanceInformationStringFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePatchStateFilter(v *types.InstancePatchStateFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePatchStateFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePatchStateFilterList(v []types.InstancePatchStateFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePatchStateFilterList"} + for i := range v { + if err := validateInstancePatchStateFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyFilter(v *types.InstancePropertyFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.ValueSet == nil { + invalidParams.Add(smithy.NewErrParamRequired("ValueSet")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyFilterList(v []types.InstancePropertyFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyFilterList"} + for i := range v { + if err := validateInstancePropertyFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyStringFilter(v *types.InstancePropertyStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyStringFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyStringFilterList(v []types.InstancePropertyStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyStringFilterList"} + for i := range v { + if err := validateInstancePropertyStringFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryAggregator(v *types.InventoryAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryAggregator"} + if v.Aggregators != nil { + if err := validateInventoryAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if v.Groups != nil { + if err := validateInventoryGroupList(v.Groups); err != nil { + invalidParams.AddNested("Groups", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryAggregatorList(v []types.InventoryAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryAggregatorList"} + for i := range v { + if err := validateInventoryAggregator(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryFilter(v *types.InventoryFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryFilterList(v []types.InventoryFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryFilterList"} + for i := range v { + if err := validateInventoryFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryGroup(v *types.InventoryGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryGroup"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Filters == nil { + invalidParams.Add(smithy.NewErrParamRequired("Filters")) + } else if v.Filters != nil { + if err := validateInventoryFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryGroupList(v []types.InventoryGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryGroupList"} + for i := range v { + if err := validateInventoryGroup(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryItem(v *types.InventoryItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryItem"} + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if v.SchemaVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("SchemaVersion")) + } + if v.CaptureTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("CaptureTime")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInventoryItemList(v []types.InventoryItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InventoryItemList"} + for i := range v { + if err := validateInventoryItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLoggingInfo(v *types.LoggingInfo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LoggingInfo"} + if v.S3BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3BucketName")) + } + if v.S3Region == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Region")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeAggregator(v *types.NodeAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeAggregator"} + if len(v.AggregatorType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AggregatorType")) + } + if len(v.TypeName) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if len(v.AttributeName) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AttributeName")) + } + if v.Aggregators != nil { + if err := validateNodeAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeAggregatorList(v []types.NodeAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeAggregatorList"} + for i := range v { + if err := validateNodeAggregator(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeFilter(v *types.NodeFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeFilterList(v []types.NodeFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeFilterList"} + for i := range v { + if err := validateNodeFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsAggregator(v *types.OpsAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsAggregator"} + if v.Filters != nil { + if err := validateOpsFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if v.Aggregators != nil { + if err := validateOpsAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsAggregatorList(v []types.OpsAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsAggregatorList"} + for i := range v { + if err := validateOpsAggregator(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsFilter(v *types.OpsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsFilterList(v []types.OpsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsFilterList"} + for i := range v { + if err := validateOpsFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsItemEventFilter(v *types.OpsItemEventFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemEventFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsItemEventFilters(v []types.OpsItemEventFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemEventFilters"} + for i := range v { + if err := validateOpsItemEventFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsItemFilter(v *types.OpsItemFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsItemFilters(v []types.OpsItemFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemFilters"} + for i := range v { + if err := validateOpsItemFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsItemRelatedItemsFilter(v *types.OpsItemRelatedItemsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemRelatedItemsFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsItemRelatedItemsFilters(v []types.OpsItemRelatedItemsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemRelatedItemsFilters"} + for i := range v { + if err := validateOpsItemRelatedItemsFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsMetadataFilter(v *types.OpsMetadataFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsMetadataFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsMetadataFilterList(v []types.OpsMetadataFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsMetadataFilterList"} + for i := range v { + if err := validateOpsMetadataFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsResultAttribute(v *types.OpsResultAttribute) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsResultAttribute"} + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpsResultAttributeList(v []types.OpsResultAttribute) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsResultAttributeList"} + for i := range v { + if err := validateOpsResultAttribute(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParametersFilter(v *types.ParametersFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParametersFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParametersFilterList(v []types.ParametersFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParametersFilterList"} + for i := range v { + if err := validateParametersFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParameterStringFilter(v *types.ParameterStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParameterStringFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParameterStringFilterList(v []types.ParameterStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParameterStringFilterList"} + for i := range v { + if err := validateParameterStringFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchFilter(v *types.PatchFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchFilterGroup(v *types.PatchFilterGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchFilterGroup"} + if v.PatchFilters == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchFilters")) + } else if v.PatchFilters != nil { + if err := validatePatchFilterList(v.PatchFilters); err != nil { + invalidParams.AddNested("PatchFilters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchFilterList(v []types.PatchFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchFilterList"} + for i := range v { + if err := validatePatchFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchRule(v *types.PatchRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchRule"} + if v.PatchFilterGroup == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchFilterGroup")) + } else if v.PatchFilterGroup != nil { + if err := validatePatchFilterGroup(v.PatchFilterGroup); err != nil { + invalidParams.AddNested("PatchFilterGroup", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchRuleGroup(v *types.PatchRuleGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchRuleGroup"} + if v.PatchRules == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchRules")) + } else if v.PatchRules != nil { + if err := validatePatchRuleList(v.PatchRules); err != nil { + invalidParams.AddNested("PatchRules", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchRuleList(v []types.PatchRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchRuleList"} + for i := range v { + if err := validatePatchRule(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchSource(v *types.PatchSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchSource"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Products == nil { + invalidParams.Add(smithy.NewErrParamRequired("Products")) + } + if v.Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("Configuration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePatchSourceList(v []types.PatchSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PatchSourceList"} + for i := range v { + if err := validatePatchSource(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRegistrationMetadataItem(v *types.RegistrationMetadataItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistrationMetadataItem"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRegistrationMetadataList(v []types.RegistrationMetadataItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistrationMetadataList"} + for i := range v { + if err := validateRegistrationMetadataItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRelatedOpsItem(v *types.RelatedOpsItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RelatedOpsItem"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRelatedOpsItems(v []types.RelatedOpsItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RelatedOpsItems"} + for i := range v { + if err := validateRelatedOpsItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceDataSyncAwsOrganizationsSource(v *types.ResourceDataSyncAwsOrganizationsSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceDataSyncAwsOrganizationsSource"} + if v.OrganizationSourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationSourceType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceDataSyncS3Destination(v *types.ResourceDataSyncS3Destination) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceDataSyncS3Destination"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if len(v.SyncFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SyncFormat")) + } + if v.Region == nil { + invalidParams.Add(smithy.NewErrParamRequired("Region")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceDataSyncSource(v *types.ResourceDataSyncSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceDataSyncSource"} + if v.SourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceType")) + } + if v.AwsOrganizationsSource != nil { + if err := validateResourceDataSyncAwsOrganizationsSource(v.AwsOrganizationsSource); err != nil { + invalidParams.AddNested("AwsOrganizationsSource", err.(smithy.InvalidParamsError)) + } + } + if v.SourceRegions == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceRegions")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResultAttribute(v *types.ResultAttribute) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResultAttribute"} + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResultAttributeList(v []types.ResultAttribute) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResultAttributeList"} + for i := range v { + if err := validateResultAttribute(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRunbook(v *types.Runbook) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Runbook"} + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRunbooks(v []types.Runbook) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Runbooks"} + for i := range v { + if err := validateRunbook(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSessionFilter(v *types.SessionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SessionFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSessionFilterList(v []types.SessionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SessionFilterList"} + for i := range v { + if err := validateSessionFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStepExecutionFilter(v *types.StepExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StepExecutionFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStepExecutionFilterList(v []types.StepExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StepExecutionFilterList"} + for i := range v { + if err := validateStepExecutionFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTargetLocation(v *types.TargetLocation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TargetLocation"} + if v.TargetLocationAlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.TargetLocationAlarmConfiguration); err != nil { + invalidParams.AddNested("TargetLocationAlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTargetLocations(v []types.TargetLocation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TargetLocations"} + for i := range v { + if err := validateTargetLocation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddTagsToResourceInput(v *AddTagsToResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddTagsToResourceInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateOpsItemRelatedItemInput(v *AssociateOpsItemRelatedItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateOpsItemRelatedItemInput"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if v.AssociationType == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationType")) + } + if v.ResourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceUri == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceUri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelCommandInput(v *CancelCommandInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelCommandInput"} + if v.CommandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommandId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelMaintenanceWindowExecutionInput(v *CancelMaintenanceWindowExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelMaintenanceWindowExecutionInput"} + if v.WindowExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowExecutionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateActivationInput(v *CreateActivationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateActivationInput"} + if v.IamRole == nil { + invalidParams.Add(smithy.NewErrParamRequired("IamRole")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.RegistrationMetadata != nil { + if err := validateRegistrationMetadataList(v.RegistrationMetadata); err != nil { + invalidParams.AddNested("RegistrationMetadata", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAssociationBatchInput(v *CreateAssociationBatchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAssociationBatchInput"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateCreateAssociationBatchRequestEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAssociationInput(v *CreateAssociationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAssociationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDocumentInput(v *CreateDocumentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDocumentInput"} + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if v.Requires != nil { + if err := validateDocumentRequiresList(v.Requires); err != nil { + invalidParams.AddNested("Requires", err.(smithy.InvalidParamsError)) + } + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateMaintenanceWindowInput(v *CreateMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateMaintenanceWindowInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Schedule == nil { + invalidParams.Add(smithy.NewErrParamRequired("Schedule")) + } + if v.Duration == nil { + invalidParams.Add(smithy.NewErrParamRequired("Duration")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOpsItemInput(v *CreateOpsItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOpsItemInput"} + if v.Description == nil { + invalidParams.Add(smithy.NewErrParamRequired("Description")) + } + if v.RelatedOpsItems != nil { + if err := validateRelatedOpsItems(v.RelatedOpsItems); err != nil { + invalidParams.AddNested("RelatedOpsItems", err.(smithy.InvalidParamsError)) + } + } + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Title == nil { + invalidParams.Add(smithy.NewErrParamRequired("Title")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOpsMetadataInput(v *CreateOpsMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOpsMetadataInput"} + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreatePatchBaselineInput(v *CreatePatchBaselineInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePatchBaselineInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.GlobalFilters != nil { + if err := validatePatchFilterGroup(v.GlobalFilters); err != nil { + invalidParams.AddNested("GlobalFilters", err.(smithy.InvalidParamsError)) + } + } + if v.ApprovalRules != nil { + if err := validatePatchRuleGroup(v.ApprovalRules); err != nil { + invalidParams.AddNested("ApprovalRules", err.(smithy.InvalidParamsError)) + } + } + if v.Sources != nil { + if err := validatePatchSourceList(v.Sources); err != nil { + invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateResourceDataSyncInput(v *CreateResourceDataSyncInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateResourceDataSyncInput"} + if v.SyncName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SyncName")) + } + if v.S3Destination != nil { + if err := validateResourceDataSyncS3Destination(v.S3Destination); err != nil { + invalidParams.AddNested("S3Destination", err.(smithy.InvalidParamsError)) + } + } + if v.SyncSource != nil { + if err := validateResourceDataSyncSource(v.SyncSource); err != nil { + invalidParams.AddNested("SyncSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteActivationInput(v *DeleteActivationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteActivationInput"} + if v.ActivationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActivationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDocumentInput(v *DeleteDocumentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDocumentInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteInventoryInput(v *DeleteInventoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteInventoryInput"} + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteMaintenanceWindowInput(v *DeleteMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteOpsItemInput(v *DeleteOpsItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOpsItemInput"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteOpsMetadataInput(v *DeleteOpsMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOpsMetadataInput"} + if v.OpsMetadataArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsMetadataArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteParameterInput(v *DeleteParameterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteParameterInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteParametersInput(v *DeleteParametersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteParametersInput"} + if v.Names == nil { + invalidParams.Add(smithy.NewErrParamRequired("Names")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePatchBaselineInput(v *DeletePatchBaselineInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePatchBaselineInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResourceDataSyncInput(v *DeleteResourceDataSyncInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourceDataSyncInput"} + if v.SyncName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SyncName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.PolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyId")) + } + if v.PolicyHash == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyHash")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeregisterManagedInstanceInput(v *DeregisterManagedInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterManagedInstanceInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeregisterPatchBaselineForPatchGroupInput(v *DeregisterPatchBaselineForPatchGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterPatchBaselineForPatchGroupInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if v.PatchGroup == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchGroup")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeregisterTargetFromMaintenanceWindowInput(v *DeregisterTargetFromMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterTargetFromMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if v.WindowTargetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowTargetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeregisterTaskFromMaintenanceWindowInput(v *DeregisterTaskFromMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterTaskFromMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if v.WindowTaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowTaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAssociationExecutionsInput(v *DescribeAssociationExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAssociationExecutionsInput"} + if v.AssociationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) + } + if v.Filters != nil { + if err := validateAssociationExecutionFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAssociationExecutionTargetsInput(v *DescribeAssociationExecutionTargetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAssociationExecutionTargetsInput"} + if v.AssociationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) + } + if v.ExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionId")) + } + if v.Filters != nil { + if err := validateAssociationExecutionTargetsFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAutomationExecutionsInput(v *DescribeAutomationExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAutomationExecutionsInput"} + if v.Filters != nil { + if err := validateAutomationExecutionFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAutomationStepExecutionsInput(v *DescribeAutomationStepExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAutomationStepExecutionsInput"} + if v.AutomationExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AutomationExecutionId")) + } + if v.Filters != nil { + if err := validateStepExecutionFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDocumentInput(v *DescribeDocumentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDocumentInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDocumentPermissionInput(v *DescribeDocumentPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDocumentPermissionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.PermissionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PermissionType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeEffectiveInstanceAssociationsInput(v *DescribeEffectiveInstanceAssociationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeEffectiveInstanceAssociationsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeEffectivePatchesForPatchBaselineInput(v *DescribeEffectivePatchesForPatchBaselineInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeEffectivePatchesForPatchBaselineInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstanceAssociationsStatusInput(v *DescribeInstanceAssociationsStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceAssociationsStatusInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstanceInformationInput(v *DescribeInstanceInformationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceInformationInput"} + if v.InstanceInformationFilterList != nil { + if err := validateInstanceInformationFilterList(v.InstanceInformationFilterList); err != nil { + invalidParams.AddNested("InstanceInformationFilterList", err.(smithy.InvalidParamsError)) + } + } + if v.Filters != nil { + if err := validateInstanceInformationStringFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstancePatchesInput(v *DescribeInstancePatchesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstancePatchesInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstancePatchStatesForPatchGroupInput(v *DescribeInstancePatchStatesForPatchGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstancePatchStatesForPatchGroupInput"} + if v.PatchGroup == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchGroup")) + } + if v.Filters != nil { + if err := validateInstancePatchStateFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstancePatchStatesInput(v *DescribeInstancePatchStatesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstancePatchStatesInput"} + if v.InstanceIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstancePropertiesInput(v *DescribeInstancePropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstancePropertiesInput"} + if v.InstancePropertyFilterList != nil { + if err := validateInstancePropertyFilterList(v.InstancePropertyFilterList); err != nil { + invalidParams.AddNested("InstancePropertyFilterList", err.(smithy.InvalidParamsError)) + } + } + if v.FiltersWithOperator != nil { + if err := validateInstancePropertyStringFilterList(v.FiltersWithOperator); err != nil { + invalidParams.AddNested("FiltersWithOperator", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMaintenanceWindowExecutionsInput(v *DescribeMaintenanceWindowExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMaintenanceWindowExecutionsInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMaintenanceWindowExecutionTaskInvocationsInput(v *DescribeMaintenanceWindowExecutionTaskInvocationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMaintenanceWindowExecutionTaskInvocationsInput"} + if v.WindowExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowExecutionId")) + } + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMaintenanceWindowExecutionTasksInput(v *DescribeMaintenanceWindowExecutionTasksInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMaintenanceWindowExecutionTasksInput"} + if v.WindowExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowExecutionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMaintenanceWindowsForTargetInput(v *DescribeMaintenanceWindowsForTargetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMaintenanceWindowsForTargetInput"} + if v.Targets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Targets")) + } + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMaintenanceWindowTargetsInput(v *DescribeMaintenanceWindowTargetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMaintenanceWindowTargetsInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMaintenanceWindowTasksInput(v *DescribeMaintenanceWindowTasksInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMaintenanceWindowTasksInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeOpsItemsInput(v *DescribeOpsItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeOpsItemsInput"} + if v.OpsItemFilters != nil { + if err := validateOpsItemFilters(v.OpsItemFilters); err != nil { + invalidParams.AddNested("OpsItemFilters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeParametersInput(v *DescribeParametersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeParametersInput"} + if v.Filters != nil { + if err := validateParametersFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if v.ParameterFilters != nil { + if err := validateParameterStringFilterList(v.ParameterFilters); err != nil { + invalidParams.AddNested("ParameterFilters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribePatchGroupStateInput(v *DescribePatchGroupStateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribePatchGroupStateInput"} + if v.PatchGroup == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchGroup")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribePatchPropertiesInput(v *DescribePatchPropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribePatchPropertiesInput"} + if len(v.OperatingSystem) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OperatingSystem")) + } + if len(v.Property) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Property")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeSessionsInput(v *DescribeSessionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeSessionsInput"} + if len(v.State) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("State")) + } + if v.Filters != nil { + if err := validateSessionFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisassociateOpsItemRelatedItemInput(v *DisassociateOpsItemRelatedItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateOpsItemRelatedItemInput"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if v.AssociationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAccessTokenInput(v *GetAccessTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAccessTokenInput"} + if v.AccessRequestId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessRequestId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAutomationExecutionInput(v *GetAutomationExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAutomationExecutionInput"} + if v.AutomationExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AutomationExecutionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCalendarStateInput(v *GetCalendarStateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCalendarStateInput"} + if v.CalendarNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("CalendarNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCommandInvocationInput(v *GetCommandInvocationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCommandInvocationInput"} + if v.CommandId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommandId")) + } + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetConnectionStatusInput(v *GetConnectionStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetConnectionStatusInput"} + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDeployablePatchSnapshotForInstanceInput(v *GetDeployablePatchSnapshotForInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDeployablePatchSnapshotForInstanceInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.SnapshotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) + } + if v.BaselineOverride != nil { + if err := validateBaselineOverride(v.BaselineOverride); err != nil { + invalidParams.AddNested("BaselineOverride", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDocumentInput(v *GetDocumentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDocumentInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetExecutionPreviewInput(v *GetExecutionPreviewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExecutionPreviewInput"} + if v.ExecutionPreviewId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionPreviewId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetInventoryInput(v *GetInventoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetInventoryInput"} + if v.Filters != nil { + if err := validateInventoryFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if v.Aggregators != nil { + if err := validateInventoryAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if v.ResultAttributes != nil { + if err := validateResultAttributeList(v.ResultAttributes); err != nil { + invalidParams.AddNested("ResultAttributes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMaintenanceWindowExecutionInput(v *GetMaintenanceWindowExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMaintenanceWindowExecutionInput"} + if v.WindowExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowExecutionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMaintenanceWindowExecutionTaskInput(v *GetMaintenanceWindowExecutionTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMaintenanceWindowExecutionTaskInput"} + if v.WindowExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowExecutionId")) + } + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMaintenanceWindowExecutionTaskInvocationInput(v *GetMaintenanceWindowExecutionTaskInvocationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMaintenanceWindowExecutionTaskInvocationInput"} + if v.WindowExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowExecutionId")) + } + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if v.InvocationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InvocationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMaintenanceWindowInput(v *GetMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMaintenanceWindowTaskInput(v *GetMaintenanceWindowTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMaintenanceWindowTaskInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if v.WindowTaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowTaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOpsItemInput(v *GetOpsItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOpsItemInput"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOpsMetadataInput(v *GetOpsMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOpsMetadataInput"} + if v.OpsMetadataArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsMetadataArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOpsSummaryInput(v *GetOpsSummaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOpsSummaryInput"} + if v.Filters != nil { + if err := validateOpsFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if v.Aggregators != nil { + if err := validateOpsAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if v.ResultAttributes != nil { + if err := validateOpsResultAttributeList(v.ResultAttributes); err != nil { + invalidParams.AddNested("ResultAttributes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetParameterHistoryInput(v *GetParameterHistoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetParameterHistoryInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetParameterInput(v *GetParameterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetParameterInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetParametersByPathInput(v *GetParametersByPathInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetParametersByPathInput"} + if v.Path == nil { + invalidParams.Add(smithy.NewErrParamRequired("Path")) + } + if v.ParameterFilters != nil { + if err := validateParameterStringFilterList(v.ParameterFilters); err != nil { + invalidParams.AddNested("ParameterFilters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetParametersInput(v *GetParametersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetParametersInput"} + if v.Names == nil { + invalidParams.Add(smithy.NewErrParamRequired("Names")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPatchBaselineForPatchGroupInput(v *GetPatchBaselineForPatchGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPatchBaselineForPatchGroupInput"} + if v.PatchGroup == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchGroup")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPatchBaselineInput(v *GetPatchBaselineInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPatchBaselineInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResourcePoliciesInput(v *GetResourcePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePoliciesInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetServiceSettingInput(v *GetServiceSettingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetServiceSettingInput"} + if v.SettingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SettingId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpLabelParameterVersionInput(v *LabelParameterVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LabelParameterVersionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Labels == nil { + invalidParams.Add(smithy.NewErrParamRequired("Labels")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAssociationsInput(v *ListAssociationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAssociationsInput"} + if v.AssociationFilterList != nil { + if err := validateAssociationFilterList(v.AssociationFilterList); err != nil { + invalidParams.AddNested("AssociationFilterList", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAssociationVersionsInput(v *ListAssociationVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAssociationVersionsInput"} + if v.AssociationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCommandInvocationsInput(v *ListCommandInvocationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCommandInvocationsInput"} + if v.Filters != nil { + if err := validateCommandFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCommandsInput(v *ListCommandsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCommandsInput"} + if v.Filters != nil { + if err := validateCommandFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDocumentMetadataHistoryInput(v *ListDocumentMetadataHistoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDocumentMetadataHistoryInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Metadata) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Metadata")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDocumentsInput(v *ListDocumentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDocumentsInput"} + if v.DocumentFilterList != nil { + if err := validateDocumentFilterList(v.DocumentFilterList); err != nil { + invalidParams.AddNested("DocumentFilterList", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDocumentVersionsInput(v *ListDocumentVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDocumentVersionsInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListInventoryEntriesInput(v *ListInventoryEntriesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListInventoryEntriesInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if v.Filters != nil { + if err := validateInventoryFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListNodesInput(v *ListNodesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListNodesInput"} + if v.Filters != nil { + if err := validateNodeFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListNodesSummaryInput(v *ListNodesSummaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListNodesSummaryInput"} + if v.Filters != nil { + if err := validateNodeFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if v.Aggregators == nil { + invalidParams.Add(smithy.NewErrParamRequired("Aggregators")) + } else if v.Aggregators != nil { + if err := validateNodeAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListOpsItemEventsInput(v *ListOpsItemEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOpsItemEventsInput"} + if v.Filters != nil { + if err := validateOpsItemEventFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListOpsItemRelatedItemsInput(v *ListOpsItemRelatedItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOpsItemRelatedItemsInput"} + if v.Filters != nil { + if err := validateOpsItemRelatedItemsFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListOpsMetadataInput(v *ListOpsMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOpsMetadataInput"} + if v.Filters != nil { + if err := validateOpsMetadataFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpModifyDocumentPermissionInput(v *ModifyDocumentPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifyDocumentPermissionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.PermissionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PermissionType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutComplianceItemsInput(v *PutComplianceItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutComplianceItemsInput"} + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if v.ResourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ComplianceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComplianceType")) + } + if v.ExecutionSummary == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionSummary")) + } else if v.ExecutionSummary != nil { + if err := validateComplianceExecutionSummary(v.ExecutionSummary); err != nil { + invalidParams.AddNested("ExecutionSummary", err.(smithy.InvalidParamsError)) + } + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } else if v.Items != nil { + if err := validateComplianceItemEntryList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutInventoryInput(v *PutInventoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutInventoryInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } else if v.Items != nil { + if err := validateInventoryItemList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutParameterInput(v *PutParameterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutParameterInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRegisterDefaultPatchBaselineInput(v *RegisterDefaultPatchBaselineInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisterDefaultPatchBaselineInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRegisterPatchBaselineForPatchGroupInput(v *RegisterPatchBaselineForPatchGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisterPatchBaselineForPatchGroupInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if v.PatchGroup == nil { + invalidParams.Add(smithy.NewErrParamRequired("PatchGroup")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRegisterTargetWithMaintenanceWindowInput(v *RegisterTargetWithMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisterTargetWithMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.Targets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Targets")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRegisterTaskWithMaintenanceWindowInput(v *RegisterTaskWithMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisterTaskWithMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if v.TaskArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskArn")) + } + if len(v.TaskType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TaskType")) + } + if v.LoggingInfo != nil { + if err := validateLoggingInfo(v.LoggingInfo); err != nil { + invalidParams.AddNested("LoggingInfo", err.(smithy.InvalidParamsError)) + } + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveTagsFromResourceInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpResetServiceSettingInput(v *ResetServiceSettingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResetServiceSettingInput"} + if v.SettingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SettingId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpResumeSessionInput(v *ResumeSessionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResumeSessionInput"} + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSendAutomationSignalInput(v *SendAutomationSignalInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendAutomationSignalInput"} + if v.AutomationExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AutomationExecutionId")) + } + if len(v.SignalType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SignalType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSendCommandInput(v *SendCommandInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendCommandInput"} + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartAccessRequestInput(v *StartAccessRequestInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartAccessRequestInput"} + if v.Reason == nil { + invalidParams.Add(smithy.NewErrParamRequired("Reason")) + } + if v.Targets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Targets")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartAssociationsOnceInput(v *StartAssociationsOnceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartAssociationsOnceInput"} + if v.AssociationIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartAutomationExecutionInput(v *StartAutomationExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartAutomationExecutionInput"} + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartChangeRequestExecutionInput(v *StartChangeRequestExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartChangeRequestExecutionInput"} + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if v.Runbooks == nil { + invalidParams.Add(smithy.NewErrParamRequired("Runbooks")) + } else if v.Runbooks != nil { + if err := validateRunbooks(v.Runbooks); err != nil { + invalidParams.AddNested("Runbooks", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartExecutionPreviewInput(v *StartExecutionPreviewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartExecutionPreviewInput"} + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if v.ExecutionInputs != nil { + if err := validateExecutionInputs(v.ExecutionInputs); err != nil { + invalidParams.AddNested("ExecutionInputs", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartSessionInput(v *StartSessionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartSessionInput"} + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopAutomationExecutionInput(v *StopAutomationExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopAutomationExecutionInput"} + if v.AutomationExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AutomationExecutionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTerminateSessionInput(v *TerminateSessionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TerminateSessionInput"} + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUnlabelParameterVersionInput(v *UnlabelParameterVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UnlabelParameterVersionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ParameterVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("ParameterVersion")) + } + if v.Labels == nil { + invalidParams.Add(smithy.NewErrParamRequired("Labels")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAssociationInput(v *UpdateAssociationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAssociationInput"} + if v.AssociationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) + } + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAssociationStatusInput(v *UpdateAssociationStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAssociationStatusInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.AssociationStatus == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationStatus")) + } else if v.AssociationStatus != nil { + if err := validateAssociationStatus(v.AssociationStatus); err != nil { + invalidParams.AddNested("AssociationStatus", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDocumentDefaultVersionInput(v *UpdateDocumentDefaultVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDocumentDefaultVersionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.DocumentVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDocumentInput(v *UpdateDocumentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDocumentInput"} + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDocumentMetadataInput(v *UpdateDocumentMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDocumentMetadataInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.DocumentReviews == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentReviews")) + } else if v.DocumentReviews != nil { + if err := validateDocumentReviews(v.DocumentReviews); err != nil { + invalidParams.AddNested("DocumentReviews", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateMaintenanceWindowInput(v *UpdateMaintenanceWindowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateMaintenanceWindowInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateMaintenanceWindowTargetInput(v *UpdateMaintenanceWindowTargetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateMaintenanceWindowTargetInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if v.WindowTargetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowTargetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateMaintenanceWindowTaskInput(v *UpdateMaintenanceWindowTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateMaintenanceWindowTaskInput"} + if v.WindowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowId")) + } + if v.WindowTaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WindowTaskId")) + } + if v.LoggingInfo != nil { + if err := validateLoggingInfo(v.LoggingInfo); err != nil { + invalidParams.AddNested("LoggingInfo", err.(smithy.InvalidParamsError)) + } + } + if v.AlarmConfiguration != nil { + if err := validateAlarmConfiguration(v.AlarmConfiguration); err != nil { + invalidParams.AddNested("AlarmConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateManagedInstanceRoleInput(v *UpdateManagedInstanceRoleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateManagedInstanceRoleInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.IamRole == nil { + invalidParams.Add(smithy.NewErrParamRequired("IamRole")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOpsItemInput(v *UpdateOpsItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOpsItemInput"} + if v.RelatedOpsItems != nil { + if err := validateRelatedOpsItems(v.RelatedOpsItems); err != nil { + invalidParams.AddNested("RelatedOpsItems", err.(smithy.InvalidParamsError)) + } + } + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOpsMetadataInput(v *UpdateOpsMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOpsMetadataInput"} + if v.OpsMetadataArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsMetadataArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdatePatchBaselineInput(v *UpdatePatchBaselineInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdatePatchBaselineInput"} + if v.BaselineId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaselineId")) + } + if v.GlobalFilters != nil { + if err := validatePatchFilterGroup(v.GlobalFilters); err != nil { + invalidParams.AddNested("GlobalFilters", err.(smithy.InvalidParamsError)) + } + } + if v.ApprovalRules != nil { + if err := validatePatchRuleGroup(v.ApprovalRules); err != nil { + invalidParams.AddNested("ApprovalRules", err.(smithy.InvalidParamsError)) + } + } + if v.Sources != nil { + if err := validatePatchSourceList(v.Sources); err != nil { + invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateResourceDataSyncInput(v *UpdateResourceDataSyncInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateResourceDataSyncInput"} + if v.SyncName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SyncName")) + } + if v.SyncType == nil { + invalidParams.Add(smithy.NewErrParamRequired("SyncType")) + } + if v.SyncSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("SyncSource")) + } else if v.SyncSource != nil { + if err := validateResourceDataSyncSource(v.SyncSource); err != nil { + invalidParams.AddNested("SyncSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateServiceSettingInput(v *UpdateServiceSettingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateServiceSettingInput"} + if v.SettingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SettingId")) + } + if v.SettingValue == nil { + invalidParams.Add(smithy.NewErrParamRequired("SettingValue")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index cf9d93e4b21..2a09dfa5a24 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -387,10 +387,17 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config +<<<<<<< HEAD # github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources # github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 +======= +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.20 +## explicit; go 1.24 +github.com/aws/aws-sdk-go-v2/internal/configsources +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.20 +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 @@ -446,8 +453,18 @@ github.com/aws/aws-sdk-go-v2/service/signin/types github.com/aws/aws-sdk-go-v2/service/sqs github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sqs/types +<<<<<<< HEAD # github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 ## explicit; go 1.24 +======= +# github.com/aws/aws-sdk-go-v2/service/ssm v1.68.3 +## explicit; go 1.24 +github.com/aws/aws-sdk-go-v2/service/ssm +github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/ssm/types +# github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 +## explicit; go 1.23 +>>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types From 2517b5d265b69d418dfdd301445fbab5cf4fd057 Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Thu, 26 Mar 2026 11:18:36 +0000 Subject: [PATCH 2/7] Refactor AWS initialisation to avoid duplication Signed-off-by: Julia Jablonska --- .../resolver/aws_parameterstore_handler.go | 38 ++---------- .../resolver/aws_secretmanager_handler.go | 38 ++---------- pkg/scaling/resolver/scale_resolvers.go | 61 ++++++++++++++++++- 3 files changed, 68 insertions(+), 69 deletions(-) diff --git a/pkg/scaling/resolver/aws_parameterstore_handler.go b/pkg/scaling/resolver/aws_parameterstore_handler.go index 44d9aacb0af..e0adfeacab4 100644 --- a/pkg/scaling/resolver/aws_parameterstore_handler.go +++ b/pkg/scaling/resolver/aws_parameterstore_handler.go @@ -69,40 +69,12 @@ func (apsh *AwsParameterStoreHandler) Read(ctx context.Context, logger logr.Logg } func (apsh *AwsParameterStoreHandler) Initialize(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister, podSpec *corev1.PodSpec) error { - apsh.awsMetadata = awsutils.AuthorizationMetadata{ - TriggerUniqueKey: fmt.Sprintf("aws-parameter-store-%s", triggerNamespace), - } - awsRegion := "" - if apsh.parameterStore.Region != "" { - awsRegion = apsh.parameterStore.Region - } - apsh.awsMetadata.AwsRegion = awsRegion - podIdentity := apsh.parameterStore.PodIdentity - if podIdentity == nil { - podIdentity = &kedav1alpha1.AuthPodIdentity{} - } - - switch podIdentity.Provider { - case "", kedav1alpha1.PodIdentityProviderNone: - apsh.awsMetadata.AwsAccessKeyID = resolveAuthSecret(ctx, client, logger, apsh.parameterStore.Credentials.AccessKey.ValueFrom.SecretKeyRef.Name, triggerNamespace, apsh.parameterStore.Credentials.AccessKey.ValueFrom.SecretKeyRef.Key, secretsLister) - apsh.awsMetadata.AwsSecretAccessKey = resolveAuthSecret(ctx, client, logger, apsh.parameterStore.Credentials.AccessSecretKey.ValueFrom.SecretKeyRef.Name, triggerNamespace, apsh.parameterStore.Credentials.AccessSecretKey.ValueFrom.SecretKeyRef.Key, secretsLister) - if apsh.awsMetadata.AwsAccessKeyID == "" || apsh.awsMetadata.AwsSecretAccessKey == "" { - return fmt.Errorf("AccessKeyID and AccessSecretKey are expected when not using a pod identity provider") - } - case kedav1alpha1.PodIdentityProviderAws: - apsh.awsMetadata.UsingPodIdentity = true - if apsh.parameterStore.PodIdentity.IsWorkloadIdentityOwner() { - awsRoleArn, err := resolveServiceAccountAnnotation(ctx, client, podSpec.ServiceAccountName, triggerNamespace, kedav1alpha1.PodIdentityAnnotationEKS, true) - if err != nil { - return fmt.Errorf("error resolving role arn for aws: %w", err) - } - apsh.awsMetadata.AwsRoleArn = awsRoleArn - } else if apsh.parameterStore.PodIdentity.RoleArn != nil { - apsh.awsMetadata.AwsRoleArn = *apsh.parameterStore.PodIdentity.RoleArn - } - default: - return fmt.Errorf("pod identity provider %s not supported", podIdentity.Provider) + metadata, err := initializeAwsMetadata(ctx, client, logger, triggerNamespace, secretsLister, podSpec, + "aws-parameter-store", apsh.parameterStore.Region, apsh.parameterStore.PodIdentity, apsh.parameterStore.Credentials) + if err != nil { + return err } + apsh.awsMetadata = metadata config, err := awsutils.GetAwsConfig(ctx, apsh.awsMetadata) if err != nil { diff --git a/pkg/scaling/resolver/aws_secretmanager_handler.go b/pkg/scaling/resolver/aws_secretmanager_handler.go index 789734a2a82..5fd1ac991f6 100644 --- a/pkg/scaling/resolver/aws_secretmanager_handler.go +++ b/pkg/scaling/resolver/aws_secretmanager_handler.go @@ -88,40 +88,12 @@ func (ash *AwsSecretManagerHandler) Read(ctx context.Context, logger logr.Logger // Initialize sets up the AWS Secret Manager handler by configuring AWS credentials, AWS region, or using pod identity. // It initializes the AWS Secret Manager session and metadata. func (ash *AwsSecretManagerHandler) Initialize(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister, podSpec *corev1.PodSpec) error { - ash.awsMetadata = awsutils.AuthorizationMetadata{ - TriggerUniqueKey: fmt.Sprintf("aws-secret-manager-%s", triggerNamespace), - } - awsRegion := "" - if ash.secretManager.Region != "" { - awsRegion = ash.secretManager.Region - } - ash.awsMetadata.AwsRegion = awsRegion - podIdentity := ash.secretManager.PodIdentity - if podIdentity == nil { - podIdentity = &kedav1alpha1.AuthPodIdentity{} - } - - switch podIdentity.Provider { - case "", kedav1alpha1.PodIdentityProviderNone: - ash.awsMetadata.AwsAccessKeyID = resolveAuthSecret(ctx, client, logger, ash.secretManager.Credentials.AccessKey.ValueFrom.SecretKeyRef.Name, triggerNamespace, ash.secretManager.Credentials.AccessKey.ValueFrom.SecretKeyRef.Key, secretsLister) - ash.awsMetadata.AwsSecretAccessKey = resolveAuthSecret(ctx, client, logger, ash.secretManager.Credentials.AccessSecretKey.ValueFrom.SecretKeyRef.Name, triggerNamespace, ash.secretManager.Credentials.AccessSecretKey.ValueFrom.SecretKeyRef.Key, secretsLister) - if ash.awsMetadata.AwsAccessKeyID == "" || ash.awsMetadata.AwsSecretAccessKey == "" { - return fmt.Errorf("AccessKeyID and AccessSecretKey are expected when not using a pod identity provider") - } - case kedav1alpha1.PodIdentityProviderAws: - ash.awsMetadata.UsingPodIdentity = true - if ash.secretManager.PodIdentity.IsWorkloadIdentityOwner() { - awsRoleArn, err := resolveServiceAccountAnnotation(ctx, client, podSpec.ServiceAccountName, triggerNamespace, kedav1alpha1.PodIdentityAnnotationEKS, true) - if err != nil { - return fmt.Errorf("error resolving role arn for aws: %w", err) - } - ash.awsMetadata.AwsRoleArn = awsRoleArn - } else if ash.secretManager.PodIdentity.RoleArn != nil { - ash.awsMetadata.AwsRoleArn = *ash.secretManager.PodIdentity.RoleArn - } - default: - return fmt.Errorf("pod identity provider %s not supported", podIdentity.Provider) + metadata, err := initializeAwsMetadata(ctx, client, logger, triggerNamespace, secretsLister, podSpec, + "aws-secret-manager", ash.secretManager.Region, ash.secretManager.PodIdentity, ash.secretManager.Credentials) + if err != nil { + return err } + ash.awsMetadata = metadata config, err := awsutils.GetAwsConfig(ctx, ash.awsMetadata) if err != nil { diff --git a/pkg/scaling/resolver/scale_resolvers.go b/pkg/scaling/resolver/scale_resolvers.go index b46613801d1..6f80eb68d29 100644 --- a/pkg/scaling/resolver/scale_resolvers.go +++ b/pkg/scaling/resolver/scale_resolvers.go @@ -43,6 +43,7 @@ import ( kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1" "github.com/kedacore/keda/v2/pkg/scalers/authentication" + awsutils "github.com/kedacore/keda/v2/pkg/scalers/aws" "github.com/kedacore/keda/v2/pkg/util" ) @@ -385,10 +386,10 @@ func resolveAuthRef(ctx context.Context, client client.Client, logger logr.Logge if triggerAuthSpec.AwsParameterStore != nil && len(triggerAuthSpec.AwsParameterStore.Parameters) > 0 { awsParameterStoreHandler := NewAwsParameterStoreHandler(triggerAuthSpec.AwsParameterStore) err := awsParameterStoreHandler.Initialize(ctx, client, logger, triggerNamespace, authClientSet.SecretLister, podSpec) - defer awsParameterStoreHandler.Stop() if err != nil { logger.Error(err, "error authenticating to Aws Parameter Store", "triggerAuthRef.Name", triggerAuthRef.Name) } else { + defer awsParameterStoreHandler.Stop() for _, parameter := range triggerAuthSpec.AwsParameterStore.Parameters { res, err := awsParameterStoreHandler.Read(ctx, logger, parameter.Name, parameter.WithDecryption) if err != nil { @@ -723,7 +724,7 @@ func GenerateBoundServiceAccountToken(ctx context.Context, serviceAccountName, n // resolveServiceAccountAnnotation retrieves the value of a specific annotation // from the annotations of a given Kubernetes ServiceAccount. -func resolveServiceAccountAnnotation(ctx context.Context, client client.Client, name, namespace, annotation string, required bool) (string, error) { +func resolveServiceAccountAnnotation(ctx context.Context, client client.Client, name, namespace, annotation string, _ bool) (string, error) { serviceAccountName := defaultServiceAccount if name != "" { serviceAccountName = name @@ -734,12 +735,66 @@ func resolveServiceAccountAnnotation(ctx context.Context, client client.Client, return "", fmt.Errorf("error getting service account: '%s', error: %w", serviceAccountName, err) } value, ok := serviceAccount.Annotations[annotation] - if !ok && required { + if !ok { return "", fmt.Errorf("annotation '%s' not found", annotation) } return value, nil } +// initializeAwsMetadata is a helper function to initialize AWS metadata for AWS service handlers +// to eliminate code duplication between AWS Secret Manager and Parameter Store handlers. +func initializeAwsMetadata(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister, podSpec *corev1.PodSpec, serviceName, region string, podIdentity *kedav1alpha1.AuthPodIdentity, credentials interface{}) (awsutils.AuthorizationMetadata, error) { + metadata := awsutils.AuthorizationMetadata{ + TriggerUniqueKey: fmt.Sprintf("%s-%s", serviceName, triggerNamespace), + } + + if region != "" { + metadata.AwsRegion = region + } + + if podIdentity == nil { + podIdentity = &kedav1alpha1.AuthPodIdentity{} + } + + switch podIdentity.Provider { + case "", kedav1alpha1.PodIdentityProviderNone: + // Extract credentials based on type + var accessKey, secretKey *kedav1alpha1.ValueFromSecret + switch creds := credentials.(type) { + case *kedav1alpha1.AwsSecretManagerCredentials: + if creds != nil { + accessKey = &creds.AccessKey.ValueFrom + secretKey = &creds.AccessSecretKey.ValueFrom + } + case *kedav1alpha1.AwsParameterStoreCredentials: + if creds != nil { + accessKey = &creds.AccessKey.ValueFrom + secretKey = &creds.AccessSecretKey.ValueFrom + } + } + + if accessKey != nil && secretKey != nil { + metadata.AwsAccessKeyID = resolveAuthSecret(ctx, client, logger, accessKey.SecretKeyRef.Name, triggerNamespace, accessKey.SecretKeyRef.Key, secretsLister) + metadata.AwsSecretAccessKey = resolveAuthSecret(ctx, client, logger, secretKey.SecretKeyRef.Name, triggerNamespace, secretKey.SecretKeyRef.Key, secretsLister) + } + case kedav1alpha1.PodIdentityProviderAws: + metadata.UsingPodIdentity = true + if podIdentity.IsWorkloadIdentityOwner() { + awsRoleArn, err := resolveServiceAccountAnnotation(ctx, client, podSpec.ServiceAccountName, triggerNamespace, kedav1alpha1.PodIdentityAnnotationEKS, true) + if err != nil { + return metadata, fmt.Errorf("error resolving role arn for aws: %w", err) + } + metadata.AwsRoleArn = awsRoleArn + } else if podIdentity.RoleArn != nil { + metadata.AwsRoleArn = *podIdentity.RoleArn + } + default: + return metadata, fmt.Errorf("pod identity provider %s not supported", podIdentity.Provider) + } + + return metadata, nil +} + // GetCurrentReplicas returns the current replica count for a ScaledObject func GetCurrentReplicas(ctx context.Context, client client.Client, scaleClient scale.ScalesGetter, scaledObject *kedav1alpha1.ScaledObject) (int32, error) { targetName := scaledObject.Spec.ScaleTargetRef.Name From 461cdec8136729726c15aabcb6f72f019cee95a3 Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Tue, 31 Mar 2026 14:07:36 +0100 Subject: [PATCH 3/7] Explain withDecryption arg Signed-off-by: Julia Jablonska --- apis/keda/v1alpha1/triggerauthentication_types.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apis/keda/v1alpha1/triggerauthentication_types.go b/apis/keda/v1alpha1/triggerauthentication_types.go index b7266a133f0..f6020b269c4 100644 --- a/apis/keda/v1alpha1/triggerauthentication_types.go +++ b/apis/keda/v1alpha1/triggerauthentication_types.go @@ -424,6 +424,10 @@ type AwsParameterStoreValue struct { ValueFrom ValueFromSecret `json:"valueFrom"` } +// WithDecryption defaults to true if not specified. +// For SecureString parameters, this must be true to retrieve the plaintext value. +// Set to false for SecureString parameters to retrieve the encrypted value. +// For String parameters, this setting has no effect. type AwsParameterStoreParameter struct { Parameter string `json:"parameter"` Name string `json:"name"` From d58139178c6a12e2b5eeb1dcfe39634516b89d20 Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Tue, 31 Mar 2026 14:20:28 +0100 Subject: [PATCH 4/7] Update changelog Signed-off-by: Julia Jablonska --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 658b589b610..038d18ae98e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,7 +68,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio ### New -- TODO ([#XXX](https://github.com/kedacore/keda/issues/XXX)) +- **General**: Introduce AWS Systems Manager Parameter Store authentication provider ([#6311](https://github.com/kedacore/keda/issues/6311)) #### Experimental From 3f201620166260c71f82e0b51df599404054799d Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Tue, 31 Mar 2026 14:28:43 +0100 Subject: [PATCH 5/7] Make manifests Signed-off-by: Julia Jablonska --- config/crd/bases/keda.sh_clustertriggerauthentications.yaml | 5 +++++ config/crd/bases/keda.sh_triggerauthentications.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/config/crd/bases/keda.sh_clustertriggerauthentications.yaml b/config/crd/bases/keda.sh_clustertriggerauthentications.yaml index 9cb0a8fada2..48e2d55a7d2 100644 --- a/config/crd/bases/keda.sh_clustertriggerauthentications.yaml +++ b/config/crd/bases/keda.sh_clustertriggerauthentications.yaml @@ -139,6 +139,11 @@ spec: type: object parameters: items: + description: |- + WithDecryption defaults to true if not specified. + For SecureString parameters, this must be true to retrieve the plaintext value. + Set to false for SecureString parameters to retrieve the encrypted value. + For String parameters, this setting has no effect. properties: name: type: string diff --git a/config/crd/bases/keda.sh_triggerauthentications.yaml b/config/crd/bases/keda.sh_triggerauthentications.yaml index e13a6ecb5d2..6d0f74a55f1 100644 --- a/config/crd/bases/keda.sh_triggerauthentications.yaml +++ b/config/crd/bases/keda.sh_triggerauthentications.yaml @@ -135,6 +135,11 @@ spec: type: object parameters: items: + description: |- + WithDecryption defaults to true if not specified. + For SecureString parameters, this must be true to retrieve the plaintext value. + Set to false for SecureString parameters to retrieve the encrypted value. + For String parameters, this setting has no effect. properties: name: type: string From d5f3e73e2ad91213d04c6e326160f238bf6fc13a Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Thu, 9 Apr 2026 12:48:43 +0100 Subject: [PATCH 6/7] Add AWS SSM SDK dependency and update vendor Signed-off-by: Julia Jablonska --- go.mod | 2 ++ .../internal/middleware/middleware.go | 32 +++++++++++++++++++ vendor/modules.txt | 1 + 3 files changed, 35 insertions(+) create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go diff --git a/go.mod b/go.mod index e88e52c663f..0afd3c37ac3 100644 --- a/go.mod +++ b/go.mod @@ -148,6 +148,8 @@ require ( sigs.k8s.io/kustomize/kustomize/v5 v5.8.1 ) +require github.com/aws/aws-sdk-go-v2/service/ssm v1.68.3 + require ( cel.dev/expr v0.25.1 // indirect cloud.google.com/go v0.123.0 // indirect diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go new file mode 100644 index 00000000000..fb06d8dc055 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go @@ -0,0 +1,32 @@ +package middleware + +import ( + "context" + "sync/atomic" + + "github.com/aws/smithy-go/middleware" +) + +// AddTimeOffsetMiddleware is deprecated. +// +// Deprecated: handled in retry loop. +type AddTimeOffsetMiddleware struct { + Offset *atomic.Int64 +} + +// ID the identifier for AddTimeOffsetMiddleware +func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" } + +// HandleBuild is a no-op. +func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + return next.HandleBuild(ctx, in) +} + +// HandleDeserialize is a no-op. +func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + return next.HandleDeserialize(ctx, in) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 2a09dfa5a24..0719dd83cef 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -359,6 +359,7 @@ github.com/aws/aws-sdk-go-v2/internal/awsutil github.com/aws/aws-sdk-go-v2/internal/context github.com/aws/aws-sdk-go-v2/internal/endpoints github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn +github.com/aws/aws-sdk-go-v2/internal/middleware github.com/aws/aws-sdk-go-v2/internal/rand github.com/aws/aws-sdk-go-v2/internal/sdk github.com/aws/aws-sdk-go-v2/internal/sdkio From ce2edcc67e7e789b8a145e27440b4528b274c094 Mon Sep 17 00:00:00 2001 From: Julia Jablonska Date: Thu, 9 Apr 2026 14:05:56 +0100 Subject: [PATCH 7/7] Clean up merge conflict markers and ensure SSM dependency is explicit Signed-off-by: Julia Jablonska --- .../aws/aws-sdk-go-v2/aws/go_module_metadata.go | 4 ---- .../internal/configsources/CHANGELOG.md | 3 --- .../internal/configsources/go_module_metadata.go | 4 ---- .../internal/endpoints/v2/CHANGELOG.md | 3 --- .../internal/endpoints/v2/go_module_metadata.go | 4 ---- vendor/modules.txt | 16 ++-------------- 6 files changed, 2 insertions(+), 32 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index d70be8af9f5..57bfbfb694c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,8 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -<<<<<<< HEAD const goModuleVersion = "1.41.5" -======= -const goModuleVersion = "1.41.4" ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index b354dc2bdcc..1def5e2d9fa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,10 +1,7 @@ -<<<<<<< HEAD # v1.4.21 (2026-03-26) * **Dependency Update**: Updated to the latest SDK module versions -======= ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) # v1.4.20 (2026-03-13) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 01f822db1ad..548da96016c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,8 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -<<<<<<< HEAD const goModuleVersion = "1.4.21" -======= -const goModuleVersion = "1.4.20" ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 3a761d8b421..a2a1c183ffa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,10 +1,7 @@ -<<<<<<< HEAD # v2.7.21 (2026-03-26) * **Dependency Update**: Updated to the latest SDK module versions -======= ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) # v2.7.20 (2026-03-13) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 91bdda0a1d7..03a0b8c0380 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,8 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -<<<<<<< HEAD const goModuleVersion = "2.7.21" -======= -const goModuleVersion = "2.7.20" ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) diff --git a/vendor/modules.txt b/vendor/modules.txt index 0719dd83cef..f81fe5583c4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -388,17 +388,10 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -<<<<<<< HEAD # github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources # github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 -======= -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.20 -## explicit; go 1.24 -github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.20 ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 @@ -454,18 +447,13 @@ github.com/aws/aws-sdk-go-v2/service/signin/types github.com/aws/aws-sdk-go-v2/service/sqs github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sqs/types -<<<<<<< HEAD -# github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 -## explicit; go 1.24 -======= # github.com/aws/aws-sdk-go-v2/service/ssm v1.68.3 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/ssm github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssm/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.30.9 -## explicit; go 1.23 ->>>>>>> 025a918d3 (Add AWS Parameter Store support to TriggerAuthentication) +# github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 +## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types