capo-codeartifact 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- capo_codeartifact/__init__.py +72 -0
- capo_codeartifact/_async.py +25 -0
- capo_codeartifact/_auth/_identity.py +16 -0
- capo_codeartifact/_auth/_providers.py +886 -0
- capo_codeartifact/_auth/_signers.py +88 -0
- capo_codeartifact/_auth/_sigv4.py +434 -0
- capo_codeartifact/_auth/_zapros_handler.py +80 -0
- capo_codeartifact/_iter.py +113 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/associate_external_connection.py +181 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/copy_package_versions.py +202 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/create_domain.py +182 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/create_package_group.py +182 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/create_repository.py +189 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_domain.py +169 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_domain_permissions_policy.py +174 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_package.py +190 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_package_group.py +179 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_package_versions.py +195 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_repository.py +178 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/delete_repository_permissions_policy.py +176 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/describe_domain.py +169 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/describe_package.py +187 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/describe_package_group.py +169 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/describe_package_version.py +194 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/describe_repository.py +173 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/disassociate_external_connection.py +181 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/dispose_package_versions.py +200 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_associated_package_group.py +177 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_authorization_token.py +169 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_domain_permissions_policy.py +167 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_package_version_asset.py +208 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_package_version_readme.py +184 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_repository_endpoint.py +189 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/get_repository_permissions_policy.py +169 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_allowed_repositories_for_group.py +190 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_associated_packages.py +174 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_domains.py +164 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_groups.py +177 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_version_assets.py +189 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_version_dependencies.py +187 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_package_versions.py +220 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_packages.py +209 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_repositories.py +168 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_repositories_in_domain.py +175 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_sub_package_groups.py +173 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/list_tags_for_resource.py +160 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/publish_package_version.py +209 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/put_domain_permissions_policy.py +179 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/put_package_origin_configuration.py +190 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/put_repository_permissions_policy.py +185 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/tag_resource.py +163 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/untag_resource.py +158 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/update_package_group.py +176 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/update_package_group_origin_configuration.py +183 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/update_package_versions_status.py +198 -0
- capo_codeartifact/_operations/code_artifact_control_plane_service/update_repository.py +188 -0
- capo_codeartifact/_pagination.py +21 -0
- capo_codeartifact/_protocol/__init__.py +1 -0
- capo_codeartifact/_protocol/errors.py +93 -0
- capo_codeartifact/_protocol/eventstream.py +238 -0
- capo_codeartifact/_protocol/serialize.py +47 -0
- capo_codeartifact/_protocol/xml.py +33 -0
- capo_codeartifact/_rule_engine/__init__.py +0 -0
- capo_codeartifact/_rule_engine/_aws_partition.py +160 -0
- capo_codeartifact/_rule_engine/_endpoint_rule_set.py +138 -0
- capo_codeartifact/_rule_engine/_endpoint_runtime.py +389 -0
- capo_codeartifact/_services/_aws_config.py +160 -0
- capo_codeartifact/_services/_pipeline.py +198 -0
- capo_codeartifact/_services/async_codeartifact.py +3870 -0
- capo_codeartifact/_services/codeartifact.py +3822 -0
- capo_codeartifact/errors/__init__.py +36 -0
- capo_codeartifact/errors/_base.py +94 -0
- capo_codeartifact/errors/access_denied_exception.py +52 -0
- capo_codeartifact/errors/conflict_exception.py +71 -0
- capo_codeartifact/errors/internal_server_exception.py +52 -0
- capo_codeartifact/errors/resource_not_found_exception.py +73 -0
- capo_codeartifact/errors/service_quota_exceeded_exception.py +75 -0
- capo_codeartifact/errors/throttling_exception.py +55 -0
- capo_codeartifact/errors/validation_exception.py +71 -0
- capo_codeartifact/py.typed +0 -0
- capo_codeartifact/types/_prelude/blob.py +12 -0
- capo_codeartifact/types/_prelude/timestamp.py +17 -0
- capo_codeartifact/types/account_id.py +5 -0
- capo_codeartifact/types/allow_publish.py +17 -0
- capo_codeartifact/types/allow_upstream.py +17 -0
- capo_codeartifact/types/arn.py +5 -0
- capo_codeartifact/types/asset.py +7 -0
- capo_codeartifact/types/asset_hashes.py +33 -0
- capo_codeartifact/types/asset_name.py +5 -0
- capo_codeartifact/types/asset_summary.py +53 -0
- capo_codeartifact/types/asset_summary_list.py +29 -0
- capo_codeartifact/types/associate_external_connection_request.py +35 -0
- capo_codeartifact/types/associate_external_connection_result.py +42 -0
- capo_codeartifact/types/associated_package.py +71 -0
- capo_codeartifact/types/associated_package_list.py +31 -0
- capo_codeartifact/types/authorization_token_duration_seconds.py +5 -0
- capo_codeartifact/types/boolean_optional.py +5 -0
- capo_codeartifact/types/copy_package_versions_request.py +96 -0
- capo_codeartifact/types/copy_package_versions_result.py +63 -0
- capo_codeartifact/types/create_domain_request.py +42 -0
- capo_codeartifact/types/create_domain_result.py +36 -0
- capo_codeartifact/types/create_package_group_request.py +64 -0
- capo_codeartifact/types/create_package_group_result.py +42 -0
- capo_codeartifact/types/create_repository_request.py +69 -0
- capo_codeartifact/types/create_repository_result.py +42 -0
- capo_codeartifact/types/delete_domain_permissions_policy_request.py +32 -0
- capo_codeartifact/types/delete_domain_permissions_policy_result.py +36 -0
- capo_codeartifact/types/delete_domain_request.py +27 -0
- capo_codeartifact/types/delete_domain_result.py +36 -0
- capo_codeartifact/types/delete_package_group_request.py +30 -0
- capo_codeartifact/types/delete_package_group_result.py +42 -0
- capo_codeartifact/types/delete_package_request.py +39 -0
- capo_codeartifact/types/delete_package_result.py +39 -0
- capo_codeartifact/types/delete_package_versions_request.py +78 -0
- capo_codeartifact/types/delete_package_versions_result.py +63 -0
- capo_codeartifact/types/delete_repository_permissions_policy_request.py +35 -0
- capo_codeartifact/types/delete_repository_permissions_policy_result.py +36 -0
- capo_codeartifact/types/delete_repository_request.py +30 -0
- capo_codeartifact/types/delete_repository_result.py +42 -0
- capo_codeartifact/types/describe_domain_request.py +27 -0
- capo_codeartifact/types/describe_domain_result.py +35 -0
- capo_codeartifact/types/describe_package_group_request.py +30 -0
- capo_codeartifact/types/describe_package_group_result.py +42 -0
- capo_codeartifact/types/describe_package_request.py +39 -0
- capo_codeartifact/types/describe_package_result.py +39 -0
- capo_codeartifact/types/describe_package_version_request.py +42 -0
- capo_codeartifact/types/describe_package_version_result.py +47 -0
- capo_codeartifact/types/describe_repository_request.py +30 -0
- capo_codeartifact/types/describe_repository_result.py +42 -0
- capo_codeartifact/types/description.py +5 -0
- capo_codeartifact/types/disassociate_external_connection_request.py +35 -0
- capo_codeartifact/types/disassociate_external_connection_result.py +42 -0
- capo_codeartifact/types/dispose_package_versions_request.py +99 -0
- capo_codeartifact/types/dispose_package_versions_result.py +63 -0
- capo_codeartifact/types/domain_description.py +100 -0
- capo_codeartifact/types/domain_entry_point.py +39 -0
- capo_codeartifact/types/domain_name.py +5 -0
- capo_codeartifact/types/domain_status.py +17 -0
- capo_codeartifact/types/domain_summary.py +78 -0
- capo_codeartifact/types/domain_summary_list.py +31 -0
- capo_codeartifact/types/endpoint_type.py +17 -0
- capo_codeartifact/types/error_message.py +5 -0
- capo_codeartifact/types/external_connection_name.py +5 -0
- capo_codeartifact/types/external_connection_status.py +14 -0
- capo_codeartifact/types/get_associated_package_group_request.py +36 -0
- capo_codeartifact/types/get_associated_package_group_result.py +63 -0
- capo_codeartifact/types/get_authorization_token_request.py +32 -0
- capo_codeartifact/types/get_authorization_token_result.py +43 -0
- capo_codeartifact/types/get_domain_permissions_policy_request.py +27 -0
- capo_codeartifact/types/get_domain_permissions_policy_result.py +36 -0
- capo_codeartifact/types/get_package_version_asset_request.py +50 -0
- capo_codeartifact/types/get_package_version_asset_result.py +26 -0
- capo_codeartifact/types/get_package_version_readme_request.py +42 -0
- capo_codeartifact/types/get_package_version_readme_result.py +73 -0
- capo_codeartifact/types/get_repository_endpoint_request.py +36 -0
- capo_codeartifact/types/get_repository_endpoint_result.py +28 -0
- capo_codeartifact/types/get_repository_permissions_policy_request.py +30 -0
- capo_codeartifact/types/get_repository_permissions_policy_result.py +36 -0
- capo_codeartifact/types/hash_algorithm.py +19 -0
- capo_codeartifact/types/hash_value.py +5 -0
- capo_codeartifact/types/integer.py +5 -0
- capo_codeartifact/types/license_info.py +34 -0
- capo_codeartifact/types/license_info_list.py +29 -0
- capo_codeartifact/types/list_allowed_repositories_for_group_max_results.py +5 -0
- capo_codeartifact/types/list_allowed_repositories_for_group_request.py +41 -0
- capo_codeartifact/types/list_allowed_repositories_for_group_result.py +49 -0
- capo_codeartifact/types/list_associated_packages_request.py +41 -0
- capo_codeartifact/types/list_associated_packages_result.py +49 -0
- capo_codeartifact/types/list_domains_max_results.py +5 -0
- capo_codeartifact/types/list_domains_request.py +37 -0
- capo_codeartifact/types/list_domains_result.py +45 -0
- capo_codeartifact/types/list_package_groups_max_results.py +5 -0
- capo_codeartifact/types/list_package_groups_request.py +40 -0
- capo_codeartifact/types/list_package_groups_result.py +49 -0
- capo_codeartifact/types/list_package_version_assets_max_results.py +5 -0
- capo_codeartifact/types/list_package_version_assets_request.py +50 -0
- capo_codeartifact/types/list_package_version_assets_result.py +88 -0
- capo_codeartifact/types/list_package_version_dependencies_request.py +45 -0
- capo_codeartifact/types/list_package_version_dependencies_result.py +94 -0
- capo_codeartifact/types/list_package_versions_max_results.py +5 -0
- capo_codeartifact/types/list_package_versions_request.py +62 -0
- capo_codeartifact/types/list_package_versions_result.py +87 -0
- capo_codeartifact/types/list_packages_max_results.py +5 -0
- capo_codeartifact/types/list_packages_request.py +53 -0
- capo_codeartifact/types/list_packages_result.py +45 -0
- capo_codeartifact/types/list_repositories_in_domain_max_results.py +5 -0
- capo_codeartifact/types/list_repositories_in_domain_request.py +42 -0
- capo_codeartifact/types/list_repositories_in_domain_result.py +49 -0
- capo_codeartifact/types/list_repositories_max_results.py +5 -0
- capo_codeartifact/types/list_repositories_request.py +34 -0
- capo_codeartifact/types/list_repositories_result.py +49 -0
- capo_codeartifact/types/list_sub_package_groups_request.py +38 -0
- capo_codeartifact/types/list_sub_package_groups_result.py +49 -0
- capo_codeartifact/types/list_tags_for_resource_request.py +24 -0
- capo_codeartifact/types/list_tags_for_resource_result.py +32 -0
- capo_codeartifact/types/long.py +5 -0
- capo_codeartifact/types/long_optional.py +5 -0
- capo_codeartifact/types/origin_restrictions.py +48 -0
- capo_codeartifact/types/package_dependency.py +48 -0
- capo_codeartifact/types/package_dependency_list.py +31 -0
- capo_codeartifact/types/package_description.py +71 -0
- capo_codeartifact/types/package_format.py +23 -0
- capo_codeartifact/types/package_group_allowed_repository.py +51 -0
- capo_codeartifact/types/package_group_allowed_repository_list.py +39 -0
- capo_codeartifact/types/package_group_allowed_repository_update.py +44 -0
- capo_codeartifact/types/package_group_allowed_repository_update_type.py +17 -0
- capo_codeartifact/types/package_group_allowed_repository_updates.py +48 -0
- capo_codeartifact/types/package_group_association_type.py +17 -0
- capo_codeartifact/types/package_group_contact_info.py +5 -0
- capo_codeartifact/types/package_group_description.py +122 -0
- capo_codeartifact/types/package_group_origin_configuration.py +42 -0
- capo_codeartifact/types/package_group_origin_restriction.py +92 -0
- capo_codeartifact/types/package_group_origin_restriction_mode.py +19 -0
- capo_codeartifact/types/package_group_origin_restriction_type.py +18 -0
- capo_codeartifact/types/package_group_origin_restrictions.py +48 -0
- capo_codeartifact/types/package_group_pattern.py +5 -0
- capo_codeartifact/types/package_group_pattern_prefix.py +5 -0
- capo_codeartifact/types/package_group_reference.py +37 -0
- capo_codeartifact/types/package_group_summary.py +122 -0
- capo_codeartifact/types/package_group_summary_list.py +31 -0
- capo_codeartifact/types/package_name.py +5 -0
- capo_codeartifact/types/package_namespace.py +5 -0
- capo_codeartifact/types/package_origin_configuration.py +42 -0
- capo_codeartifact/types/package_origin_restrictions.py +55 -0
- capo_codeartifact/types/package_summary.py +71 -0
- capo_codeartifact/types/package_summary_list.py +31 -0
- capo_codeartifact/types/package_version.py +5 -0
- capo_codeartifact/types/package_version_description.py +156 -0
- capo_codeartifact/types/package_version_error.py +49 -0
- capo_codeartifact/types/package_version_error_code.py +21 -0
- capo_codeartifact/types/package_version_error_map.py +33 -0
- capo_codeartifact/types/package_version_list.py +19 -0
- capo_codeartifact/types/package_version_origin.py +63 -0
- capo_codeartifact/types/package_version_origin_type.py +18 -0
- capo_codeartifact/types/package_version_revision.py +5 -0
- capo_codeartifact/types/package_version_revision_map.py +29 -0
- capo_codeartifact/types/package_version_sort_type.py +14 -0
- capo_codeartifact/types/package_version_status.py +21 -0
- capo_codeartifact/types/package_version_summary.py +73 -0
- capo_codeartifact/types/package_version_summary_list.py +33 -0
- capo_codeartifact/types/pagination_token.py +5 -0
- capo_codeartifact/types/policy_document.py +5 -0
- capo_codeartifact/types/policy_revision.py +5 -0
- capo_codeartifact/types/publish_package_version_request.py +43 -0
- capo_codeartifact/types/publish_package_version_result.py +98 -0
- capo_codeartifact/types/put_domain_permissions_policy_request.py +57 -0
- capo_codeartifact/types/put_domain_permissions_policy_result.py +36 -0
- capo_codeartifact/types/put_package_origin_configuration_request.py +65 -0
- capo_codeartifact/types/put_package_origin_configuration_result.py +42 -0
- capo_codeartifact/types/put_repository_permissions_policy_request.py +51 -0
- capo_codeartifact/types/put_repository_permissions_policy_result.py +36 -0
- capo_codeartifact/types/repository_description.py +119 -0
- capo_codeartifact/types/repository_external_connection_info.py +66 -0
- capo_codeartifact/types/repository_external_connection_info_list.py +39 -0
- capo_codeartifact/types/repository_name.py +5 -0
- capo_codeartifact/types/repository_name_list.py +19 -0
- capo_codeartifact/types/repository_summary.py +77 -0
- capo_codeartifact/types/repository_summary_list.py +31 -0
- capo_codeartifact/types/resource_policy.py +42 -0
- capo_codeartifact/types/resource_type.py +20 -0
- capo_codeartifact/types/retry_after_seconds.py +5 -0
- capo_codeartifact/types/sha256.py +5 -0
- capo_codeartifact/types/string.py +5 -0
- capo_codeartifact/types/string255.py +5 -0
- capo_codeartifact/types/successful_package_version_info.py +45 -0
- capo_codeartifact/types/successful_package_version_info_map.py +41 -0
- capo_codeartifact/types/tag.py +39 -0
- capo_codeartifact/types/tag_key.py +5 -0
- capo_codeartifact/types/tag_key_list.py +17 -0
- capo_codeartifact/types/tag_list.py +29 -0
- capo_codeartifact/types/tag_resource_request.py +38 -0
- capo_codeartifact/types/tag_resource_result.py +18 -0
- capo_codeartifact/types/tag_value.py +5 -0
- capo_codeartifact/types/timestamp.py +20 -0
- capo_codeartifact/types/untag_resource_request.py +42 -0
- capo_codeartifact/types/untag_resource_result.py +18 -0
- capo_codeartifact/types/update_package_group_origin_configuration_request.py +92 -0
- capo_codeartifact/types/update_package_group_origin_configuration_result.py +63 -0
- capo_codeartifact/types/update_package_group_request.py +53 -0
- capo_codeartifact/types/update_package_group_result.py +42 -0
- capo_codeartifact/types/update_package_versions_status_request.py +120 -0
- capo_codeartifact/types/update_package_versions_status_result.py +63 -0
- capo_codeartifact/types/update_repository_request.py +58 -0
- capo_codeartifact/types/update_repository_result.py +42 -0
- capo_codeartifact/types/upstream_repository.py +31 -0
- capo_codeartifact/types/upstream_repository_info.py +30 -0
- capo_codeartifact/types/upstream_repository_info_list.py +35 -0
- capo_codeartifact/types/upstream_repository_list.py +31 -0
- capo_codeartifact/types/validation_exception_reason.py +20 -0
- capo_codeartifact-0.1.0.dist-info/METADATA +139 -0
- capo_codeartifact-0.1.0.dist-info/RECORD +294 -0
- capo_codeartifact-0.1.0.dist-info/WHEEL +5 -0
- capo_codeartifact-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_codeartifact-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from ._base import (
|
|
4
|
+
DeserializationError as DeserializationError,
|
|
5
|
+
)
|
|
6
|
+
from ._base import (
|
|
7
|
+
SerializationError as SerializationError,
|
|
8
|
+
)
|
|
9
|
+
from ._base import (
|
|
10
|
+
ServiceError as ServiceError,
|
|
11
|
+
)
|
|
12
|
+
from ._base import (
|
|
13
|
+
UnknownServiceError as UnknownServiceError,
|
|
14
|
+
)
|
|
15
|
+
from ._base import (
|
|
16
|
+
WaiterFailedError as WaiterFailedError,
|
|
17
|
+
)
|
|
18
|
+
from ._base import (
|
|
19
|
+
WaiterTimeoutError as WaiterTimeoutError,
|
|
20
|
+
)
|
|
21
|
+
from ._base import (
|
|
22
|
+
codeartifactError as codeartifactError,
|
|
23
|
+
)
|
|
24
|
+
from .access_denied_exception import AccessDeniedException as AccessDeniedException
|
|
25
|
+
from .conflict_exception import ConflictException as ConflictException
|
|
26
|
+
from .internal_server_exception import (
|
|
27
|
+
InternalServerException as InternalServerException,
|
|
28
|
+
)
|
|
29
|
+
from .resource_not_found_exception import (
|
|
30
|
+
ResourceNotFoundException as ResourceNotFoundException,
|
|
31
|
+
)
|
|
32
|
+
from .service_quota_exceeded_exception import (
|
|
33
|
+
ServiceQuotaExceededException as ServiceQuotaExceededException,
|
|
34
|
+
)
|
|
35
|
+
from .throttling_exception import ThrottlingException as ThrottlingException
|
|
36
|
+
from .validation_exception import ValidationException as ValidationException
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class codeartifactError(Exception):
|
|
5
|
+
"""Base class for all codeartifact service errors."""
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ServiceError(codeartifactError):
|
|
9
|
+
"""Base class for all modeled service errors.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
fault: ``"client"`` or ``"server"``.
|
|
13
|
+
is_throttling_error: Whether this error is a throttling error.
|
|
14
|
+
is_retryable: Whether this error is retryable.
|
|
15
|
+
code: The wire error code, or ``None``.
|
|
16
|
+
message: The error message, or ``None``.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
code: str | None = None
|
|
20
|
+
|
|
21
|
+
def __init__(
|
|
22
|
+
self,
|
|
23
|
+
fault: Literal["client", "server"],
|
|
24
|
+
*,
|
|
25
|
+
is_throttling_error: bool,
|
|
26
|
+
is_retryable: bool,
|
|
27
|
+
code: str | None = None,
|
|
28
|
+
message: str | None = None,
|
|
29
|
+
) -> None:
|
|
30
|
+
super().__init__(f"{code or '<no code>'}: {message or '<no message>'}")
|
|
31
|
+
self.fault = fault
|
|
32
|
+
self.is_throttling_error = is_throttling_error
|
|
33
|
+
self.is_retryable = is_retryable
|
|
34
|
+
self.code = code
|
|
35
|
+
self.message = message
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class SerializationError(codeartifactError):
|
|
39
|
+
"""Raised when a value cannot be serialized."""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DeserializationError(codeartifactError):
|
|
43
|
+
"""Raised when a value cannot be deserialized or a required member is missing."""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class UnknownServiceError(ServiceError):
|
|
47
|
+
"""Raised when the server returns an error code the client does not model.
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
code: ``<Code>`` text from the response body, or ``None`` if absent.
|
|
51
|
+
message: ``<Message>`` text from the response body, or ``None``.
|
|
52
|
+
response: The original HTTP response object, for arbitrary inspection.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
def __init__(
|
|
56
|
+
self, *, code: str | None, message: str | None, response: object
|
|
57
|
+
) -> None:
|
|
58
|
+
_status = getattr(response, "status", 500)
|
|
59
|
+
_fault: Literal["client", "server"] = "client" if _status < 500 else "server"
|
|
60
|
+
_throttling = _status == 429
|
|
61
|
+
_retryable = _throttling or _status >= 500
|
|
62
|
+
super().__init__(
|
|
63
|
+
_fault,
|
|
64
|
+
is_throttling_error=_throttling,
|
|
65
|
+
is_retryable=_retryable,
|
|
66
|
+
code=code,
|
|
67
|
+
message=message,
|
|
68
|
+
)
|
|
69
|
+
self.response = response
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class WaiterFailedError(codeartifactError):
|
|
73
|
+
"""Raised when a waiter hits an acceptor with ``state="failure"``.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
waiter_name: snake_case waiter name (e.g. ``bucket_exists``).
|
|
77
|
+
reason: Short description of which acceptor fired.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
def __init__(self, waiter_name: str, reason: str) -> None:
|
|
81
|
+
super().__init__(f"waiter {waiter_name} failed: {reason}")
|
|
82
|
+
self.waiter_name = waiter_name
|
|
83
|
+
self.reason = reason
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class WaiterTimeoutError(codeartifactError):
|
|
87
|
+
"""Raised when a waiter exhausts ``max_wait_time`` without a terminal acceptor."""
|
|
88
|
+
|
|
89
|
+
def __init__(self, waiter_name: str, max_wait_time: float) -> None:
|
|
90
|
+
super().__init__(
|
|
91
|
+
f"waiter {waiter_name} timed out after {max_wait_time} seconds"
|
|
92
|
+
)
|
|
93
|
+
self.waiter_name = waiter_name
|
|
94
|
+
self.max_wait_time = max_wait_time
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#AccessDeniedException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AccessDeniedException_(TypedDict, closed=True):
|
|
14
|
+
message: "capo_codeartifact.types.string.String"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- restJson1 ser/de ---
|
|
18
|
+
def serialize_json(value: AccessDeniedException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
out["message"] = value["message"]
|
|
21
|
+
return out
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def deserialize_json(data: dict) -> AccessDeniedException_:
|
|
25
|
+
out: AccessDeniedException_ = {} # type: ignore[typeddict-item]
|
|
26
|
+
if data.get("message") is not None:
|
|
27
|
+
out["message"] = data["message"]
|
|
28
|
+
else:
|
|
29
|
+
raise DeserializationError("AccessDeniedException_.message required")
|
|
30
|
+
return out
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AccessDeniedException(ServiceError):
|
|
34
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#AccessDeniedException``."""
|
|
35
|
+
|
|
36
|
+
code: str | None = "AccessDeniedException"
|
|
37
|
+
|
|
38
|
+
def __init__(self, data: AccessDeniedException_, message: str | None = None):
|
|
39
|
+
super().__init__(
|
|
40
|
+
"client",
|
|
41
|
+
is_throttling_error=False,
|
|
42
|
+
is_retryable=False,
|
|
43
|
+
code="AccessDeniedException",
|
|
44
|
+
message=message,
|
|
45
|
+
)
|
|
46
|
+
self.data = data
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(
|
|
50
|
+
cls, data: dict, message: str | None = None
|
|
51
|
+
) -> "AccessDeniedException":
|
|
52
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#ConflictException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.resource_type
|
|
11
|
+
import capo_codeartifact.types.string
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ConflictException_(TypedDict, closed=True):
|
|
15
|
+
message: "capo_codeartifact.types.string.String"
|
|
16
|
+
resource_id: NotRequired["capo_codeartifact.types.string.String"]
|
|
17
|
+
"""<p> The ID of the resource. </p>"""
|
|
18
|
+
resource_type: NotRequired["capo_codeartifact.types.resource_type.ResourceType"]
|
|
19
|
+
"""<p> The type of Amazon Web Services resource. </p>"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# --- restJson1 ser/de ---
|
|
23
|
+
def serialize_json(value: ConflictException_) -> dict:
|
|
24
|
+
out: dict = {}
|
|
25
|
+
out["message"] = value["message"]
|
|
26
|
+
if "resource_id" in value:
|
|
27
|
+
out["resourceId"] = value["resource_id"]
|
|
28
|
+
if "resource_type" in value:
|
|
29
|
+
import capo_codeartifact.types.resource_type
|
|
30
|
+
|
|
31
|
+
out["resourceType"] = capo_codeartifact.types.resource_type.serialize_json(
|
|
32
|
+
value["resource_type"]
|
|
33
|
+
)
|
|
34
|
+
return out
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def deserialize_json(data: dict) -> ConflictException_:
|
|
38
|
+
out: ConflictException_ = {} # type: ignore[typeddict-item]
|
|
39
|
+
if data.get("message") is not None:
|
|
40
|
+
out["message"] = data["message"]
|
|
41
|
+
else:
|
|
42
|
+
raise DeserializationError("ConflictException_.message required")
|
|
43
|
+
if data.get("resourceId") is not None:
|
|
44
|
+
out["resource_id"] = data["resourceId"]
|
|
45
|
+
if data.get("resourceType") is not None:
|
|
46
|
+
import capo_codeartifact.types.resource_type
|
|
47
|
+
|
|
48
|
+
out["resource_type"] = capo_codeartifact.types.resource_type.deserialize_json(
|
|
49
|
+
data["resourceType"]
|
|
50
|
+
)
|
|
51
|
+
return out
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ConflictException(ServiceError):
|
|
55
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#ConflictException``."""
|
|
56
|
+
|
|
57
|
+
code: str | None = "ConflictException"
|
|
58
|
+
|
|
59
|
+
def __init__(self, data: ConflictException_, message: str | None = None):
|
|
60
|
+
super().__init__(
|
|
61
|
+
"client",
|
|
62
|
+
is_throttling_error=False,
|
|
63
|
+
is_retryable=False,
|
|
64
|
+
code="ConflictException",
|
|
65
|
+
message=message,
|
|
66
|
+
)
|
|
67
|
+
self.data = data
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_json(cls, data: dict, message: str | None = None) -> "ConflictException":
|
|
71
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#InternalServerException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class InternalServerException_(TypedDict, closed=True):
|
|
14
|
+
message: "capo_codeartifact.types.string.String"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- restJson1 ser/de ---
|
|
18
|
+
def serialize_json(value: InternalServerException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
out["message"] = value["message"]
|
|
21
|
+
return out
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def deserialize_json(data: dict) -> InternalServerException_:
|
|
25
|
+
out: InternalServerException_ = {} # type: ignore[typeddict-item]
|
|
26
|
+
if data.get("message") is not None:
|
|
27
|
+
out["message"] = data["message"]
|
|
28
|
+
else:
|
|
29
|
+
raise DeserializationError("InternalServerException_.message required")
|
|
30
|
+
return out
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class InternalServerException(ServiceError):
|
|
34
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#InternalServerException``."""
|
|
35
|
+
|
|
36
|
+
code: str | None = "InternalServerException"
|
|
37
|
+
|
|
38
|
+
def __init__(self, data: InternalServerException_, message: str | None = None):
|
|
39
|
+
super().__init__(
|
|
40
|
+
"server",
|
|
41
|
+
is_throttling_error=False,
|
|
42
|
+
is_retryable=False,
|
|
43
|
+
code="InternalServerException",
|
|
44
|
+
message=message,
|
|
45
|
+
)
|
|
46
|
+
self.data = data
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(
|
|
50
|
+
cls, data: dict, message: str | None = None
|
|
51
|
+
) -> "InternalServerException":
|
|
52
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#ResourceNotFoundException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.resource_type
|
|
11
|
+
import capo_codeartifact.types.string
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ResourceNotFoundException_(TypedDict, closed=True):
|
|
15
|
+
message: "capo_codeartifact.types.string.String"
|
|
16
|
+
resource_id: NotRequired["capo_codeartifact.types.string.String"]
|
|
17
|
+
"""<p> The ID of the resource. </p>"""
|
|
18
|
+
resource_type: NotRequired["capo_codeartifact.types.resource_type.ResourceType"]
|
|
19
|
+
"""<p> The type of Amazon Web Services resource. </p>"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# --- restJson1 ser/de ---
|
|
23
|
+
def serialize_json(value: ResourceNotFoundException_) -> dict:
|
|
24
|
+
out: dict = {}
|
|
25
|
+
out["message"] = value["message"]
|
|
26
|
+
if "resource_id" in value:
|
|
27
|
+
out["resourceId"] = value["resource_id"]
|
|
28
|
+
if "resource_type" in value:
|
|
29
|
+
import capo_codeartifact.types.resource_type
|
|
30
|
+
|
|
31
|
+
out["resourceType"] = capo_codeartifact.types.resource_type.serialize_json(
|
|
32
|
+
value["resource_type"]
|
|
33
|
+
)
|
|
34
|
+
return out
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def deserialize_json(data: dict) -> ResourceNotFoundException_:
|
|
38
|
+
out: ResourceNotFoundException_ = {} # type: ignore[typeddict-item]
|
|
39
|
+
if data.get("message") is not None:
|
|
40
|
+
out["message"] = data["message"]
|
|
41
|
+
else:
|
|
42
|
+
raise DeserializationError("ResourceNotFoundException_.message required")
|
|
43
|
+
if data.get("resourceId") is not None:
|
|
44
|
+
out["resource_id"] = data["resourceId"]
|
|
45
|
+
if data.get("resourceType") is not None:
|
|
46
|
+
import capo_codeartifact.types.resource_type
|
|
47
|
+
|
|
48
|
+
out["resource_type"] = capo_codeartifact.types.resource_type.deserialize_json(
|
|
49
|
+
data["resourceType"]
|
|
50
|
+
)
|
|
51
|
+
return out
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ResourceNotFoundException(ServiceError):
|
|
55
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#ResourceNotFoundException``."""
|
|
56
|
+
|
|
57
|
+
code: str | None = "ResourceNotFoundException"
|
|
58
|
+
|
|
59
|
+
def __init__(self, data: ResourceNotFoundException_, message: str | None = None):
|
|
60
|
+
super().__init__(
|
|
61
|
+
"client",
|
|
62
|
+
is_throttling_error=False,
|
|
63
|
+
is_retryable=False,
|
|
64
|
+
code="ResourceNotFoundException",
|
|
65
|
+
message=message,
|
|
66
|
+
)
|
|
67
|
+
self.data = data
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_json(
|
|
71
|
+
cls, data: dict, message: str | None = None
|
|
72
|
+
) -> "ResourceNotFoundException":
|
|
73
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#ServiceQuotaExceededException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.resource_type
|
|
11
|
+
import capo_codeartifact.types.string
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ServiceQuotaExceededException_(TypedDict, closed=True):
|
|
15
|
+
message: "capo_codeartifact.types.string.String"
|
|
16
|
+
resource_id: NotRequired["capo_codeartifact.types.string.String"]
|
|
17
|
+
"""<p> The ID of the resource. </p>"""
|
|
18
|
+
resource_type: NotRequired["capo_codeartifact.types.resource_type.ResourceType"]
|
|
19
|
+
"""<p> The type of Amazon Web Services resource. </p>"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# --- restJson1 ser/de ---
|
|
23
|
+
def serialize_json(value: ServiceQuotaExceededException_) -> dict:
|
|
24
|
+
out: dict = {}
|
|
25
|
+
out["message"] = value["message"]
|
|
26
|
+
if "resource_id" in value:
|
|
27
|
+
out["resourceId"] = value["resource_id"]
|
|
28
|
+
if "resource_type" in value:
|
|
29
|
+
import capo_codeartifact.types.resource_type
|
|
30
|
+
|
|
31
|
+
out["resourceType"] = capo_codeartifact.types.resource_type.serialize_json(
|
|
32
|
+
value["resource_type"]
|
|
33
|
+
)
|
|
34
|
+
return out
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def deserialize_json(data: dict) -> ServiceQuotaExceededException_:
|
|
38
|
+
out: ServiceQuotaExceededException_ = {} # type: ignore[typeddict-item]
|
|
39
|
+
if data.get("message") is not None:
|
|
40
|
+
out["message"] = data["message"]
|
|
41
|
+
else:
|
|
42
|
+
raise DeserializationError("ServiceQuotaExceededException_.message required")
|
|
43
|
+
if data.get("resourceId") is not None:
|
|
44
|
+
out["resource_id"] = data["resourceId"]
|
|
45
|
+
if data.get("resourceType") is not None:
|
|
46
|
+
import capo_codeartifact.types.resource_type
|
|
47
|
+
|
|
48
|
+
out["resource_type"] = capo_codeartifact.types.resource_type.deserialize_json(
|
|
49
|
+
data["resourceType"]
|
|
50
|
+
)
|
|
51
|
+
return out
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ServiceQuotaExceededException(ServiceError):
|
|
55
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#ServiceQuotaExceededException``."""
|
|
56
|
+
|
|
57
|
+
code: str | None = "ServiceQuotaExceededException"
|
|
58
|
+
|
|
59
|
+
def __init__(
|
|
60
|
+
self, data: ServiceQuotaExceededException_, message: str | None = None
|
|
61
|
+
):
|
|
62
|
+
super().__init__(
|
|
63
|
+
"client",
|
|
64
|
+
is_throttling_error=False,
|
|
65
|
+
is_retryable=False,
|
|
66
|
+
code="ServiceQuotaExceededException",
|
|
67
|
+
message=message,
|
|
68
|
+
)
|
|
69
|
+
self.data = data
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_json(
|
|
73
|
+
cls, data: dict, message: str | None = None
|
|
74
|
+
) -> "ServiceQuotaExceededException":
|
|
75
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#ThrottlingException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.retry_after_seconds
|
|
11
|
+
import capo_codeartifact.types.string
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ThrottlingException_(TypedDict, closed=True):
|
|
15
|
+
message: "capo_codeartifact.types.string.String"
|
|
16
|
+
retry_after_seconds: NotRequired[
|
|
17
|
+
"capo_codeartifact.types.retry_after_seconds.RetryAfterSeconds"
|
|
18
|
+
]
|
|
19
|
+
"""<p> The time period, in seconds, to wait before retrying the request. </p>"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# --- restJson1 ser/de ---
|
|
23
|
+
def serialize_json(value: ThrottlingException_) -> dict:
|
|
24
|
+
out: dict = {}
|
|
25
|
+
out["message"] = value["message"]
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> ThrottlingException_:
|
|
30
|
+
out: ThrottlingException_ = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("message") is not None:
|
|
32
|
+
out["message"] = data["message"]
|
|
33
|
+
else:
|
|
34
|
+
raise DeserializationError("ThrottlingException_.message required")
|
|
35
|
+
return out
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ThrottlingException(ServiceError):
|
|
39
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#ThrottlingException``."""
|
|
40
|
+
|
|
41
|
+
code: str | None = "ThrottlingException"
|
|
42
|
+
|
|
43
|
+
def __init__(self, data: ThrottlingException_, message: str | None = None):
|
|
44
|
+
super().__init__(
|
|
45
|
+
"client",
|
|
46
|
+
is_throttling_error=False,
|
|
47
|
+
is_retryable=False,
|
|
48
|
+
code="ThrottlingException",
|
|
49
|
+
message=message,
|
|
50
|
+
)
|
|
51
|
+
self.data = data
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, data: dict, message: str | None = None) -> "ThrottlingException":
|
|
55
|
+
return cls(deserialize_json(data), message)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#ValidationException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_codeartifact.errors import DeserializationError, ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_codeartifact.types.string
|
|
11
|
+
import capo_codeartifact.types.validation_exception_reason
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ValidationException_(TypedDict, closed=True):
|
|
15
|
+
message: "capo_codeartifact.types.string.String"
|
|
16
|
+
reason: NotRequired[
|
|
17
|
+
"capo_codeartifact.types.validation_exception_reason.ValidationExceptionReason"
|
|
18
|
+
]
|
|
19
|
+
"""<p> </p>"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# --- restJson1 ser/de ---
|
|
23
|
+
def serialize_json(value: ValidationException_) -> dict:
|
|
24
|
+
out: dict = {}
|
|
25
|
+
out["message"] = value["message"]
|
|
26
|
+
if "reason" in value:
|
|
27
|
+
import capo_codeartifact.types.validation_exception_reason
|
|
28
|
+
|
|
29
|
+
out["reason"] = (
|
|
30
|
+
capo_codeartifact.types.validation_exception_reason.serialize_json(
|
|
31
|
+
value["reason"]
|
|
32
|
+
)
|
|
33
|
+
)
|
|
34
|
+
return out
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def deserialize_json(data: dict) -> ValidationException_:
|
|
38
|
+
out: ValidationException_ = {} # type: ignore[typeddict-item]
|
|
39
|
+
if data.get("message") is not None:
|
|
40
|
+
out["message"] = data["message"]
|
|
41
|
+
else:
|
|
42
|
+
raise DeserializationError("ValidationException_.message required")
|
|
43
|
+
if data.get("reason") is not None:
|
|
44
|
+
import capo_codeartifact.types.validation_exception_reason
|
|
45
|
+
|
|
46
|
+
out["reason"] = (
|
|
47
|
+
capo_codeartifact.types.validation_exception_reason.deserialize_json(
|
|
48
|
+
data["reason"]
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
return out
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ValidationException(ServiceError):
|
|
55
|
+
"""Modeled error for Smithy shape ``com.amazonaws.codeartifact#ValidationException``."""
|
|
56
|
+
|
|
57
|
+
code: str | None = "ValidationException"
|
|
58
|
+
|
|
59
|
+
def __init__(self, data: ValidationException_, message: str | None = None):
|
|
60
|
+
super().__init__(
|
|
61
|
+
"client",
|
|
62
|
+
is_throttling_error=False,
|
|
63
|
+
is_retryable=False,
|
|
64
|
+
code="ValidationException",
|
|
65
|
+
message=message,
|
|
66
|
+
)
|
|
67
|
+
self.data = data
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_json(cls, data: dict, message: str | None = None) -> "ValidationException":
|
|
71
|
+
return cls(deserialize_json(data), message)
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Generated from Smithy prelude shape ``smithy.api#Blob``."""
|
|
2
|
+
|
|
3
|
+
import base64
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# --- restJson1 ser/de ---
|
|
7
|
+
def serialize_json(value: bytes) -> str:
|
|
8
|
+
return base64.b64encode(value).decode("ascii")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def deserialize_json(data: str) -> bytes:
|
|
12
|
+
return base64.b64decode(data)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy prelude shape ``smithy.api#Timestamp``."""
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# --- restJson1 ser/de ---
|
|
7
|
+
def serialize_json(value: datetime.datetime) -> float:
|
|
8
|
+
value = (
|
|
9
|
+
value.astimezone(datetime.timezone.utc)
|
|
10
|
+
if value.tzinfo
|
|
11
|
+
else value.replace(tzinfo=datetime.timezone.utc)
|
|
12
|
+
)
|
|
13
|
+
return value.timestamp()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: float) -> datetime.datetime:
|
|
17
|
+
return datetime.datetime.fromtimestamp(float(data), tz=datetime.timezone.utc)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#AllowPublish``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
AllowPublish: TypeAlias = Literal[
|
|
6
|
+
"ALLOW",
|
|
7
|
+
"BLOCK",
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: AllowPublish) -> str:
|
|
13
|
+
return value
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: str) -> AllowPublish:
|
|
17
|
+
return cast(AllowPublish, data)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.codeartifact#AllowUpstream``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
AllowUpstream: TypeAlias = Literal[
|
|
6
|
+
"ALLOW",
|
|
7
|
+
"BLOCK",
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: AllowUpstream) -> str:
|
|
13
|
+
return value
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: str) -> AllowUpstream:
|
|
17
|
+
return cast(AllowUpstream, data)
|