From 6a3cc608dd3071d34efbb9c36766f29f1f5420e0 Mon Sep 17 00:00:00 2001 From: AWS SDK Rust Bot Date: Mon, 18 Mar 2024 18:20:19 +0000 Subject: [PATCH] Update SDK models --- Cargo.toml | 5 +- aws-models/cloudformation.json | 144 +- aws-models/kms.json | 16 +- aws-models/mediatailor.json | 181 ++- aws-models/rds.json | 132 +- aws-models/s3.json | 164 +- aws-models/sdk-endpoints.json | 43 + aws-models/timestream-query.json | 28 +- .../cross_service/detect_faces/Cargo.toml | 2 +- .../cross_service/detect_labels/Cargo.toml | 2 +- .../photo_asset_management/Cargo.toml | 2 +- examples/cross_service/telephone/Cargo.toml | 2 +- examples/examples/aurora/Cargo.toml | 2 +- examples/examples/cloudformation/Cargo.toml | 2 +- examples/examples/concurrency/Cargo.toml | 2 +- .../custom-root-certificates/Cargo.toml | 2 +- examples/examples/glue/Cargo.toml | 2 +- examples/examples/iam/Cargo.toml | 2 +- examples/examples/kms/Cargo.toml | 2 +- examples/examples/lambda/Cargo.toml | 2 +- examples/examples/localstack/Cargo.toml | 2 +- examples/examples/rds/Cargo.toml | 2 +- examples/examples/s3/Cargo.toml | 2 +- examples/examples/sdk-config/Cargo.toml | 2 +- .../sending-presigned-requests/Cargo.toml | 2 +- examples/examples/testing/Cargo.toml | 2 +- examples/examples/tls/Cargo.toml | 2 +- examples/lambda/calculator/Cargo.toml | 2 +- index.md | 1 - sdk/cloudformation/Cargo.toml | 2 +- sdk/cloudformation/README.md | 2 +- sdk/cloudformation/src/client.rs | 2 + sdk/cloudformation/src/client/create_stack.rs | 2 +- .../list_stack_set_auto_deployment_targets.rs | 19 + sdk/cloudformation/src/error_meta.rs | 37 + sdk/cloudformation/src/lib.rs | 2 +- sdk/cloudformation/src/operation.rs | 3 + .../create_stack/_create_stack_input.rs | 10 +- .../src/operation/create_stack/builders.rs | 6 +- ...list_stack_set_auto_deployment_targets.rs} | 191 +-- ...stack_set_auto_deployment_targets_input.rs | 163 ++ ...tack_set_auto_deployment_targets_output.rs | 96 ++ .../builders.rs | 191 +++ sdk/cloudformation/src/protocol_serde.rs | 8 + ..._list_stack_set_auto_deployment_targets.rs | 128 ++ ...stack_set_auto_deployment_targets_input.rs | 33 + ...ck_set_auto_deployment_target_summaries.rs | 19 + ...tack_set_auto_deployment_target_summary.rs | 37 + sdk/cloudformation/src/types.rs | 4 + .../_stack_instance_comprehensive_status.rs | 10 + ...tack_set_auto_deployment_target_summary.rs | 80 + sdk/cloudformation/src/types/builders.rs | 2 + sdk/iotroborunner/Cargo.toml | 89 -- sdk/iotroborunner/LICENSE | 202 --- sdk/iotroborunner/README.md | 56 - sdk/iotroborunner/src/auth_plugin.rs | 35 - sdk/iotroborunner/src/client.rs | 204 --- .../src/client/create_destination.rs | 21 - sdk/iotroborunner/src/client/create_site.rs | 19 - sdk/iotroborunner/src/client/create_worker.rs | 24 - .../src/client/create_worker_fleet.rs | 19 - sdk/iotroborunner/src/client/customize.rs | 113 -- .../src/client/customize/internal.rs | 12 - .../src/client/delete_destination.rs | 12 - sdk/iotroborunner/src/client/delete_site.rs | 12 - sdk/iotroborunner/src/client/delete_worker.rs | 12 - .../src/client/delete_worker_fleet.rs | 12 - .../src/client/get_destination.rs | 20 - sdk/iotroborunner/src/client/get_site.rs | 19 - sdk/iotroborunner/src/client/get_worker.rs | 24 - .../src/client/get_worker_fleet.rs | 19 - .../src/client/list_destinations.rs | 18 - sdk/iotroborunner/src/client/list_sites.rs | 16 - .../src/client/list_worker_fleets.rs | 17 - sdk/iotroborunner/src/client/list_workers.rs | 18 - .../src/client/update_destination.rs | 21 - sdk/iotroborunner/src/client/update_site.rs | 21 - sdk/iotroborunner/src/client/update_worker.rs | 28 - .../src/client/update_worker_fleet.rs | 19 - .../src/client_idempotency_token.rs | 73 - sdk/iotroborunner/src/config.rs | 1348 ----------------- sdk/iotroborunner/src/config/endpoint.rs | 695 --------- .../src/config/endpoint/internals.rs | 123 -- sdk/iotroborunner/src/config/interceptors.rs | 11 - sdk/iotroborunner/src/config/retry.rs | 7 - sdk/iotroborunner/src/config/timeout.rs | 2 - sdk/iotroborunner/src/endpoint_lib.rs | 11 - .../src/endpoint_lib/diagnostic.rs | 45 - .../src/endpoint_lib/partition.rs | 536 ------- sdk/iotroborunner/src/error.rs | 30 - .../src/error/sealed_unhandled.rs | 20 - sdk/iotroborunner/src/error_meta.rs | 638 -------- sdk/iotroborunner/src/idempotency_token.rs | 102 -- sdk/iotroborunner/src/json_errors.rs | 179 --- sdk/iotroborunner/src/lens.rs | 80 - sdk/iotroborunner/src/lib.rs | 206 --- sdk/iotroborunner/src/meta.rs | 6 - sdk/iotroborunner/src/operation.rs | 62 - .../src/operation/create_destination.rs | 429 ------ .../_create_destination_input.rs | 141 -- .../_create_destination_output.rs | 194 --- .../operation/create_destination/builders.rs | 181 --- .../src/operation/create_site.rs | 416 ----- .../create_site/_create_site_input.rs | 117 -- .../create_site/_create_site_output.rs | 163 -- .../src/operation/create_site/builders.rs | 167 -- .../src/operation/create_worker.rs | 428 ------ .../create_worker/_create_worker_input.rs | 207 --- .../create_worker/_create_worker_output.rs | 195 --- .../src/operation/create_worker/builders.rs | 223 --- .../src/operation/create_worker_fleet.rs | 429 ------ .../_create_worker_fleet_input.rs | 119 -- .../_create_worker_fleet_output.rs | 165 -- .../operation/create_worker_fleet/builders.rs | 167 -- .../src/operation/delete_destination.rs | 409 ----- .../_delete_destination_input.rs | 50 - .../_delete_destination_output.rs | 42 - .../operation/delete_destination/builders.rs | 125 -- .../src/operation/delete_site.rs | 406 ----- .../delete_site/_delete_site_input.rs | 48 - .../delete_site/_delete_site_output.rs | 42 - .../src/operation/delete_site/builders.rs | 125 -- .../src/operation/delete_worker.rs | 408 ----- .../delete_worker/_delete_worker_input.rs | 50 - .../delete_worker/_delete_worker_output.rs | 42 - .../src/operation/delete_worker/builders.rs | 125 -- .../src/operation/delete_worker_fleet.rs | 409 ----- .../_delete_worker_fleet_input.rs | 50 - .../_delete_worker_fleet_output.rs | 42 - .../operation/delete_worker_fleet/builders.rs | 125 -- .../src/operation/get_destination.rs | 414 ----- .../get_destination/_get_destination_input.rs | 50 - .../_get_destination_output.rs | 276 ---- .../src/operation/get_destination/builders.rs | 125 -- sdk/iotroborunner/src/operation/get_site.rs | 404 ----- .../src/operation/get_site/_get_site_input.rs | 48 - .../operation/get_site/_get_site_output.rs | 245 --- .../src/operation/get_site/builders.rs | 116 -- sdk/iotroborunner/src/operation/get_worker.rs | 411 ----- .../operation/get_worker/_get_worker_input.rs | 48 - .../get_worker/_get_worker_output.rs | 363 ----- .../src/operation/get_worker/builders.rs | 119 -- .../src/operation/get_worker_fleet.rs | 414 ----- .../_get_worker_fleet_input.rs | 50 - .../_get_worker_fleet_output.rs | 247 --- .../operation/get_worker_fleet/builders.rs | 125 -- .../src/operation/list_destinations.rs | 432 ------ .../_list_destinations_input.rs | 118 -- .../_list_destinations_output.rs | 96 -- .../operation/list_destinations/builders.rs | 173 --- .../operation/list_destinations/paginator.rs | 146 -- sdk/iotroborunner/src/operation/list_sites.rs | 403 ----- .../operation/list_sites/_list_sites_input.rs | 71 - .../list_sites/_list_sites_output.rs | 96 -- .../src/operation/list_sites/builders.rs | 139 -- .../src/operation/list_sites/paginator.rs | 140 -- .../src/operation/list_worker_fleets.rs | 427 ------ .../_list_worker_fleets_input.rs | 96 -- .../_list_worker_fleets_output.rs | 96 -- .../operation/list_worker_fleets/builders.rs | 159 -- .../operation/list_worker_fleets/paginator.rs | 146 -- .../src/operation/list_workers.rs | 431 ------ .../list_workers/_list_workers_input.rs | 116 -- .../list_workers/_list_workers_output.rs | 96 -- .../src/operation/list_workers/builders.rs | 173 --- .../src/operation/list_workers/paginator.rs | 143 -- .../src/operation/update_destination.rs | 399 ----- .../_update_destination_input.rs | 118 -- .../_update_destination_output.rs | 217 --- .../operation/update_destination/builders.rs | 167 -- .../update_site/_update_site_input.rs | 116 -- .../update_site/_update_site_output.rs | 208 --- .../src/operation/update_site/builders.rs | 167 -- .../update_worker/_update_worker_input.rs | 184 --- .../update_worker/_update_worker_output.rs | 306 ---- .../src/operation/update_worker/builders.rs | 209 --- .../src/operation/update_worker_fleet.rs | 399 ----- .../_update_worker_fleet_input.rs | 96 -- .../_update_worker_fleet_output.rs | 188 --- .../operation/update_worker_fleet/builders.rs | 153 -- sdk/iotroborunner/src/primitives.rs | 8 - .../src/primitives/event_stream.rs | 1 - .../src/primitives/sealed_enum_unknown.rs | 21 - sdk/iotroborunner/src/protocol_serde.rs | 134 -- .../shape_access_denied_exception.rs | 36 - .../shape_cartesian_coordinates.rs | 72 - .../shape_conflict_exception.rs | 36 - .../shape_create_destination.rs | 222 --- .../shape_create_destination_input.rs | 22 - .../src/protocol_serde/shape_create_site.rs | 198 --- .../protocol_serde/shape_create_site_input.rs | 19 - .../src/protocol_serde/shape_create_worker.rs | 220 --- .../shape_create_worker_fleet.rs | 216 --- .../shape_create_worker_fleet_input.rs | 19 - .../shape_create_worker_input.rs | 40 - .../shape_delete_destination.rs | 138 -- .../shape_delete_destination_input.rs | 10 - .../src/protocol_serde/shape_delete_site.rs | 136 -- .../protocol_serde/shape_delete_site_input.rs | 10 - .../src/protocol_serde/shape_delete_worker.rs | 136 -- .../shape_delete_worker_fleet.rs | 138 -- .../shape_delete_worker_fleet_input.rs | 10 - .../shape_delete_worker_input.rs | 10 - .../src/protocol_serde/shape_destination.rs | 89 -- .../protocol_serde/shape_get_destination.rs | 198 --- .../src/protocol_serde/shape_get_site.rs | 191 --- .../src/protocol_serde/shape_get_worker.rs | 214 --- .../protocol_serde/shape_get_worker_fleet.rs | 191 --- .../shape_internal_server_exception.rs | 36 - .../protocol_serde/shape_list_destinations.rs | 152 -- .../src/protocol_serde/shape_list_sites.rs | 137 -- .../shape_list_worker_fleets.rs | 152 -- .../src/protocol_serde/shape_list_workers.rs | 152 -- .../src/protocol_serde/shape_orientation.rs | 70 - .../shape_position_coordinates.rs | 72 - .../shape_resource_not_found_exception.rs | 36 - .../shape_service_quota_exceeded_exception.rs | 36 - .../shape_throttling_exception.rs | 36 - .../shape_update_destination.rs | 197 --- .../shape_update_destination_input.rs | 19 - .../src/protocol_serde/shape_update_site.rs | 195 --- .../protocol_serde/shape_update_site_input.rs | 19 - .../src/protocol_serde/shape_update_worker.rs | 211 --- .../shape_update_worker_fleet.rs | 191 --- .../shape_update_worker_fleet_input.rs | 16 - .../shape_update_worker_input.rs | 37 - .../shape_validation_exception.rs | 36 - .../protocol_serde/shape_vendor_properties.rs | 82 - .../src/protocol_serde/shape_worker.rs | 105 -- .../src/protocol_serde/shape_worker_fleet.rs | 82 - .../src/protocol_serde/shape_worker_fleets.rs | 32 - sdk/iotroborunner/src/serde_util.rs | 367 ----- .../src/serialization_settings.rs | 84 - sdk/iotroborunner/src/types.rs | 42 - .../src/types/_cartesian_coordinates.rs | 109 -- sdk/iotroborunner/src/types/_destination.rs | 258 ---- .../src/types/_destination_state.rs | 113 -- sdk/iotroborunner/src/types/_orientation.rs | 38 - .../src/types/_position_coordinates.rs | 38 - sdk/iotroborunner/src/types/_site.rs | 145 -- .../src/types/_vendor_properties.rs | 125 -- sdk/iotroborunner/src/types/_worker.rs | 344 ----- sdk/iotroborunner/src/types/_worker_fleet.rs | 229 --- sdk/iotroborunner/src/types/builders.rs | 12 - sdk/iotroborunner/src/types/error.rs | 31 - .../types/error/_access_denied_exception.rs | 91 -- .../src/types/error/_conflict_exception.rs | 87 -- .../types/error/_internal_server_exception.rs | 87 -- .../error/_resource_not_found_exception.rs | 87 -- .../_service_quota_exceeded_exception.rs | 91 -- .../src/types/error/_throttling_exception.rs | 91 -- .../src/types/error/_validation_exception.rs | 87 -- sdk/iotroborunner/src/types/error/builders.rs | 14 - sdk/iotroborunner/tests/endpoint_tests.rs | 2 - sdk/kms/Cargo.toml | 2 +- sdk/kms/README.md | 2 +- sdk/kms/src/client/get_key_policy.rs | 3 +- sdk/kms/src/client/put_key_policy.rs | 2 +- sdk/kms/src/lib.rs | 2 +- .../get_key_policy/_get_key_policy_input.rs | 11 +- .../get_key_policy/_get_key_policy_output.rs | 22 + .../src/operation/get_key_policy/builders.rs | 6 +- .../operation/import_key_material/builders.rs | 2 +- .../put_key_policy/_put_key_policy_input.rs | 11 +- .../src/operation/put_key_policy/builders.rs | 6 +- .../src/operation/revoke_grant/builders.rs | 2 +- .../protocol_serde/shape_get_key_policy.rs | 7 + sdk/mediatailor/Cargo.toml | 2 +- sdk/mediatailor/README.md | 2 +- sdk/mediatailor/src/client/create_channel.rs | 2 + sdk/mediatailor/src/client/create_program.rs | 2 + .../src/client/describe_channel.rs | 1 + .../src/client/describe_program.rs | 1 + .../src/client/get_channel_schedule.rs | 1 + sdk/mediatailor/src/client/update_channel.rs | 2 + sdk/mediatailor/src/client/update_program.rs | 2 + sdk/mediatailor/src/lib.rs | 2 +- .../create_channel/_create_channel_input.rs | 30 + .../create_channel/_create_channel_output.rs | 30 + .../src/operation/create_channel/builders.rs | 18 + .../create_program/_create_program_input.rs | 30 + .../create_program/_create_program_output.rs | 30 + .../src/operation/create_program/builders.rs | 18 + .../_describe_channel_output.rs | 30 + .../_describe_program_output.rs | 30 + .../src/operation/get_channel_schedule.rs | 5 + .../_get_channel_schedule_input.rs | 22 + .../get_channel_schedule/builders.rs | 14 + .../update_channel/_update_channel_input.rs | 30 + .../update_channel/_update_channel_output.rs | 30 + .../src/operation/update_channel/builders.rs | 18 + .../update_program/_update_program_input.rs | 30 + .../update_program/_update_program_output.rs | 30 + .../src/operation/update_program/builders.rs | 18 + sdk/mediatailor/src/protocol_serde.rs | 10 + .../protocol_serde/shape_alternate_media.rs | 120 ++ .../protocol_serde/shape_audience_media.rs} | 58 +- .../src/protocol_serde/shape_audiences.rs} | 8 +- .../src/protocol_serde/shape_channel.rs | 3 + .../src/protocol_serde/shape_clip_range.rs | 19 +- .../protocol_serde/shape_create_channel.rs | 3 + .../shape_create_channel_input.rs | 57 +- .../protocol_serde/shape_create_program.rs | 3 + .../shape_create_program_input.rs | 32 +- .../protocol_serde/shape_describe_channel.rs | 3 + .../protocol_serde/shape_describe_program.rs | 3 + .../shape_list_of_alternate_media.rs} | 6 +- .../shape_list_of_audience_media.rs} | 6 +- .../protocol_serde/shape_schedule_entry.rs | 3 + .../protocol_serde/shape_update_channel.rs | 3 + .../shape_update_channel_input.rs | 39 +- .../protocol_serde/shape_update_program.rs | 3 + .../shape_update_program_input.rs | 20 +- sdk/mediatailor/src/serde_util.rs | 7 - sdk/mediatailor/src/types.rs | 10 +- sdk/mediatailor/src/types/_alternate_media.rs | 190 +++ sdk/mediatailor/src/types/_audience_media.rs | 80 + sdk/mediatailor/src/types/_channel.rs | 30 + sdk/mediatailor/src/types/_clip_range.rs | 38 +- sdk/mediatailor/src/types/_schedule_entry.rs | 30 + .../src/types/_schedule_entry_type.rs | 8 +- sdk/mediatailor/src/types/builders.rs | 6 +- sdk/rds/Cargo.toml | 2 +- sdk/rds/README.md | 2 +- sdk/rds/src/client.rs | 2 + sdk/rds/src/client/create_integration.rs | 4 + sdk/rds/src/client/delete_integration.rs | 2 + sdk/rds/src/client/modify_integration.rs | 27 + sdk/rds/src/error_meta.rs | 28 + sdk/rds/src/lib.rs | 2 +- sdk/rds/src/operation.rs | 3 + .../_create_integration_input.rs | 49 + .../_create_integration_output.rs | 44 + .../operation/create_integration/builders.rs | 31 + .../_delete_integration_output.rs | 44 + .../src/operation/modify_integration.rs} | 193 +-- .../_modify_integration_input.rs | 118 ++ .../_modify_integration_output.rs | 340 +++++ .../operation/modify_integration/builders.rs | 169 +++ sdk/rds/src/protocol_serde.rs | 4 + .../shape_create_integration.rs | 26 + .../shape_create_integration_input.rs | 10 + .../shape_delete_integration.rs | 26 + .../src/protocol_serde/shape_integration.rs | 26 + .../shape_modify_integration.rs | 274 ++++ .../shape_modify_integration_input.rs | 30 + sdk/rds/src/types.rs | 8 +- sdk/rds/src/types/_integration.rs | 44 + sdk/rds/src/types/builders.rs | 4 +- sdk/rds/src/types/error.rs | 8 +- sdk/rds/src/types/error/builders.rs | 8 +- sdk/s3/Cargo.toml | 2 +- sdk/s3/README.md | 2 +- sdk/s3/src/lib.rs | 2 +- .../shape_get_object_legal_hold_output.rs | 4 +- .../shape_get_object_retention_output.rs | 4 +- sdk/timestreamquery/Cargo.toml | 2 +- sdk/timestreamquery/README.md | 2 +- sdk/timestreamquery/src/lib.rs | 2 +- .../src/operation/prepare_query/builders.rs | 2 +- sdk/timestreamquery/src/types/_type_.rs | 10 +- tests/no-default-features/Cargo.toml | 2 +- versions.toml | 62 +- 363 files changed, 4155 insertions(+), 29558 deletions(-) create mode 100644 sdk/cloudformation/src/client/list_stack_set_auto_deployment_targets.rs rename sdk/{iotroborunner/src/operation/update_site.rs => cloudformation/src/operation/list_stack_set_auto_deployment_targets.rs} (65%) create mode 100644 sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_input.rs create mode 100644 sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_output.rs create mode 100644 sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/builders.rs create mode 100644 sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets.rs create mode 100644 sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets_input.rs create mode 100644 sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summaries.rs create mode 100644 sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summary.rs create mode 100644 sdk/cloudformation/src/types/_stack_set_auto_deployment_target_summary.rs delete mode 100644 sdk/iotroborunner/Cargo.toml delete mode 100644 sdk/iotroborunner/LICENSE delete mode 100644 sdk/iotroborunner/README.md delete mode 100644 sdk/iotroborunner/src/auth_plugin.rs delete mode 100644 sdk/iotroborunner/src/client.rs delete mode 100644 sdk/iotroborunner/src/client/create_destination.rs delete mode 100644 sdk/iotroborunner/src/client/create_site.rs delete mode 100644 sdk/iotroborunner/src/client/create_worker.rs delete mode 100644 sdk/iotroborunner/src/client/create_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/client/customize.rs delete mode 100644 sdk/iotroborunner/src/client/customize/internal.rs delete mode 100644 sdk/iotroborunner/src/client/delete_destination.rs delete mode 100644 sdk/iotroborunner/src/client/delete_site.rs delete mode 100644 sdk/iotroborunner/src/client/delete_worker.rs delete mode 100644 sdk/iotroborunner/src/client/delete_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/client/get_destination.rs delete mode 100644 sdk/iotroborunner/src/client/get_site.rs delete mode 100644 sdk/iotroborunner/src/client/get_worker.rs delete mode 100644 sdk/iotroborunner/src/client/get_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/client/list_destinations.rs delete mode 100644 sdk/iotroborunner/src/client/list_sites.rs delete mode 100644 sdk/iotroborunner/src/client/list_worker_fleets.rs delete mode 100644 sdk/iotroborunner/src/client/list_workers.rs delete mode 100644 sdk/iotroborunner/src/client/update_destination.rs delete mode 100644 sdk/iotroborunner/src/client/update_site.rs delete mode 100644 sdk/iotroborunner/src/client/update_worker.rs delete mode 100644 sdk/iotroborunner/src/client/update_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/client_idempotency_token.rs delete mode 100644 sdk/iotroborunner/src/config.rs delete mode 100644 sdk/iotroborunner/src/config/endpoint.rs delete mode 100644 sdk/iotroborunner/src/config/endpoint/internals.rs delete mode 100644 sdk/iotroborunner/src/config/interceptors.rs delete mode 100644 sdk/iotroborunner/src/config/retry.rs delete mode 100644 sdk/iotroborunner/src/config/timeout.rs delete mode 100644 sdk/iotroborunner/src/endpoint_lib.rs delete mode 100644 sdk/iotroborunner/src/endpoint_lib/diagnostic.rs delete mode 100644 sdk/iotroborunner/src/endpoint_lib/partition.rs delete mode 100644 sdk/iotroborunner/src/error.rs delete mode 100644 sdk/iotroborunner/src/error/sealed_unhandled.rs delete mode 100644 sdk/iotroborunner/src/error_meta.rs delete mode 100644 sdk/iotroborunner/src/idempotency_token.rs delete mode 100644 sdk/iotroborunner/src/json_errors.rs delete mode 100644 sdk/iotroborunner/src/lens.rs delete mode 100644 sdk/iotroborunner/src/lib.rs delete mode 100644 sdk/iotroborunner/src/meta.rs delete mode 100644 sdk/iotroborunner/src/operation.rs delete mode 100644 sdk/iotroborunner/src/operation/create_destination.rs delete mode 100644 sdk/iotroborunner/src/operation/create_destination/_create_destination_input.rs delete mode 100644 sdk/iotroborunner/src/operation/create_destination/_create_destination_output.rs delete mode 100644 sdk/iotroborunner/src/operation/create_destination/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/create_site.rs delete mode 100644 sdk/iotroborunner/src/operation/create_site/_create_site_input.rs delete mode 100644 sdk/iotroborunner/src/operation/create_site/_create_site_output.rs delete mode 100644 sdk/iotroborunner/src/operation/create_site/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker/_create_worker_input.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker/_create_worker_output.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_output.rs delete mode 100644 sdk/iotroborunner/src/operation/create_worker_fleet/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_destination.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_destination/_delete_destination_input.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_destination/_delete_destination_output.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_destination/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_site.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_site/_delete_site_input.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_site/_delete_site_output.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_site/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker/_delete_worker_input.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker/_delete_worker_output.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_output.rs delete mode 100644 sdk/iotroborunner/src/operation/delete_worker_fleet/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/get_destination.rs delete mode 100644 sdk/iotroborunner/src/operation/get_destination/_get_destination_input.rs delete mode 100644 sdk/iotroborunner/src/operation/get_destination/_get_destination_output.rs delete mode 100644 sdk/iotroborunner/src/operation/get_destination/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/get_site.rs delete mode 100644 sdk/iotroborunner/src/operation/get_site/_get_site_input.rs delete mode 100644 sdk/iotroborunner/src/operation/get_site/_get_site_output.rs delete mode 100644 sdk/iotroborunner/src/operation/get_site/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker/_get_worker_input.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker/_get_worker_output.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_output.rs delete mode 100644 sdk/iotroborunner/src/operation/get_worker_fleet/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/list_destinations.rs delete mode 100644 sdk/iotroborunner/src/operation/list_destinations/_list_destinations_input.rs delete mode 100644 sdk/iotroborunner/src/operation/list_destinations/_list_destinations_output.rs delete mode 100644 sdk/iotroborunner/src/operation/list_destinations/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/list_destinations/paginator.rs delete mode 100644 sdk/iotroborunner/src/operation/list_sites.rs delete mode 100644 sdk/iotroborunner/src/operation/list_sites/_list_sites_input.rs delete mode 100644 sdk/iotroborunner/src/operation/list_sites/_list_sites_output.rs delete mode 100644 sdk/iotroborunner/src/operation/list_sites/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/list_sites/paginator.rs delete mode 100644 sdk/iotroborunner/src/operation/list_worker_fleets.rs delete mode 100644 sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_input.rs delete mode 100644 sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_output.rs delete mode 100644 sdk/iotroborunner/src/operation/list_worker_fleets/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/list_worker_fleets/paginator.rs delete mode 100644 sdk/iotroborunner/src/operation/list_workers.rs delete mode 100644 sdk/iotroborunner/src/operation/list_workers/_list_workers_input.rs delete mode 100644 sdk/iotroborunner/src/operation/list_workers/_list_workers_output.rs delete mode 100644 sdk/iotroborunner/src/operation/list_workers/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/list_workers/paginator.rs delete mode 100644 sdk/iotroborunner/src/operation/update_destination.rs delete mode 100644 sdk/iotroborunner/src/operation/update_destination/_update_destination_input.rs delete mode 100644 sdk/iotroborunner/src/operation/update_destination/_update_destination_output.rs delete mode 100644 sdk/iotroborunner/src/operation/update_destination/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/update_site/_update_site_input.rs delete mode 100644 sdk/iotroborunner/src/operation/update_site/_update_site_output.rs delete mode 100644 sdk/iotroborunner/src/operation/update_site/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker/_update_worker_input.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker/_update_worker_output.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker/builders.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_output.rs delete mode 100644 sdk/iotroborunner/src/operation/update_worker_fleet/builders.rs delete mode 100644 sdk/iotroborunner/src/primitives.rs delete mode 100644 sdk/iotroborunner/src/primitives/event_stream.rs delete mode 100644 sdk/iotroborunner/src/primitives/sealed_enum_unknown.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_access_denied_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_cartesian_coordinates.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_conflict_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_destination.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_destination_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_site.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_site_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_worker.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_create_worker_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_destination.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_destination_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_site.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_site_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_worker.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_delete_worker_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_destination.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_get_destination.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_get_site.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_get_worker.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_get_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_internal_server_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_list_destinations.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_list_sites.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_list_worker_fleets.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_list_workers.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_orientation.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_position_coordinates.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_resource_not_found_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_service_quota_exceeded_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_throttling_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_destination.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_destination_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_site.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_site_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_worker.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_update_worker_input.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_validation_exception.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_vendor_properties.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_worker.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/protocol_serde/shape_worker_fleets.rs delete mode 100644 sdk/iotroborunner/src/serde_util.rs delete mode 100644 sdk/iotroborunner/src/serialization_settings.rs delete mode 100644 sdk/iotroborunner/src/types.rs delete mode 100644 sdk/iotroborunner/src/types/_cartesian_coordinates.rs delete mode 100644 sdk/iotroborunner/src/types/_destination.rs delete mode 100644 sdk/iotroborunner/src/types/_destination_state.rs delete mode 100644 sdk/iotroborunner/src/types/_orientation.rs delete mode 100644 sdk/iotroborunner/src/types/_position_coordinates.rs delete mode 100644 sdk/iotroborunner/src/types/_site.rs delete mode 100644 sdk/iotroborunner/src/types/_vendor_properties.rs delete mode 100644 sdk/iotroborunner/src/types/_worker.rs delete mode 100644 sdk/iotroborunner/src/types/_worker_fleet.rs delete mode 100644 sdk/iotroborunner/src/types/builders.rs delete mode 100644 sdk/iotroborunner/src/types/error.rs delete mode 100644 sdk/iotroborunner/src/types/error/_access_denied_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/_conflict_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/_internal_server_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/_resource_not_found_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/_service_quota_exceeded_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/_throttling_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/_validation_exception.rs delete mode 100644 sdk/iotroborunner/src/types/error/builders.rs delete mode 100644 sdk/iotroborunner/tests/endpoint_tests.rs create mode 100644 sdk/mediatailor/src/protocol_serde/shape_alternate_media.rs rename sdk/{iotroborunner/src/protocol_serde/shape_site.rs => mediatailor/src/protocol_serde/shape_audience_media.rs} (50%) rename sdk/{iotroborunner/src/protocol_serde/shape_destinations.rs => mediatailor/src/protocol_serde/shape_audiences.rs} (74%) rename sdk/{iotroborunner/src/protocol_serde/shape_sites.rs => mediatailor/src/protocol_serde/shape_list_of_alternate_media.rs} (84%) rename sdk/{iotroborunner/src/protocol_serde/shape_workers.rs => mediatailor/src/protocol_serde/shape_list_of_audience_media.rs} (84%) create mode 100644 sdk/mediatailor/src/types/_alternate_media.rs create mode 100644 sdk/mediatailor/src/types/_audience_media.rs create mode 100644 sdk/rds/src/client/modify_integration.rs rename sdk/{iotroborunner/src/operation/update_worker.rs => rds/src/operation/modify_integration.rs} (64%) create mode 100644 sdk/rds/src/operation/modify_integration/_modify_integration_input.rs create mode 100644 sdk/rds/src/operation/modify_integration/_modify_integration_output.rs create mode 100644 sdk/rds/src/operation/modify_integration/builders.rs create mode 100644 sdk/rds/src/protocol_serde/shape_modify_integration.rs create mode 100644 sdk/rds/src/protocol_serde/shape_modify_integration_input.rs diff --git a/Cargo.toml b/Cargo.toml index c19866cb42c1..954c06ce8155 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [workspace] resolver = "2" exclude = [ - "examples/cross_service", "examples/test-utils", - "examples/lambda", "examples/examples", + "examples/lambda", + "examples/cross_service", "tests/webassembly", "tests/no-default-features" ] @@ -214,7 +214,6 @@ members = [ "sdk/iotfleethub", "sdk/iotfleetwise", "sdk/iotjobsdataplane", - "sdk/iotroborunner", "sdk/iotsecuretunneling", "sdk/iotsitewise", "sdk/iotthingsgraph", diff --git a/aws-models/cloudformation.json b/aws-models/cloudformation.json index d596123e0302..eace39b74c4b 100644 --- a/aws-models/cloudformation.json +++ b/aws-models/cloudformation.json @@ -206,7 +206,7 @@ } ], "traits": { - "smithy.api#documentation": "

Activates a public third-party extension, making it available for use in stack templates. For more information,\n see Using public\n extensions in the CloudFormation User Guide.

\n

Once you have activated a public third-party extension in your account and Region, use \n SetTypeConfiguration\n to specify configuration properties for the extension. For more information, see Configuring extensions at the account level in the CloudFormation User Guide.

", + "smithy.api#documentation": "

Activates a public third-party extension, making it available for use in stack templates. For more information,\n see Using public\n extensions in the CloudFormation User Guide.

\n

Once you have activated a public third-party extension in your account and Region, use \n SetTypeConfiguration\n to specify configuration properties for the extension. For more\n information, see Configuring extensions at\n the account level in the CloudFormation User Guide.

", "smithy.api#idempotent": {} } }, @@ -1237,6 +1237,9 @@ { "target": "com.amazonaws.cloudformation#ListStacks" }, + { + "target": "com.amazonaws.cloudformation#ListStackSetAutoDeploymentTargets" + }, { "target": "com.amazonaws.cloudformation#ListStackSetOperationResults" }, @@ -2521,7 +2524,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to create the stack.

\n \n \n

Only one of the Capabilities and ResourceType parameters can be specified.

\n
" + "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to create the stack.

\n \n \n

Only one of the Capabilities and ResourceType parameters can be specified.

\n
" } }, "ResourceTypes": { @@ -2595,7 +2598,7 @@ "OnStackFailure": { "target": "com.amazonaws.cloudformation#OnStackFailure", "traits": { - "smithy.api#documentation": "

Determines what action will be taken if stack creation fails. If this parameter is specified, the\n DisableRollback parameter to the \n ExecuteChangeSet\n API operation must not\n be specified. This must be one of these values:

\n \n

For nested stacks, when the OnStackFailure parameter is set to DELETE for the change\n set for the parent stack, any failure in a child stack will cause the parent stack creation to fail and all stacks to\n be deleted.

" + "smithy.api#documentation": "

Determines what action will be taken if stack creation fails. If this parameter is specified, the\n DisableRollback parameter to the \n ExecuteChangeSet\n API\n operation must not be specified. This must be one of these values:

\n \n

For nested stacks, when the OnStackFailure parameter is set to DELETE for the change\n set for the parent stack, any failure in a child stack will cause the parent stack creation to fail and all stacks to\n be deleted.

" } }, "ImportExistingResources": { @@ -2780,7 +2783,7 @@ "Parameters": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "

A list of Parameter structures that specify input parameters for the stack. For more information,\n see the \n Parameter\n \n data type.

" + "smithy.api#documentation": "

A list of Parameter structures that specify input parameters for the stack. For more information,\n see the \n Parameter\n data type.

" } }, "DisableRollback": { @@ -2810,7 +2813,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to create the stack.

\n \n \n

Only one of the Capabilities and ResourceType parameters can be specified.

\n
" + "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to create the stack.

\n \n \n

Only one of the Capabilities and ResourceType parameters can be specified.

\n
" } }, "ResourceTypes": { @@ -2939,7 +2942,7 @@ "ParameterOverrides": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "

A list of stack set parameters whose values you want to override in the selected stack instances.

\n

Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values\n during stack instance operations:

\n \n

During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their\n overridden value.

\n

You can only override the parameter values that are specified in the stack set; to add or\n delete a parameter itself, use \n UpdateStackSet\n to update the stack set\n template.

" + "smithy.api#documentation": "

A list of stack set parameters whose values you want to override in the selected stack instances.

\n

Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values\n during stack instance operations:

\n \n

During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their\n overridden value.

\n

You can only override the parameter values that are specified in the stack set; to add or\n delete a parameter itself, use \n UpdateStackSet\n to update the\n stack set template.

" } }, "OperationPreferences": { @@ -3062,7 +3065,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack set template contains certain capabilities in\n order for CloudFormation to create the stack set and related stack instances.

\n " + "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack set template contains certain capabilities in\n order for CloudFormation to create the stack set and related stack instances.

\n " } }, "Tags": { @@ -4010,7 +4013,7 @@ "OnStackFailure": { "target": "com.amazonaws.cloudformation#OnStackFailure", "traits": { - "smithy.api#documentation": "

Determines what action will be taken if stack creation fails. When this parameter is specified, the\n DisableRollback parameter to the \n ExecuteChangeSet\n API operation must not\n be specified. This must be one of these values:

\n " + "smithy.api#documentation": "

Determines what action will be taken if stack creation fails. When this parameter is specified, the\n DisableRollback parameter to the \n ExecuteChangeSet\n API\n operation must not be specified. This must be one of these values:

\n " } }, "ImportExistingResources": { @@ -5538,7 +5541,7 @@ "ConfigurationSchema": { "target": "com.amazonaws.cloudformation#ConfigurationSchema", "traits": { - "smithy.api#documentation": "

A JSON string that represent the current configuration data for the extension in this account and Region.

\n

To set the configuration data for an extension, use \n SetTypeConfiguration\n . For more\n information, see Configuring extensions at\n the account level in the CloudFormation User Guide.

" + "smithy.api#documentation": "

A JSON string that represent the current configuration data for the extension in this account and Region.

\n

To set the configuration data for an extension, use \n SetTypeConfiguration\n .\n For more information, see Configuring extensions at\n the account level in the CloudFormation User Guide.

" } }, "PublisherId": { @@ -6063,7 +6066,7 @@ "DisableRollback": { "target": "com.amazonaws.cloudformation#DisableRollback", "traits": { - "smithy.api#documentation": "

Preserves the state of previously provisioned resources when an operation fails. This parameter can't be\n specified when the OnStackFailure parameter to the \n CreateChangeSet\n API operation was\n specified.

\n \n

Default: True\n

" + "smithy.api#documentation": "

Preserves the state of previously provisioned resources when an operation fails. This parameter can't be\n specified when the OnStackFailure parameter to the \n CreateChangeSet\n API\n operation was specified.

\n \n

Default: True\n

" } }, "RetainExceptOnCreate": { @@ -8057,6 +8060,77 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudformation#ListStackSetAutoDeploymentTargets": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudformation#ListStackSetAutoDeploymentTargetsInput" + }, + "output": { + "target": "com.amazonaws.cloudformation#ListStackSetAutoDeploymentTargetsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.cloudformation#StackSetNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns summary information about deployment targets for a stack set.

" + } + }, + "com.amazonaws.cloudformation#ListStackSetAutoDeploymentTargetsInput": { + "type": "structure", + "members": { + "StackSetName": { + "target": "com.amazonaws.cloudformation#StackSetNameOrId", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The name or unique ID of the stack set that you want to get automatic deployment targets for.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.cloudformation#NextToken", + "traits": { + "smithy.api#documentation": "

A string that identifies the next page of stack set deployment targets that you want to retrieve.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.cloudformation#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to be returned with a single call. If the number of available results exceeds this\n maximum, the response includes a NextToken value that you can assign to the NextToken\n request parameter to get the next set of results.

" + } + }, + "CallAs": { + "target": "com.amazonaws.cloudformation#CallAs", + "traits": { + "smithy.api#documentation": "

Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

\n

By default, SELF is specified. Use SELF for StackSets with self-managed\n permissions.

\n " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.cloudformation#ListStackSetAutoDeploymentTargetsOutput": { + "type": "structure", + "members": { + "Summaries": { + "target": "com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummaries", + "traits": { + "smithy.api#documentation": "

An array of summaries of the deployment targets for the stack set.

" + } + }, + "NextToken": { + "target": "com.amazonaws.cloudformation#NextToken", + "traits": { + "smithy.api#documentation": "

If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve\n the next set of results, call \n ListStackSetAutoDeploymentTargets\n again and use that value for the NextToken\n parameter. If the request returns all results, NextToken is set to an empty string.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.cloudformation#ListStackSetOperationResults": { "type": "operation", "input": { @@ -9676,7 +9750,7 @@ } ], "traits": { - "smithy.api#documentation": "

Registers an extension with the CloudFormation service. Registering an extension makes it available for use in\n CloudFormation templates in your Amazon Web Services account, and includes:

\n \n

For more information about how to develop extensions and ready them for registration, see Creating Resource\n Providers in the CloudFormation CLI User Guide.

\n

You can have a maximum of 50 resource extension versions registered at a time. This maximum is per account and\n per Region. Use \n DeregisterType\n to deregister specific extension versions if necessary.

\n

Once you have initiated a registration request using RegisterType, you can use DescribeTypeRegistration to monitor the progress of the registration request.

\n

Once you have registered a private extension in your account and Region, use \n SetTypeConfiguration\n to specify\n configuration properties for the extension. For more information, see Configuring extensions at\n the account level in the CloudFormation User Guide.

", + "smithy.api#documentation": "

Registers an extension with the CloudFormation service. Registering an extension makes it available for use in\n CloudFormation templates in your Amazon Web Services account, and includes:

\n \n

For more information about how to develop extensions and ready them for registration, see Creating Resource\n Providers in the CloudFormation CLI User Guide.

\n

You can have a maximum of 50 resource extension versions registered at a time. This maximum is per account and\n per Region. Use \n DeregisterType\n to deregister specific extension versions if necessary.

\n

Once you have initiated a registration request using RegisterType, you can use DescribeTypeRegistration to monitor the progress of the registration request.

\n

Once you have registered a private extension in your account and Region, use \n SetTypeConfiguration\n \n to specify configuration properties for the extension. For more information, see Configuring extensions at\n the account level in the CloudFormation User Guide.

", "smithy.api#idempotent": {} } }, @@ -10818,7 +10892,7 @@ "target": "com.amazonaws.cloudformation#Type", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The resource type of the rollback trigger. Specify either \n AWS::CloudWatch::Alarm\n or \n AWS::CloudWatch::CompositeAlarm\n resource types.

", + "smithy.api#documentation": "

The resource type of the rollback trigger. Specify either \n AWS::CloudWatch::Alarm\n or\n \n AWS::CloudWatch::CompositeAlarm\n resource types.

", "smithy.api#required": {} } } @@ -11000,7 +11074,7 @@ "target": "com.amazonaws.cloudformation#TypeConfiguration", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The configuration data for the extension, in this account and Region.

\n

The configuration data must be formatted as JSON, and validate against the schema returned in the\n ConfigurationSchema response element of \n DescribeType\n . For more information, see\n Defining\n account-level configuration data for an extension in the CloudFormation CLI User\n Guide.

", + "smithy.api#documentation": "

The configuration data for the extension, in this account and Region.

\n

The configuration data must be formatted as JSON, and validate against the schema returned in the\n ConfigurationSchema response element of \n DescribeType\n . For more\n information, see Defining\n account-level configuration data for an extension in the CloudFormation CLI User\n Guide.

", "smithy.api#required": {} } }, @@ -11599,7 +11673,7 @@ "Status": { "target": "com.amazonaws.cloudformation#StackInstanceStatus", "traits": { - "smithy.api#documentation": "

The status of the stack instance, in terms of its synchronization with its associated stack set.

\n " + "smithy.api#documentation": "

The status of the stack instance, in terms of its synchronization with its associated stack set.

\n " } }, "StackInstanceStatus": { @@ -11649,7 +11723,7 @@ "DetailedStatus": { "target": "com.amazonaws.cloudformation#StackInstanceDetailedStatus", "traits": { - "smithy.api#documentation": "" + "smithy.api#documentation": "" } } }, @@ -11923,7 +11997,7 @@ "Status": { "target": "com.amazonaws.cloudformation#StackInstanceStatus", "traits": { - "smithy.api#documentation": "

The status of the stack instance, in terms of its synchronization with its associated stack set.

\n " + "smithy.api#documentation": "

The status of the stack instance, in terms of its synchronization with its associated stack set.

\n " } }, "StatusReason": { @@ -12566,6 +12640,32 @@ "com.amazonaws.cloudformation#StackSetARN": { "type": "string" }, + "com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummary" + } + }, + "com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummary": { + "type": "structure", + "members": { + "OrganizationalUnitId": { + "target": "com.amazonaws.cloudformation#OrganizationalUnitId", + "traits": { + "smithy.api#documentation": "

The organization root ID or organizational unit (OU) IDs where the stack set is targeted.

" + } + }, + "Regions": { + "target": "com.amazonaws.cloudformation#RegionList", + "traits": { + "smithy.api#documentation": "

The list of Regions targeted for this organization or OU.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

One of the targets for the stack set. Returned by the \n ListStackSetAutoDeploymentTargets\n API operation.

" + } + }, "com.amazonaws.cloudformation#StackSetDriftDetectionDetails": { "type": "structure", "members": { @@ -13889,7 +13989,7 @@ } ], "traits": { - "smithy.api#documentation": "

Tests a registered extension to make sure it meets all necessary requirements for being published in the CloudFormation registry.

\n \n

For more information, see Testing your public\n extension prior to publishing in the CloudFormation CLI User Guide.

\n

If you don't specify a version, CloudFormation uses the default version of the extension in your account and Region\n for testing.

\n

To perform testing, CloudFormation assumes the execution role specified when the type was registered. For more\n information, see \n RegisterType\n .

\n

Once you've initiated testing on an extension using TestType, you can pass the returned\n TypeVersionArn into \n DescribeType\n to monitor the current test\n status and test status description for the extension.

\n

An extension must have a test status of PASSED before it can be published. For more information,\n see Publishing\n extensions to make them available for public use in the CloudFormation CLI User\n Guide.

", + "smithy.api#documentation": "

Tests a registered extension to make sure it meets all necessary requirements for being published in the CloudFormation registry.

\n \n

For more information, see Testing your public\n extension prior to publishing in the CloudFormation CLI User Guide.

\n

If you don't specify a version, CloudFormation uses the default version of the extension in your account and Region\n for testing.

\n

To perform testing, CloudFormation assumes the execution role specified when the type was registered. For more\n information, see \n RegisterType\n .

\n

Once you've initiated testing on an extension using TestType, you can pass the returned\n TypeVersionArn into \n DescribeType\n to monitor the\n current test status and test status description for the extension.

\n

An extension must have a test status of PASSED before it can be published. For more information,\n see Publishing\n extensions to make them available for public use in the CloudFormation CLI User\n Guide.

", "smithy.api#idempotent": {} } }, @@ -14687,13 +14787,13 @@ "Parameters": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "

A list of Parameter structures that specify input parameters for the stack. For more information,\n see the \n Parameter\n \n data type.

" + "smithy.api#documentation": "

A list of Parameter structures that specify input parameters for the stack. For more information,\n see the \n Parameter\n data type.

" } }, "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to update the stack.

\n \n \n

Only one of the Capabilities and ResourceType parameters can be specified.

\n
" + "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to update the stack.

\n \n \n

Only one of the Capabilities and ResourceType parameters can be specified.

\n
" } }, "ResourceTypes": { @@ -14791,7 +14891,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the parameter values for stack instances for the specified accounts, within the specified Amazon Web Services Regions. A stack instance refers to a stack in a specific account and Region.

\n

You can only update stack instances in Amazon Web Services Regions and accounts where they already exist; to\n create additional stack instances, use \n CreateStackInstances\n .

\n

During stack set updates, any parameters overridden for a stack instance aren't updated, but retain their\n overridden value.

\n

You can only update the parameter values that are specified in the stack set; to add or\n delete a parameter itself, use \n UpdateStackSet\n to update the stack set\n template. If you add a parameter to a template, before you can override the parameter value specified in the stack\n set you must first use \n UpdateStackSet\n to update all stack\n instances with the updated template and parameter value specified in the stack set. Once a stack instance has been\n updated with the new parameter, you can then override the parameter value using\n UpdateStackInstances.

" + "smithy.api#documentation": "

Updates the parameter values for stack instances for the specified accounts, within the specified Amazon Web Services Regions. A stack instance refers to a stack in a specific account and Region.

\n

You can only update stack instances in Amazon Web Services Regions and accounts where they already exist; to\n create additional stack instances, use \n CreateStackInstances\n .

\n

During stack set updates, any parameters overridden for a stack instance aren't updated, but retain their\n overridden value.

\n

You can only update the parameter values that are specified in the stack set; to add or\n delete a parameter itself, use \n UpdateStackSet\n to update the\n stack set template. If you add a parameter to a template, before you can override the parameter value specified in\n the stack set you must first use \n UpdateStackSet\n to update all\n stack instances with the updated template and parameter value specified in the stack set. Once a stack instance has\n been updated with the new parameter, you can then override the parameter value using\n UpdateStackInstances.

" } }, "com.amazonaws.cloudformation#UpdateStackInstancesInput": { @@ -14828,7 +14928,7 @@ "ParameterOverrides": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "

A list of input parameters whose values you want to update for the specified stack instances.

\n

Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values\n during stack instance update operations:

\n \n

During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their\n overridden value.

\n

You can only override the parameter values that are specified in the stack set; to add or\n delete a parameter itself, use UpdateStackSet to update the stack set template. If you add a parameter\n to a template, before you can override the parameter value specified in the stack set you must first use \n UpdateStackSet\n to\n update all stack instances with the updated template and parameter value specified in the stack set. Once a stack\n instance has been updated with the new parameter, you can then override the parameter value using\n UpdateStackInstances.

" + "smithy.api#documentation": "

A list of input parameters whose values you want to update for the specified stack instances.

\n

Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values\n during stack instance update operations:

\n \n

During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their\n overridden value.

\n

You can only override the parameter values that are specified in the stack set; to add or\n delete a parameter itself, use UpdateStackSet to update the stack set template. If you add a parameter\n to a template, before you can override the parameter value specified in the stack set you must first use \n UpdateStackSet\n to update all stack instances with the updated template and parameter value\n specified in the stack set. Once a stack instance has been updated with the new parameter, you can then override the\n parameter value using UpdateStackInstances.

" } }, "OperationPreferences": { @@ -14960,7 +15060,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to update the stack set and its associated stack instances.

\n " + "smithy.api#documentation": "

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order\n for CloudFormation to update the stack set and its associated stack instances.

\n " } }, "Tags": { diff --git a/aws-models/kms.json b/aws-models/kms.json index 82fb7e252d94..0534f4c3ee33 100644 --- a/aws-models/kms.json +++ b/aws-models/kms.json @@ -3414,8 +3414,7 @@ "PolicyName": { "target": "com.amazonaws.kms#PolicyNameType", "traits": { - "smithy.api#documentation": "

Specifies the name of the key policy. The only valid name is default. To get\n the names of key policies, use ListKeyPolicies.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get\n the names of key policies, use ListKeyPolicies.

" } } }, @@ -3431,6 +3430,12 @@ "traits": { "smithy.api#documentation": "

A key policy document in JSON format.

" } + }, + "PolicyName": { + "target": "com.amazonaws.kms#PolicyNameType", + "traits": { + "smithy.api#documentation": "

The name of the key policy. The only valid value is default.

" + } } }, "traits": { @@ -4017,7 +4022,7 @@ } ], "traits": { - "smithy.api#documentation": "

Imports or reimports key material into an existing KMS key that was created without key\n material. ImportKeyMaterial also sets the expiration model and expiration date of\n the imported key material.

\n

By default, KMS keys are created with key material that KMS generates. This operation\n supports Importing key\n material, an advanced feature that lets you generate and import the cryptographic\n key material for a KMS key. For more information about importing key material into KMS, see\n Importing key\n material in the Key Management Service Developer Guide.

\n

After you successfully import key material into a KMS key, you can reimport\n the same key material into that KMS key, but you cannot import different key\n material. You might reimport key material to replace key material that expired or key material\n that you deleted. You might also reimport key material to change the expiration model or\n expiration date of the key material. Before reimporting key material, if necessary, call DeleteImportedKeyMaterial to delete the current imported key material.

\n

Each time you import key material into KMS, you can determine whether\n (ExpirationModel) and when (ValidTo) the key material expires. To\n change the expiration of your key material, you must import it again, either by calling\n ImportKeyMaterial or using the import features of the KMS console.

\n

Before calling ImportKeyMaterial:

\n \n

Then, in an ImportKeyMaterial request, you submit your encrypted key\n material and import token. When calling this operation, you must specify the following\n values:

\n \n

When this operation is successful, the key state of the KMS key changes from\n PendingImport to Enabled, and you can use the KMS key in\n cryptographic operations.

\n

If this operation fails, use the exception to help determine the problem. If the error is\n related to the key material, the import token, or wrapping key, use GetParametersForImport to get a new public key and import token for the KMS key\n and repeat the import procedure. For help, see How To Import Key\n Material in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ImportKeyMaterial (key policy)

\n

\n Related operations:\n

\n \n

\n Eventual consistency: The KMS API follows an eventual consistency model. \n For more information, see KMS eventual consistency.

", + "smithy.api#documentation": "

Imports or reimports key material into an existing KMS key that was created without key\n material. ImportKeyMaterial also sets the expiration model and expiration date of\n the imported key material.

\n

By default, KMS keys are created with key material that KMS generates. This operation\n supports Importing key\n material, an advanced feature that lets you generate and import the cryptographic\n key material for a KMS key. For more information about importing key material into KMS, see\n Importing key\n material in the Key Management Service Developer Guide.

\n

After you successfully import key material into a KMS key, you can reimport\n the same key material into that KMS key, but you cannot import different key\n material. You might reimport key material to replace key material that expired or key material\n that you deleted. You might also reimport key material to change the expiration model or\n expiration date of the key material.

\n

Each time you import key material into KMS, you can determine whether\n (ExpirationModel) and when (ValidTo) the key material expires. To\n change the expiration of your key material, you must import it again, either by calling\n ImportKeyMaterial or using the import features of the KMS console.

\n

Before calling ImportKeyMaterial:

\n \n

Then, in an ImportKeyMaterial request, you submit your encrypted key\n material and import token. When calling this operation, you must specify the following\n values:

\n \n

When this operation is successful, the key state of the KMS key changes from\n PendingImport to Enabled, and you can use the KMS key in\n cryptographic operations.

\n

If this operation fails, use the exception to help determine the problem. If the error is\n related to the key material, the import token, or wrapping key, use GetParametersForImport to get a new public key and import token for the KMS key\n and repeat the import procedure. For help, see How To Import Key\n Material in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ImportKeyMaterial (key policy)

\n

\n Related operations:\n

\n \n

\n Eventual consistency: The KMS API follows an eventual consistency model. \n For more information, see KMS eventual consistency.

", "smithy.api#examples": [ { "title": "To import key material into a KMS key", @@ -5735,8 +5740,7 @@ "PolicyName": { "target": "com.amazonaws.kms#PolicyNameType", "traits": { - "smithy.api#documentation": "

The name of the key policy. The only valid value is default.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

" } }, "Policy": { @@ -6225,7 +6229,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified grant. You revoke a grant to terminate the permissions that the\n grant allows. For more information, see Retiring and revoking grants in\n the \n Key Management Service Developer Guide\n .

\n

When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. For details, see Eventual consistency in\n the \n Key Management Service Developer Guide\n .

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:RevokeGrant (key policy).

\n

\n Related operations:\n

\n \n

\n Eventual consistency: The KMS API follows an eventual consistency model. \n For more information, see KMS eventual consistency.

", + "smithy.api#documentation": "

Deletes the specified grant. You revoke a grant to terminate the permissions that the\n grant allows. For more information, see Retiring and revoking grants in\n the \n Key Management Service Developer Guide\n .

\n

When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. For details, see Eventual consistency in\n the \n Key Management Service Developer Guide\n .

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:RevokeGrant (key policy).

\n

\n Related operations:\n

\n \n

\n Eventual consistency: The KMS API follows an eventual consistency model. \n For more information, see KMS eventual consistency.

", "smithy.api#examples": [ { "title": "To revoke a grant", diff --git a/aws-models/mediatailor.json b/aws-models/mediatailor.json index 0645faf66ce9..3d47857a4c89 100644 --- a/aws-models/mediatailor.json +++ b/aws-models/mediatailor.json @@ -225,6 +225,79 @@ } } }, + "com.amazonaws.mediatailor#AlternateMedia": { + "type": "structure", + "members": { + "SourceLocationName": { + "target": "com.amazonaws.mediatailor#__string", + "traits": { + "smithy.api#documentation": "

The name of the source location for alternateMedia.

" + } + }, + "LiveSourceName": { + "target": "com.amazonaws.mediatailor#__string", + "traits": { + "smithy.api#documentation": "

The name of the live source for alternateMedia.

" + } + }, + "VodSourceName": { + "target": "com.amazonaws.mediatailor#__string", + "traits": { + "smithy.api#documentation": "

The name of the VOD source for alternateMedia.

" + } + }, + "ClipRange": { + "target": "com.amazonaws.mediatailor#ClipRange" + }, + "ScheduledStartTimeMillis": { + "target": "com.amazonaws.mediatailor#__long", + "traits": { + "smithy.api#documentation": "

The date and time that the alternateMedia is scheduled to start, in epoch milliseconds.

" + } + }, + "AdBreaks": { + "target": "com.amazonaws.mediatailor#__listOfAdBreak", + "traits": { + "smithy.api#documentation": "

Ad break configuration parameters defined in AlternateMedia.

" + } + }, + "DurationMillis": { + "target": "com.amazonaws.mediatailor#__long", + "traits": { + "smithy.api#documentation": "

The duration of the alternateMedia in milliseconds.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A playlist of media (VOD and/or live) to be played instead of the default media on a particular program.

" + } + }, + "com.amazonaws.mediatailor#AudienceMedia": { + "type": "structure", + "members": { + "Audience": { + "target": "com.amazonaws.mediatailor#__string", + "traits": { + "smithy.api#documentation": "

The Audience defined in AudienceMedia.

" + } + }, + "AlternateMedia": { + "target": "com.amazonaws.mediatailor#__listOfAlternateMedia", + "traits": { + "smithy.api#documentation": "

The list of AlternateMedia defined in AudienceMedia.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An AudienceMedia object contains an Audience and a list of AlternateMedia.

" + } + }, + "com.amazonaws.mediatailor#Audiences": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, "com.amazonaws.mediatailor#AvailMatchingCriteria": { "type": "structure", "members": { @@ -402,6 +475,12 @@ "smithy.api#documentation": "

The log configuration.

", "smithy.api#required": {} } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in channel.

" + } } }, "traits": { @@ -520,8 +599,15 @@ "EndOffsetMillis": { "target": "com.amazonaws.mediatailor#__long", "traits": { - "smithy.api#documentation": "

The end offset of the clip range, in milliseconds, starting from the beginning of the VOD source associated with the program.

", - "smithy.api#required": {} + "smithy.api#addedDefault": {}, + "smithy.api#default": 0, + "smithy.api#documentation": "

The end offset of the clip range, in milliseconds, starting from the beginning of the VOD source associated with the program.

" + } + }, + "StartOffsetMillis": { + "target": "com.amazonaws.mediatailor#__long", + "traits": { + "smithy.api#documentation": "

The start offset of the clip range, in milliseconds. This offset truncates the start at the number of milliseconds into the duration of the VOD source.

" } } }, @@ -745,6 +831,12 @@ "traits": { "smithy.api#documentation": "

\n The time-shifted viewing configuration you want to associate to the channel.\n

" } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in channel.

" + } } } }, @@ -823,6 +915,12 @@ "traits": { "smithy.api#documentation": "

\n The time-shifted viewing configuration assigned to the channel.\n

" } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in channel.

" + } } } }, @@ -1095,6 +1193,12 @@ "traits": { "smithy.api#documentation": "

The name that's used to refer to a VOD source.

" } + }, + "AudienceMedia": { + "target": "com.amazonaws.mediatailor#__listOfAudienceMedia", + "traits": { + "smithy.api#documentation": "

The list of AudienceMedia defined in program.

" + } } } }, @@ -1166,6 +1270,12 @@ "traits": { "smithy.api#documentation": "

The duration of the live program in milliseconds.

" } + }, + "AudienceMedia": { + "target": "com.amazonaws.mediatailor#__listOfAudienceMedia", + "traits": { + "smithy.api#documentation": "

The list of AudienceMedia defined in program.

" + } } } }, @@ -1910,6 +2020,12 @@ "traits": { "smithy.api#documentation": "

\n The time-shifted viewing configuration for the channel.\n

" } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in channel.

" + } } } }, @@ -2107,6 +2223,12 @@ "traits": { "smithy.api#documentation": "

The duration of the live program in milliseconds.

" } + }, + "AudienceMedia": { + "target": "com.amazonaws.mediatailor#__listOfAudienceMedia", + "traits": { + "smithy.api#documentation": "

The list of AudienceMedia defined in program.

" + } } } }, @@ -2408,6 +2530,13 @@ "smithy.api#documentation": "

(Optional) If the playback configuration has more than MaxResults channel schedules, use NextToken to get the second and subsequent pages of results.

\n

For the first GetChannelScheduleRequest request, omit this value.

\n

For the second and subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request.

\n

If the previous response didn't include a NextToken element, there are no more channel schedules to get.

", "smithy.api#httpQuery": "nextToken" } + }, + "Audience": { + "target": "com.amazonaws.mediatailor#__string", + "traits": { + "smithy.api#documentation": "

The single audience for GetChannelScheduleRequest.

", + "smithy.api#httpQuery": "audience" + } } } }, @@ -5147,6 +5276,12 @@ "traits": { "smithy.api#documentation": "

The name of the VOD source.

" } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in ScheduleEntry.

" + } } }, "traits": { @@ -5167,6 +5302,12 @@ "traits": { "smithy.api#enumValue": "FILLER_SLATE" } + }, + "ALTERNATE_MEDIA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALTERNATE_MEDIA" + } } } }, @@ -5741,6 +5882,12 @@ "traits": { "smithy.api#documentation": "

\n The time-shifted viewing configuration you want to associate to the channel.\n

" } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in channel.

" + } } } }, @@ -5819,6 +5966,12 @@ "traits": { "smithy.api#documentation": "

\n The time-shifted viewing configuration for the channel.\n

" } + }, + "Audiences": { + "target": "com.amazonaws.mediatailor#Audiences", + "traits": { + "smithy.api#documentation": "

The list of audiences defined in channel.

" + } } } }, @@ -5965,6 +6118,12 @@ "smithy.api#documentation": "

The schedule configuration settings.

", "smithy.api#required": {} } + }, + "AudienceMedia": { + "target": "com.amazonaws.mediatailor#__listOfAudienceMedia", + "traits": { + "smithy.api#documentation": "

The list of AudienceMedia defined in program.

" + } } } }, @@ -6036,6 +6195,12 @@ "traits": { "smithy.api#documentation": "

The scheduled start time for this Program.

" } + }, + "AudienceMedia": { + "target": "com.amazonaws.mediatailor#__listOfAudienceMedia", + "traits": { + "smithy.api#documentation": "

The list of AudienceMedia defined in program.

" + } } } }, @@ -6420,6 +6585,18 @@ "target": "com.amazonaws.mediatailor#Alert" } }, + "com.amazonaws.mediatailor#__listOfAlternateMedia": { + "type": "list", + "member": { + "target": "com.amazonaws.mediatailor#AlternateMedia" + } + }, + "com.amazonaws.mediatailor#__listOfAudienceMedia": { + "type": "list", + "member": { + "target": "com.amazonaws.mediatailor#AudienceMedia" + } + }, "com.amazonaws.mediatailor#__listOfAvailMatchingCriteria": { "type": "list", "member": { diff --git a/aws-models/rds.json b/aws-models/rds.json index ec551da9f5a8..b43b6ef28ad0 100644 --- a/aws-models/rds.json +++ b/aws-models/rds.json @@ -844,6 +844,9 @@ { "target": "com.amazonaws.rds#ModifyGlobalCluster" }, + { + "target": "com.amazonaws.rds#ModifyIntegration" + }, { "target": "com.amazonaws.rds#ModifyOptionGroup" }, @@ -6628,8 +6631,9 @@ "TargetArn": "arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8" }, "output": { - "SourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster", "IntegrationName": "my-integration", + "IntegrationArn": "arn:aws:rds:us-east-1:123456789012:integration:5b9f3d79-7392-4a3e-896c-58eaa1b53231", + "SourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster", "TargetArn": "arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8", "Tags": [], "CreateTime": "2023-12-28T17:20:20.629Z", @@ -6681,6 +6685,18 @@ }, "Tags": { "target": "com.amazonaws.rds#TagList" + }, + "DataFilter": { + "target": "com.amazonaws.rds#DataFilter", + "traits": { + "smithy.api#documentation": "

Data filtering options for the integration. For more information, see \n Data filtering for Aurora zero-ETL integrations with Amazon Redshift.\n

\n

Valid for: Integrations with Aurora MySQL source DB clusters only

" + } + }, + "Description": { + "target": "com.amazonaws.rds#IntegrationDescription", + "traits": { + "smithy.api#documentation": "

A description of the integration.

" + } } }, "traits": { @@ -11776,6 +11792,16 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.rds#DataFilter": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25600 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_ \"\\\\\\-$,*.:?+\\/]*$" + } + }, "com.amazonaws.rds#DatabaseArn": { "type": "string", "traits": { @@ -12950,6 +12976,7 @@ "output": { "SourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster", "IntegrationName": "my-integration", + "IntegrationArn": "arn:aws:rds:us-east-1:123456789012:integration:5b9f3d79-7392-4a3e-896c-58eaa1b53231", "TargetArn": "arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8", "Tags": [], "CreateTime": "2023-12-28T17:20:20.629Z", @@ -17004,6 +17031,7 @@ "Integrations": [ { "IntegrationName": "my-integration", + "IntegrationArn": "arn:aws:rds:us-east-1:123456789012:integration:5b9f3d79-7392-4a3e-896c-58eaa1b53231", "SourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster", "TargetArn": "arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8", "Tags": [], @@ -19762,6 +19790,18 @@ "traits": { "smithy.api#documentation": "

Any errors associated with the integration.

" } + }, + "DataFilter": { + "target": "com.amazonaws.rds#DataFilter", + "traits": { + "smithy.api#documentation": "

Data filters for the integration. These filters determine which tables\n from the source database are sent to the target Amazon Redshift data warehouse. \n

" + } + }, + "Description": { + "target": "com.amazonaws.rds#IntegrationDescription", + "traits": { + "smithy.api#documentation": "

A description of the integration.

" + } } }, "traits": { @@ -19792,7 +19832,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "^arn:aws[a-z\\-]*:rds(-[a-z]*)?:[a-z0-9\\-]*:[0-9]*:integration:[a-z][a-z0-9]*(-[a-zA-Z0-9]+)*\\/[a-zA-Z0-9_:\\-\\/]+$" + "smithy.api#pattern": "^arn:aws[a-z\\-]*:rds(-[a-z]*)?:[a-z0-9\\-]*:[0-9]*:integration:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" } }, "com.amazonaws.rds#IntegrationConflictOperationFault": { @@ -19812,6 +19852,16 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.rds#IntegrationDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": ".*" + } + }, "com.amazonaws.rds#IntegrationError": { "type": "structure", "members": { @@ -23308,6 +23358,84 @@ "smithy.api#output": {} } }, + "com.amazonaws.rds#ModifyIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.rds#ModifyIntegrationMessage" + }, + "output": { + "target": "com.amazonaws.rds#Integration" + }, + "errors": [ + { + "target": "com.amazonaws.rds#IntegrationConflictOperationFault" + }, + { + "target": "com.amazonaws.rds#IntegrationNotFoundFault" + }, + { + "target": "com.amazonaws.rds#InvalidIntegrationStateFault" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies a zero-ETL integration with Amazon Redshift.

\n \n

Currently, you can only modify integrations that have Aurora MySQL source DB clusters. Integrations with Aurora PostgreSQL and RDS sources currently don't support modifying the integration.

\n
", + "smithy.api#examples": [ + { + "title": "To modify a zero-ETL integration", + "documentation": "The following example modifies the name of an existing zero-ETL integration.", + "input": { + "IntegrationIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", + "IntegrationName": "my-renamed-integration" + }, + "output": { + "SourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster", + "IntegrationName": "my-renamed-integration", + "IntegrationArn": "arn:aws:rds:us-east-1:123456789012:integration:5b9f3d79-7392-4a3e-896c-58eaa1b53231", + "TargetArn": "arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8", + "Tags": [], + "DataFilter": "include: *.*", + "CreateTime": "2023-12-28T17:20:20.629Z", + "KMSKeyId": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa", + "Status": "active" + } + } + ] + } + }, + "com.amazonaws.rds#ModifyIntegrationMessage": { + "type": "structure", + "members": { + "IntegrationIdentifier": { + "target": "com.amazonaws.rds#IntegrationIdentifier", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The unique identifier of the integration to modify.

", + "smithy.api#required": {} + } + }, + "IntegrationName": { + "target": "com.amazonaws.rds#IntegrationName", + "traits": { + "smithy.api#documentation": "

A new name for the integration.

" + } + }, + "DataFilter": { + "target": "com.amazonaws.rds#DataFilter", + "traits": { + "smithy.api#documentation": "

A new data filter for the integration. For more information, see \n Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

" + } + }, + "Description": { + "target": "com.amazonaws.rds#IntegrationDescription", + "traits": { + "smithy.api#documentation": "

A new description for the integration.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.rds#ModifyOptionGroup": { "type": "operation", "input": { diff --git a/aws-models/s3.json b/aws-models/s3.json index 1d8505b2f50e..0148e679b0f6 100644 --- a/aws-models/s3.json +++ b/aws-models/s3.json @@ -19219,6 +19219,16 @@ "traits": { "smithy.api#documentation": "\n

This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see \n CreateBucket\n .

\n
\n

Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a\n valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to\n create buckets. By creating the bucket, you become the bucket owner.

\n

There are two types of buckets: general purpose buckets and directory buckets. For more\n information about these bucket types, see Creating, configuring, and\n working with Amazon S3 buckets in the Amazon S3 User Guide.

\n \n \n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - In addition to the s3:CreateBucket permission, the following permissions are\n required in a policy when your CreateBucket request includes specific\n headers:

    \n
      \n
    • \n

      \n Access control lists (ACLs) - In your CreateBucket request, if you specify an access control list (ACL) \n and set it to public-read, public-read-write,\n authenticated-read, or if you explicitly specify any other custom ACLs, both s3:CreateBucket and\n s3:PutBucketAcl permissions are required. In your CreateBucket request, if you set the ACL to private, \n or if you don't specify any ACLs, only the s3:CreateBucket permission is required.\n

      \n
    • \n
    • \n

      \n Object Lock - In your\n CreateBucket request, if you set \n x-amz-bucket-object-lock-enabled to true, the \n s3:PutBucketObjectLockConfiguration and\n s3:PutBucketVersioning permissions are required.

      \n
    • \n
    • \n

      \n S3 Object Ownership - If your\n CreateBucket request includes the\n x-amz-object-ownership header, then the\n s3:PutBucketOwnershipControls permission is required.

      \n \n

      To set an ACL on a bucket as part of a\n CreateBucket request, you must explicitly set S3\n Object Ownership for the bucket to a different value than the\n default, BucketOwnerEnforced. Additionally, if your\n desired bucket ACL grants public access, you must first create the\n bucket (without the bucket ACL) and then explicitly disable Block\n Public Access on the bucket before using PutBucketAcl\n to set the ACL. If you try to create a bucket with a public ACL,\n the request will fail.

      \n

      For the majority of modern use cases in S3, we recommend\n that you keep all Block Public Access settings enabled and keep\n ACLs disabled. If you would like to share data with users outside\n of your account, you can use bucket policies as needed. For more\n information, see Controlling ownership of objects and disabling ACLs for your\n bucket and Blocking public access to your Amazon S3 storage in\n the Amazon S3 User Guide.

      \n
      \n
    • \n
    • \n

      \n S3 Block Public Access - If your\n specific use case requires granting public access to your S3 resources, you\n can disable Block Public Access. Specifically, you can create a new bucket with Block\n Public Access enabled, then separately call the \n DeletePublicAccessBlock\n API. To use this operation, you must have the\n s3:PutBucketPublicAccessBlock permission. For more information about S3 Block Public\n Access, see Blocking\n public access to your Amazon S3 storage in the\n Amazon S3 User Guide.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - You must have the s3express:CreateBucket permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    \n \n

    The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access are not supported for directory buckets. \n For directory buckets, all Block Public Access settings are enabled at the bucket level and S3 \n Object Ownership is set to Bucket owner enforced (ACLs disabled). These settings can't be modified.\n

    \n

    For more information about permissions for creating and working with \n directory buckets, see Directory buckets in the Amazon S3 User Guide. \n For more information about supported S3 features for directory buckets, see Features of S3 Express One Zone in the Amazon S3 User Guide.

    \n
    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com.

\n
\n
\n

The following operations are related to CreateBucket:

\n ", "smithy.api#examples": [ + { + "title": "To create a bucket ", + "documentation": "The following example creates a bucket.", + "input": { + "Bucket": "examplebucket" + }, + "output": { + "Location": "/examplebucket" + } + }, { "title": "To create a bucket in a specific region", "documentation": "The following example creates a bucket. The request specifies an AWS region where to create the bucket.", @@ -19231,16 +19241,6 @@ "output": { "Location": "http://examplebucket..s3.amazonaws.com/" } - }, - { - "title": "To create a bucket ", - "documentation": "The following example creates a bucket.", - "input": { - "Bucket": "examplebucket" - }, - "output": { - "Location": "/examplebucket" - } } ], "smithy.api#http": { @@ -20683,14 +20683,6 @@ "traits": { "smithy.api#documentation": "

Removes an object from a bucket. The behavior depends on the bucket's versioning state:

\n \n \n
    \n
  • \n

    \n Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null \n to the versionId query parameter in the request.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n . Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

To remove a specific version, you must use the versionId query parameter. Using this\n query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3\n sets the response header x-amz-delete-marker to true.

\n

If the object you want to delete is in a bucket where the bucket versioning\n configuration is MFA Delete enabled, you must include the x-amz-mfa request\n header in the DELETE versionId request. Requests that include\n x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3\n User Guide. To see sample\n requests that use versioning, see Sample\n Request.

\n \n

\n Directory buckets - MFA delete is not supported by directory buckets.

\n
\n

You can delete objects by explicitly calling DELETE Object or calling \n (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block\n users or accounts from removing or deleting objects from your bucket, you must deny them\n the s3:DeleteObject, s3:DeleteObjectVersion, and\n s3:PutLifeCycleConfiguration actions.

\n \n

\n Directory buckets - S3 Lifecycle is not supported by directory buckets.

\n
\n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The following permissions are required in your policies when your \n DeleteObjects request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:DeleteObject\n - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

      \n
    • \n
    • \n

      \n \n s3:DeleteObjectVersion\n - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com.

\n
\n
\n

The following action is related to DeleteObject:

\n ", "smithy.api#examples": [ - { - "title": "To delete an object (from a non-versioned bucket)", - "documentation": "The following example deletes an object from a non-versioned bucket.", - "input": { - "Bucket": "ExampleBucket", - "Key": "HappyFace.jpg" - } - }, { "title": "To delete an object", "documentation": "The following example deletes an object from an S3 bucket.", @@ -20699,6 +20691,14 @@ "Key": "objectkey.jpg" }, "output": {} + }, + { + "title": "To delete an object (from a non-versioned bucket)", + "documentation": "The following example deletes an object from a non-versioned bucket.", + "input": { + "Bucket": "ExampleBucket", + "Key": "HappyFace.jpg" + } } ], "smithy.api#http": { @@ -23582,7 +23582,8 @@ "target": "com.amazonaws.s3#ObjectLockLegalHold", "traits": { "smithy.api#documentation": "

The current legal hold status for the specified object.

", - "smithy.api#httpPayload": {} + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "LegalHold" } } }, @@ -24144,7 +24145,8 @@ "target": "com.amazonaws.s3#ObjectLockRetention", "traits": { "smithy.api#documentation": "

The container element for an object's retention settings.

", - "smithy.api#httpPayload": {} + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "Retention" } } }, @@ -24211,40 +24213,40 @@ "smithy.api#documentation": "\n

This operation is not supported by directory buckets.

\n
\n

Returns the tag-set of an object. You send the GET request against the tagging\n subresource associated with the object.

\n

To use this operation, you must have permission to perform the\n s3:GetObjectTagging action. By default, the GET action returns information\n about current version of an object. For a versioned bucket, you can have multiple versions\n of an object in your bucket. To retrieve tags of any other version, use the versionId query\n parameter. You also need permission for the s3:GetObjectVersionTagging\n action.

\n

By default, the bucket owner has this permission and can grant this permission to\n others.

\n

For information about the Amazon S3 object tagging feature, see Object Tagging.

\n

The following actions are related to GetObjectTagging:

\n ", "smithy.api#examples": [ { - "title": "To retrieve tag set of an object", - "documentation": "The following example retrieves tag set of an object.", + "title": "To retrieve tag set of a specific object version", + "documentation": "The following example retrieves tag set of an object. The request specifies object version.", "input": { "Bucket": "examplebucket", - "Key": "HappyFace.jpg" + "Key": "exampleobject", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, "output": { - "VersionId": "null", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI", "TagSet": [ { - "Value": "Value4", - "Key": "Key4" - }, - { - "Value": "Value3", - "Key": "Key3" + "Value": "Value1", + "Key": "Key1" } ] } }, { - "title": "To retrieve tag set of a specific object version", - "documentation": "The following example retrieves tag set of an object. The request specifies object version.", + "title": "To retrieve tag set of an object", + "documentation": "The following example retrieves tag set of an object.", "input": { "Bucket": "examplebucket", - "Key": "exampleobject", - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + "Key": "HappyFace.jpg" }, "output": { - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI", + "VersionId": "null", "TagSet": [ { - "Value": "Value1", - "Key": "Key1" + "Value": "Value4", + "Key": "Key4" + }, + { + "Value": "Value3", + "Key": "Key3" } ] } @@ -26688,6 +26690,44 @@ "traits": { "smithy.api#documentation": "\n

This operation is not supported by directory buckets.

\n
\n

Returns metadata about all versions of the objects in a bucket. You can also use request\n parameters as selection criteria to return metadata about a subset of all the object\n versions.

\n \n

To use this operation, you must have permission to perform the\n s3:ListBucketVersions action. Be aware of the name difference.

\n
\n \n

A 200 OK response can contain valid or invalid XML. Make sure to design\n your application to parse the contents of the response and handle it\n appropriately.

\n
\n

To use this operation, you must have READ access to the bucket.

\n

The following operations are related to ListObjectVersions:

\n ", "smithy.api#examples": [ + { + "title": "To list object versions", + "documentation": "The following example return versions of an object with specific key name prefix. The request limits the number of items returned to two. If there are are more than two object version, S3 returns NextToken in the response. You can specify this token value in your next request to fetch next set of object versions.", + "input": { + "Bucket": "examplebucket", + "Prefix": "HappyFace.jpg" + }, + "output": { + "Versions": [ + { + "LastModified": "2016-12-15T01:19:41.000Z", + "VersionId": "null", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "StorageClass": "STANDARD", + "Key": "HappyFace.jpg", + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "IsLatest": true, + "Size": 3191 + }, + { + "LastModified": "2016-12-13T00:58:26.000Z", + "VersionId": "PHtexPGjH2y.zBgT8LmB7wwLI2mpbz.k", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + "StorageClass": "STANDARD", + "Key": "HappyFace.jpg", + "Owner": { + "DisplayName": "owner-display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + }, + "IsLatest": false, + "Size": 3191 + } + ] + } + }, { "title": "To list object versions", "documentation": "The following example returns versions of an object with specific key name prefix.", @@ -30610,17 +30650,30 @@ "smithy.api#documentation": "

Adds an object to a bucket.

\n \n
    \n
  • \n

    Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the\n entire object to the bucket. You cannot use PutObject to only update a\n single piece of metadata for an existing object. You must put the entire object with\n updated metadata if you want to update some values.

    \n
  • \n
  • \n

    If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are disabled and no longer affect permissions. All\n objects written to the bucket by any account will be owned by the bucket owner.

    \n
  • \n
  • \n

    \n Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name\n . Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the\n Amazon S3 User Guide.

    \n
  • \n
\n
\n

Amazon S3 is a distributed system. If it receives multiple write requests for the same object\n simultaneously, it overwrites all but the last object written. However, Amazon S3 provides features that can modify this behavior:

\n \n
\n
Permissions
\n
\n
    \n
  • \n

    \n General purpose bucket permissions - The following permissions are required in your policies when your \n PutObject request includes specific headers.

    \n
      \n
    • \n

      \n \n s3:PutObject\n - To successfully complete the PutObject request, you must always have the s3:PutObject permission on a bucket to add an object\n to it.

      \n
    • \n
    • \n

      \n \n s3:PutObjectAcl\n - To successfully change the objects ACL of your PutObject request, you must have the s3:PutObjectAcl.

      \n
    • \n
    • \n

      \n \n s3:PutObjectTagging\n - To successfully set the tag-set with your PutObject request, you\n must have the s3:PutObjectTagging.

      \n
    • \n
    \n
  • \n
  • \n

    \n Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the \n CreateSession\n API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. \nAmazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see \n CreateSession\n .

    \n
  • \n
\n
\n
Data integrity with Content-MD5
\n
\n
    \n
  • \n

    \n General purpose bucket - To ensure that data is not corrupted traversing the network, use the\n Content-MD5 header. When you use this header, Amazon S3 checks the object\n against the provided MD5 value and, if they do not match, Amazon S3 returns an error. Alternatively, when the object's ETag is its MD5 digest, \n you can calculate the MD5 while putting the object to Amazon S3 and compare the returned ETag to\n the calculated MD5 value.

    \n
  • \n
  • \n

    \n Directory bucket - This functionality is not supported for directory buckets.

    \n
  • \n
\n
\n
HTTP Host header syntax
\n
\n

\n Directory buckets - The HTTP Host header syntax is \n Bucket_name.s3express-az_id.region.amazonaws.com.

\n
\n
\n

For more information about related Amazon S3 APIs, see the following:

\n ", "smithy.api#examples": [ { - "title": "To upload an object and specify server-side encryption and object tags", - "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", + "title": "To upload an object", + "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", "input": { - "Body": "filetoupload", + "Body": "HappyFace.jpg", "Bucket": "examplebucket", - "Key": "exampleobject", + "Key": "HappyFace.jpg" + }, + "output": { + "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", + "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" + } + }, + { + "title": "To upload an object (specify optional headers)", + "documentation": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", + "input": { + "Body": "HappyFace.jpg", + "Bucket": "examplebucket", + "Key": "HappyFace.jpg", "ServerSideEncryption": "AES256", - "Tagging": "key1=value1&key2=value2" + "StorageClass": "STANDARD_IA" }, "output": { - "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", + "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp", "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", "ServerSideEncryption": "AES256" } @@ -30656,19 +30709,6 @@ "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" } }, - { - "title": "To upload an object", - "documentation": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", - "input": { - "Body": "HappyFace.jpg", - "Bucket": "examplebucket", - "Key": "HappyFace.jpg" - }, - "output": { - "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk", - "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"" - } - }, { "title": "To create an object.", "documentation": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", @@ -30683,17 +30723,17 @@ } }, { - "title": "To upload an object (specify optional headers)", - "documentation": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", + "title": "To upload an object and specify server-side encryption and object tags", + "documentation": "The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", "input": { - "Body": "HappyFace.jpg", + "Body": "filetoupload", "Bucket": "examplebucket", - "Key": "HappyFace.jpg", + "Key": "exampleobject", "ServerSideEncryption": "AES256", - "StorageClass": "STANDARD_IA" + "Tagging": "key1=value1&key2=value2" }, "output": { - "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp", + "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt", "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", "ServerSideEncryption": "AES256" } diff --git a/aws-models/sdk-endpoints.json b/aws-models/sdk-endpoints.json index dc6f671cfd12..5b2605689aca 100644 --- a/aws-models/sdk-endpoints.json +++ b/aws-models/sdk-endpoints.json @@ -2099,6 +2099,12 @@ "tags" : [ "dualstack" ] } ] }, + "ca-west-1" : { + "variants" : [ { + "hostname" : "athena.ca-west-1.api.aws", + "tags" : [ "dualstack" ] + } ] + }, "eu-central-1" : { "variants" : [ { "hostname" : "athena.eu-central-1.api.aws", @@ -12802,6 +12808,12 @@ }, "hostname" : "oidc.ap-southeast-3.amazonaws.com" }, + "ap-southeast-4" : { + "credentialScope" : { + "region" : "ap-southeast-4" + }, + "hostname" : "oidc.ap-southeast-4.amazonaws.com" + }, "ca-central-1" : { "credentialScope" : { "region" : "ca-central-1" @@ -13459,6 +13471,12 @@ }, "hostname" : "portal.sso.ap-southeast-3.amazonaws.com" }, + "ap-southeast-4" : { + "credentialScope" : { + "region" : "ap-southeast-4" + }, + "hostname" : "portal.sso.ap-southeast-4.amazonaws.com" + }, "ca-central-1" : { "credentialScope" : { "region" : "ca-central-1" @@ -17943,6 +17961,7 @@ "ap-southeast-1" : { }, "ap-southeast-2" : { }, "ap-southeast-3" : { }, + "ap-southeast-4" : { }, "ca-central-1" : { }, "eu-central-1" : { }, "eu-central-2" : { }, @@ -27896,6 +27915,30 @@ "us-isob-east-1" : { } } }, + "storagegateway" : { + "endpoints" : { + "fips" : { + "credentialScope" : { + "region" : "us-isob-east-1" + }, + "deprecated" : true, + "hostname" : "storagegateway-fips.us-isob-east-1.sc2s.sgov.gov" + }, + "us-isob-east-1" : { + "variants" : [ { + "hostname" : "storagegateway-fips.us-isob-east-1.sc2s.sgov.gov", + "tags" : [ "fips" ] + } ] + }, + "us-isob-east-1-fips" : { + "credentialScope" : { + "region" : "us-isob-east-1" + }, + "deprecated" : true, + "hostname" : "storagegateway-fips.us-isob-east-1.sc2s.sgov.gov" + } + } + }, "streams.dynamodb" : { "defaults" : { "credentialScope" : { diff --git a/aws-models/timestream-query.json b/aws-models/timestream-query.json index b7ed95355061..0b3e199f75dd 100644 --- a/aws-models/timestream-query.json +++ b/aws-models/timestream-query.json @@ -229,7 +229,7 @@ "QueryString": { "target": "com.amazonaws.timestreamquery#QueryString", "traits": { - "smithy.api#documentation": "

The query string to run. Parameter\n names can be specified in the query string @ character followed by an\n identifier. The named Parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run.

\n

The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime paramater for each query run. \n For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is \n initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.

", + "smithy.api#documentation": "

The query string to run. Parameter names can be specified in the query string\n @ character followed by an identifier. The named Parameter\n @scheduled_runtime is reserved and can be used in the query to get the\n time at which the query is scheduled to run.

\n

The timestamp calculated according to the ScheduleConfiguration parameter, will be the\n value of @scheduled_runtime paramater for each query run. For example,\n consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this\n instance, the @scheduled_runtime parameter is initialized to the timestamp\n 2021-12-01 00:00:00 when invoking the query.

", "smithy.api#required": {} } }, @@ -243,7 +243,7 @@ "NotificationConfiguration": { "target": "com.amazonaws.timestreamquery#NotificationConfiguration", "traits": { - "smithy.api#documentation": "

Notification configuration for the scheduled query. A notification is sent by\n Timestream when a query run finishes, when the state is updated or when you delete it.

", + "smithy.api#documentation": "

Notification configuration for the scheduled query. A notification is sent by\n Timestream when a query run finishes, when the state is updated or when you delete it.\n

", "smithy.api#required": {} } }, @@ -256,14 +256,14 @@ "ClientToken": { "target": "com.amazonaws.timestreamquery#ClientToken", "traits": { - "smithy.api#documentation": "

Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making \n multiple identical CreateScheduledQuery requests has the same effect as making a single request.\n\n

\n ", + "smithy.api#documentation": "

Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words,\n making the same request repeatedly will produce the same result. Making multiple\n identical CreateScheduledQuery requests has the same effect as making a single request.

\n ", "smithy.api#idempotencyToken": {} } }, "ScheduledQueryExecutionRoleArn": { "target": "com.amazonaws.timestreamquery#AmazonResourceName", "traits": { - "smithy.api#documentation": "

The ARN for the IAM role that Timestream will assume when running the scheduled query.

", + "smithy.api#documentation": "

The ARN for the IAM role that Timestream will assume when running the scheduled query.\n

", "smithy.api#required": {} } }, @@ -276,13 +276,13 @@ "KmsKeyId": { "target": "com.amazonaws.timestreamquery#StringValue2048", "traits": { - "smithy.api#documentation": "

The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS\n key is not specified, the scheduled query resource will be encrypted with a Timestream\n owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias\n ARN. When using an alias name, prefix the name with alias/\n

\n

If ErrorReportConfiguration uses SSE_KMS as encryption type, the same KmsKeyId is used to encrypt the error report at rest.

" + "smithy.api#documentation": "

The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the\n Amazon KMS key is not specified, the scheduled query resource will be encrypted with a\n Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias\n name, or alias ARN. When using an alias name, prefix the name with\n alias/\n

\n

If ErrorReportConfiguration uses SSE_KMS as encryption type, the same\n KmsKeyId is used to encrypt the error report at rest.

" } }, "ErrorReportConfiguration": { "target": "com.amazonaws.timestreamquery#ErrorReportConfiguration", "traits": { - "smithy.api#documentation": "

Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.

", + "smithy.api#documentation": "

Configuration for error reporting. Error reports will be generated when a problem is\n encountered when writing the query results.

", "smithy.api#required": {} } } @@ -666,7 +666,7 @@ "InvocationTime": { "target": "com.amazonaws.timestreamquery#Time", "traits": { - "smithy.api#documentation": "

The timestamp in UTC. Query will be run as if it was invoked at this timestamp.

", + "smithy.api#documentation": "

The timestamp in UTC. Query will be run as if it was invoked at this timestamp.\n

", "smithy.api#required": {} } }, @@ -689,7 +689,7 @@ "target": "com.amazonaws.timestreamquery#Long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

Total time, measured in milliseconds, that was needed for the scheduled query run to complete.

" + "smithy.api#documentation": "

Total time, measured in milliseconds, that was needed for the scheduled query run to\n complete.

" } }, "DataWrites": { @@ -780,7 +780,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "

Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries is eventually consistent.

", + "smithy.api#documentation": "

Gets a list of all scheduled queries in the caller's Amazon account and Region.\n ListScheduledQueries is eventually consistent.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1109,7 +1109,7 @@ } }, "traits": { - "smithy.api#documentation": "

Notification configuration for a scheduled query. A notification is sent by\n Timestream when a scheduled query is created, its state is updated or when it is deleted.

" + "smithy.api#documentation": "

Notification configuration for a scheduled query. A notification is sent by Timestream\n when a scheduled query is created, its state is updated or when it is deleted.

" } }, "com.amazonaws.timestreamquery#NullableBoolean": { @@ -1180,7 +1180,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "

A synchronous operation that allows you to submit a query with parameters to be stored\n by Timestream for later running. Timestream only supports using this operation with the\n PrepareQueryRequest$ValidateOnly set to true.

", + "smithy.api#documentation": "

A synchronous operation that allows you to submit a query with parameters to be stored\n by Timestream for later running. Timestream only supports using this operation with\n ValidateOnly set to true.

", "smithy.api#idempotent": {} } }, @@ -1899,7 +1899,7 @@ "InvocationTime": { "target": "com.amazonaws.timestreamquery#Time", "traits": { - "smithy.api#documentation": "

InvocationTime for this run. This is the time at which the query is scheduled to run.\n Parameter @scheduled_runtime can be used in the query to get the value.

" + "smithy.api#documentation": "

InvocationTime for this run. This is the time at which the query is scheduled to run.\n Parameter @scheduled_runtime can be used in the query to get the value.\n

" } }, "TriggerTime": { @@ -2261,7 +2261,7 @@ "TableName": { "target": "com.amazonaws.timestreamquery#ResourceName", "traits": { - "smithy.api#documentation": "

Name of Timestream table that the query result will be written to. The table should\n be within the same database that is provided in Timestream configuration.

", + "smithy.api#documentation": "

Name of Timestream table that the query result will be written to. The table should be\n within the same database that is provided in Timestream configuration.

", "smithy.api#required": {} } }, @@ -3020,7 +3020,7 @@ "ScalarType": { "target": "com.amazonaws.timestreamquery#ScalarType", "traits": { - "smithy.api#documentation": "

Indicates if the column is of type string, integer, Boolean, double, timestamp, date,\n time.

" + "smithy.api#documentation": "

Indicates if the column is of type string, integer, Boolean, double, timestamp, date,\n time. For more information, see Supported data\n types.

" } }, "ArrayColumnInfo": { diff --git a/examples/cross_service/detect_faces/Cargo.toml b/examples/cross_service/detect_faces/Cargo.toml index 0ecde7d29244..957a62278770 100644 --- a/examples/cross_service/detect_faces/Cargo.toml +++ b/examples/cross_service/detect_faces/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] aws-config= { version = "1.1.8", path = "../../../sdk/aws-config" } aws-sdk-rekognition= { version = "1.18.0", path = "../../../sdk/rekognition" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types", features = ["rt-tokio"] } [dependencies.tokio] diff --git a/examples/cross_service/detect_labels/Cargo.toml b/examples/cross_service/detect_labels/Cargo.toml index be88f50c3153..9cb119906211 100644 --- a/examples/cross_service/detect_labels/Cargo.toml +++ b/examples/cross_service/detect_labels/Cargo.toml @@ -10,7 +10,7 @@ kamadak-exif = "0.5.4" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config" } aws-sdk-dynamodb= { version = "1.18.0", path = "../../../sdk/dynamodb" } aws-sdk-rekognition= { version = "1.18.0", path = "../../../sdk/rekognition" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types", features = ["rt-tokio"] } aws-types= { version = "1.1.8", path = "../../../sdk/aws-types" } diff --git a/examples/cross_service/photo_asset_management/Cargo.toml b/examples/cross_service/photo_asset_management/Cargo.toml index 0a47bd78181c..404877530293 100644 --- a/examples/cross_service/photo_asset_management/Cargo.toml +++ b/examples/cross_service/photo_asset_management/Cargo.toml @@ -33,7 +33,7 @@ tracing = "0.1.37" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config" } aws-sdk-dynamodb= { version = "1.18.0", path = "../../../sdk/dynamodb" } aws-sdk-rekognition= { version = "1.18.0", path = "../../../sdk/rekognition" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-sdk-sns= { version = "1.18.0", path = "../../../sdk/sns" } aws-smithy-runtime= { version = "1.1.8", path = "../../../sdk/aws-smithy-runtime" } aws-smithy-types-convert= { version = "0.60.8", path = "../../../sdk/aws-smithy-types-convert", features = ["convert-chrono"] } diff --git a/examples/cross_service/telephone/Cargo.toml b/examples/cross_service/telephone/Cargo.toml index 7144d162ecd7..b8c1355ba4ad 100644 --- a/examples/cross_service/telephone/Cargo.toml +++ b/examples/cross_service/telephone/Cargo.toml @@ -13,7 +13,7 @@ reqwest = "0.11.4" serde_json = "1.0" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config" } aws-sdk-polly= { version = "1.18.0", path = "../../../sdk/polly" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-sdk-transcribe= { version = "1.17.0", path = "../../../sdk/transcribe" } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types", features = ["rt-tokio"] } diff --git a/examples/examples/aurora/Cargo.toml b/examples/examples/aurora/Cargo.toml index 2d58ddfff76a..6851099d799d 100644 --- a/examples/examples/aurora/Cargo.toml +++ b/examples/examples/aurora/Cargo.toml @@ -16,7 +16,7 @@ tracing = "0.1.37" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types" } aws-smithy-runtime-api= { version = "1.2.0", path = "../../../sdk/aws-smithy-runtime-api" } -aws-sdk-rds= { version = "1.23.0", path = "../../../sdk/rds" } +aws-sdk-rds= { version = "1.24.0", path = "../../../sdk/rds" } [dependencies.phf] version = "0.11.2" diff --git a/examples/examples/cloudformation/Cargo.toml b/examples/examples/cloudformation/Cargo.toml index 85b01c194647..fa7880539939 100644 --- a/examples/examples/cloudformation/Cargo.toml +++ b/examples/examples/cloudformation/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-cloudformation= { version = "1.20.0", path = "../../../sdk/cloudformation" } +aws-sdk-cloudformation= { version = "1.21.0", path = "../../../sdk/cloudformation" } [dependencies.tokio] version = "1.20.1" diff --git a/examples/examples/concurrency/Cargo.toml b/examples/examples/concurrency/Cargo.toml index a76cf952eba5..16cc70e043de 100644 --- a/examples/examples/concurrency/Cargo.toml +++ b/examples/examples/concurrency/Cargo.toml @@ -26,5 +26,5 @@ features = ["env-filter"] [dev-dependencies] fastrand = "1.8.0" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-sdk-sqs= { version = "1.17.0", path = "../../../sdk/sqs" } diff --git a/examples/examples/custom-root-certificates/Cargo.toml b/examples/examples/custom-root-certificates/Cargo.toml index f8b0fae1b494..c21a3afaf310 100644 --- a/examples/examples/custom-root-certificates/Cargo.toml +++ b/examples/examples/custom-root-certificates/Cargo.toml @@ -10,7 +10,7 @@ publish = false [dependencies] rustls = "0.21.9" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3", default-features = false } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3", default-features = false } aws-smithy-runtime= { version = "1.1.8", path = "../../../sdk/aws-smithy-runtime", features = ["tls-rustls"] } [dependencies.tokio] diff --git a/examples/examples/glue/Cargo.toml b/examples/examples/glue/Cargo.toml index ceadf45880ed..38f07d4d38e1 100644 --- a/examples/examples/glue/Cargo.toml +++ b/examples/examples/glue/Cargo.toml @@ -20,7 +20,7 @@ futures = "0.3.25" tracing-bunyan-formatter = "0.3.4" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-sdk-glue= { version = "1.21.0", path = "../../../sdk/glue" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-http= { version = "0.60.5", path = "../../../sdk/aws-http" } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types" } aws-types= { version = "1.1.8", path = "../../../sdk/aws-types" } diff --git a/examples/examples/iam/Cargo.toml b/examples/examples/iam/Cargo.toml index 13a00deb913f..688a77528afb 100644 --- a/examples/examples/iam/Cargo.toml +++ b/examples/examples/iam/Cargo.toml @@ -24,7 +24,7 @@ lazy_static = "1.4.0" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-credential-types= { version = "1.1.8", path = "../../../sdk/aws-credential-types", features = ["hardcoded-credentials"] } aws-sdk-iam= { version = "1.17.0", path = "../../../sdk/iam" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-sdk-sts= { version = "1.17.0", path = "../../../sdk/sts" } [dependencies.sdk-examples-test-utils] diff --git a/examples/examples/kms/Cargo.toml b/examples/examples/kms/Cargo.toml index b32210e837fb..34474da8fd0f 100644 --- a/examples/examples/kms/Cargo.toml +++ b/examples/examples/kms/Cargo.toml @@ -10,7 +10,7 @@ publish = false [dependencies] base64 = "0.13.0" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-kms= { version = "1.17.0", path = "../../../sdk/kms" } +aws-sdk-kms= { version = "1.18.0", path = "../../../sdk/kms" } [dependencies.tokio] version = "1.20.1" diff --git a/examples/examples/lambda/Cargo.toml b/examples/examples/lambda/Cargo.toml index 1ab312fdb977..b10675dcb3ba 100644 --- a/examples/examples/lambda/Cargo.toml +++ b/examples/examples/lambda/Cargo.toml @@ -15,7 +15,7 @@ aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = [" aws-sdk-ec2= { version = "1.26.0", path = "../../../sdk/ec2" } aws-sdk-iam= { version = "1.17.0", path = "../../../sdk/iam" } aws-sdk-lambda= { version = "1.17.0", path = "../../../sdk/lambda" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types" } aws-types= { version = "1.1.8", path = "../../../sdk/aws-types" } diff --git a/examples/examples/localstack/Cargo.toml b/examples/examples/localstack/Cargo.toml index 968b86057bbb..1512e9c24656 100644 --- a/examples/examples/localstack/Cargo.toml +++ b/examples/examples/localstack/Cargo.toml @@ -9,7 +9,7 @@ publish = false [dependencies] http = "0.2" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-sdk-sqs= { version = "1.17.0", path = "../../../sdk/sqs" } [dependencies.tokio] diff --git a/examples/examples/rds/Cargo.toml b/examples/examples/rds/Cargo.toml index b4ff83f90d47..578f1e6af036 100644 --- a/examples/examples/rds/Cargo.toml +++ b/examples/examples/rds/Cargo.toml @@ -16,7 +16,7 @@ secrecy = "0.8.0" tracing = "0.1.37" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-smithy-runtime-api= { version = "1.2.0", path = "../../../sdk/aws-smithy-runtime-api" } -aws-sdk-rds= { version = "1.23.0", path = "../../../sdk/rds" } +aws-sdk-rds= { version = "1.24.0", path = "../../../sdk/rds" } [dependencies.clap] version = "~4.4" diff --git a/examples/examples/s3/Cargo.toml b/examples/examples/s3/Cargo.toml index af04b5194194..19224371f486 100644 --- a/examples/examples/s3/Cargo.toml +++ b/examples/examples/s3/Cargo.toml @@ -31,7 +31,7 @@ tokio-stream = "0.1.8" tracing = "0.1.37" serde_json = "1" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3", features = ["rt-tokio"] } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3", features = ["rt-tokio"] } aws-smithy-runtime= { version = "1.1.8", path = "../../../sdk/aws-smithy-runtime" } aws-smithy-runtime-api= { version = "1.2.0", path = "../../../sdk/aws-smithy-runtime-api", features = ["client"] } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types", features = ["http-body-0-4-x"] } diff --git a/examples/examples/sdk-config/Cargo.toml b/examples/examples/sdk-config/Cargo.toml index 1df51864f3ac..1d637b39abd0 100644 --- a/examples/examples/sdk-config/Cargo.toml +++ b/examples/examples/sdk-config/Cargo.toml @@ -12,7 +12,7 @@ async_once = "0.2.6" tracing = "0.1.37" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-credential-types= { version = "1.1.8", path = "../../../sdk/aws-credential-types" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } [dependencies.tokio] version = "1.20.1" diff --git a/examples/examples/sending-presigned-requests/Cargo.toml b/examples/examples/sending-presigned-requests/Cargo.toml index 8efa24d8a22a..eee195108c5d 100644 --- a/examples/examples/sending-presigned-requests/Cargo.toml +++ b/examples/examples/sending-presigned-requests/Cargo.toml @@ -12,7 +12,7 @@ hyper = "0.14" reqwest = "0.11" hyper-tls = "0.5.0" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } [dependencies.clap] version = "~4.4" diff --git a/examples/examples/testing/Cargo.toml b/examples/examples/testing/Cargo.toml index ec84491aaccd..313295023b1a 100644 --- a/examples/examples/testing/Cargo.toml +++ b/examples/examples/testing/Cargo.toml @@ -17,7 +17,7 @@ mockall = "0.11.4" serde_json = "1" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-credential-types= { version = "1.1.8", path = "../../../sdk/aws-credential-types", features = ["hardcoded-credentials"] } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } aws-smithy-types= { version = "1.1.8", path = "../../../sdk/aws-smithy-types" } aws-smithy-runtime= { version = "1.1.8", path = "../../../sdk/aws-smithy-runtime", features = ["test-util"] } aws-smithy-runtime-api= { version = "1.2.0", path = "../../../sdk/aws-smithy-runtime-api", features = ["test-util"] } diff --git a/examples/examples/tls/Cargo.toml b/examples/examples/tls/Cargo.toml index f3c2c773b9b6..cc5f81ffa6e0 100644 --- a/examples/examples/tls/Cargo.toml +++ b/examples/examples/tls/Cargo.toml @@ -18,7 +18,7 @@ webpki-roots = "0.22.4" rustls = "0.20.6" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-smithy-runtime= { version = "1.1.8", path = "../../../sdk/aws-smithy-runtime" } -aws-sdk-kms= { version = "1.17.0", path = "../../../sdk/kms", default-features = false } +aws-sdk-kms= { version = "1.18.0", path = "../../../sdk/kms", default-features = false } [dependencies.tokio] version = "1.20.1" diff --git a/examples/lambda/calculator/Cargo.toml b/examples/lambda/calculator/Cargo.toml index 773fcb2ed723..1113daf114ff 100644 --- a/examples/lambda/calculator/Cargo.toml +++ b/examples/lambda/calculator/Cargo.toml @@ -16,7 +16,7 @@ serde = "1.0.164" aws-config= { version = "1.1.8", path = "../../../sdk/aws-config" } aws-sdk-ec2= { version = "1.26.0", path = "../../../sdk/ec2" } aws-sdk-lambda= { version = "1.17.0", path = "../../../sdk/lambda" } -aws-sdk-s3= { version = "1.19.1", path = "../../../sdk/s3" } +aws-sdk-s3= { version = "1.20.0", path = "../../../sdk/s3" } [dependencies.clap] version = "~4.4" diff --git a/index.md b/index.md index b6417fea3226..65b8b6d2faa0 100644 --- a/index.md +++ b/index.md @@ -88,7 +88,6 @@ The AWS SDK for Rust contains one crate for each AWS service, as well as [aws-co | AWS IoT FleetWise | [aws-sdk-iotfleetwise](https://crates.io/crates/aws-sdk-iotfleetwise) ([docs](https://docs.rs/aws-sdk-iotfleetwise)) | | AWS IoT Greengrass V2 | [aws-sdk-greengrassv2](https://crates.io/crates/aws-sdk-greengrassv2) ([docs](https://docs.rs/aws-sdk-greengrassv2)) | | AWS IoT Jobs Data Plane | [aws-sdk-iotjobsdataplane](https://crates.io/crates/aws-sdk-iotjobsdataplane) ([docs](https://docs.rs/aws-sdk-iotjobsdataplane)) | -| AWS IoT RoboRunner | [aws-sdk-iotroborunner](https://crates.io/crates/aws-sdk-iotroborunner) ([docs](https://docs.rs/aws-sdk-iotroborunner)) | | AWS IoT Secure Tunneling | [aws-sdk-iotsecuretunneling](https://crates.io/crates/aws-sdk-iotsecuretunneling) ([docs](https://docs.rs/aws-sdk-iotsecuretunneling)) | | AWS IoT SiteWise | [aws-sdk-iotsitewise](https://crates.io/crates/aws-sdk-iotsitewise) ([docs](https://docs.rs/aws-sdk-iotsitewise)) | | AWS IoT Things Graph | [aws-sdk-iotthingsgraph](https://crates.io/crates/aws-sdk-iotthingsgraph) ([docs](https://docs.rs/aws-sdk-iotthingsgraph)) | diff --git a/sdk/cloudformation/Cargo.toml b/sdk/cloudformation/Cargo.toml index 697e2ff5935c..78935b823f40 100644 --- a/sdk/cloudformation/Cargo.toml +++ b/sdk/cloudformation/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-cloudformation" -version = "1.20.0" +version = "1.21.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS CloudFormation" edition = "2021" diff --git a/sdk/cloudformation/README.md b/sdk/cloudformation/README.md index 16612b04b3ab..ea912251869c 100644 --- a/sdk/cloudformation/README.md +++ b/sdk/cloudformation/README.md @@ -20,7 +20,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-cloudformation = "1.20.0" +aws-sdk-cloudformation = "1.21.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/cloudformation/src/client.rs b/sdk/cloudformation/src/client.rs index 742ea437305c..58f751ce0d3e 100644 --- a/sdk/cloudformation/src/client.rs +++ b/sdk/cloudformation/src/client.rs @@ -275,6 +275,8 @@ mod list_stack_instances; mod list_stack_resources; +mod list_stack_set_auto_deployment_targets; + mod list_stack_set_operation_results; mod list_stack_set_operations; diff --git a/sdk/cloudformation/src/client/create_stack.rs b/sdk/cloudformation/src/client/create_stack.rs index f6b644da010c..cbcc427359ce 100644 --- a/sdk/cloudformation/src/client/create_stack.rs +++ b/sdk/cloudformation/src/client/create_stack.rs @@ -11,7 +11,7 @@ impl super::Client { /// - [`rollback_configuration(RollbackConfiguration)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::rollback_configuration) / [`set_rollback_configuration(Option)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_rollback_configuration):
required: **false**

The rollback triggers for CloudFormation to monitor during stack creation and updating operations, and for the specified monitoring period afterwards.


/// - [`timeout_in_minutes(i32)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::timeout_in_minutes) / [`set_timeout_in_minutes(Option)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_timeout_in_minutes):
required: **false**

The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false, the stack will be rolled back.


/// - [`notification_arns(impl Into)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::notification_arns) / [`set_notification_arns(Option>)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_notification_arns):
required: **false**

The Amazon Simple Notification Service (Amazon SNS) topic ARNs to publish stack related events. You can find your Amazon SNS topic ARNs using the Amazon SNS console or your Command Line Interface (CLI).


- /// - [`capabilities(Capability)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::capabilities) / [`set_capabilities(Option>)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_capabilities):
required: **false**

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to create the stack.

  • CAPABILITY_IAM and CAPABILITY_NAMED_IAM

    Some stack templates might include resources that can affect permissions in your Amazon Web Services account; for example, by creating new Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one of these capabilities.

    The following IAM resources require you to specify either the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability.

    • If you have IAM resources, you can specify either capability.

    • If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM.

    • If you don't specify either of these capabilities, CloudFormation returns an InsufficientCapabilities error.

    If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

    For more information, see Acknowledging IAM Resources in CloudFormation Templates.

  • CAPABILITY_AUTO_EXPAND

    Some template contain macros. Macros perform custom processing on templates; this can include simple actions like find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users typically create a change set from the processed template, so that they can review the changes resulting from the macros before actually creating the stack. If your stack template contains one or more macros, and you choose to create a stack directly from the processed template, without first reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.

    If you want to create a stack from a stack template that contains macros and nested stacks, you must create the stack directly from the template using this capability.

    You should only create stacks directly from a stack template that contains macros if you know what processing the macro performs.

    Each macro relies on an underlying Lambda service function for processing stack templates. Be aware that the Lambda function owner can update the function operation without CloudFormation being notified.

    For more information, see Using CloudFormation macros to perform custom processing on templates.

Only one of the Capabilities and ResourceType parameters can be specified.


+ /// - [`capabilities(Capability)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::capabilities) / [`set_capabilities(Option>)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_capabilities):
required: **false**

In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to create the stack.

  • CAPABILITY_IAM and CAPABILITY_NAMED_IAM

    Some stack templates might include resources that can affect permissions in your Amazon Web Services account; for example, by creating new Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one of these capabilities.

    The following IAM resources require you to specify either the CAPABILITY_IAM or CAPABILITY_NAMED_IAM capability.

    • If you have IAM resources, you can specify either capability.

    • If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM.

    • If you don't specify either of these capabilities, CloudFormation returns an InsufficientCapabilities error.

    If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

    For more information, see Acknowledging IAM Resources in CloudFormation Templates.

  • CAPABILITY_AUTO_EXPAND

    Some template contain macros. Macros perform custom processing on templates; this can include simple actions like find-and-replace operations, all the way to extensive transformations of entire templates. Because of this, users typically create a change set from the processed template, so that they can review the changes resulting from the macros before actually creating the stack. If your stack template contains one or more macros, and you choose to create a stack directly from the processed template, without first reviewing the resulting changes in a change set, you must acknowledge this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.

    If you want to create a stack from a stack template that contains macros and nested stacks, you must create the stack directly from the template using this capability.

    You should only create stacks directly from a stack template that contains macros if you know what processing the macro performs.

    Each macro relies on an underlying Lambda service function for processing stack templates. Be aware that the Lambda function owner can update the function operation without CloudFormation being notified.

    For more information, see Using CloudFormation macros to perform custom processing on templates.

Only one of the Capabilities and ResourceType parameters can be specified.


/// - [`resource_types(impl Into)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::resource_types) / [`set_resource_types(Option>)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_resource_types):
required: **false**

The template resource types that you have permissions to work with for this create stack action, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance. Use the following syntax to describe template resource types: AWS::* (for all Amazon Web Services resources), Custom::* (for all custom resources), Custom::logical_ID (for a specific custom resource), AWS::service_name::* (for all resources of a particular Amazon Web Services service), and AWS::service_name::resource_logical_ID (for a specific Amazon Web Services resource).

If the list of resource types doesn't include a resource that you're creating, the stack creation fails. By default, CloudFormation grants permissions to all resource types. Identity and Access Management (IAM) uses this parameter for CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with Identity and Access Management.

Only one of the Capabilities and ResourceType parameters can be specified.


/// - [`role_arn(impl Into)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::role_arn) / [`set_role_arn(Option)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_role_arn):
required: **false**

The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that CloudFormation assumes to create the stack. CloudFormation uses the role's credentials to make calls on your behalf. CloudFormation always uses this role for all future operations on the stack. Provided that users have permission to operate on the stack, CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.

If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that's generated from your user credentials.


/// - [`on_failure(OnFailure)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::on_failure) / [`set_on_failure(Option)`](crate::operation::create_stack::builders::CreateStackFluentBuilder::set_on_failure):
required: **false**

Determines what action will be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure or DisableRollback, but not both.

Default: ROLLBACK


diff --git a/sdk/cloudformation/src/client/list_stack_set_auto_deployment_targets.rs b/sdk/cloudformation/src/client/list_stack_set_auto_deployment_targets.rs new file mode 100644 index 000000000000..2710e0127623 --- /dev/null +++ b/sdk/cloudformation/src/client/list_stack_set_auto_deployment_targets.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`ListStackSetAutoDeploymentTargets`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`stack_set_name(impl Into)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::stack_set_name) / [`set_stack_set_name(Option)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::set_stack_set_name):
required: **true**

The name or unique ID of the stack set that you want to get automatic deployment targets for.


+ /// - [`next_token(impl Into)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::set_next_token):
required: **false**

A string that identifies the next page of stack set deployment targets that you want to retrieve.


+ /// - [`max_results(i32)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::set_max_results):
required: **false**

The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.


+ /// - [`call_as(CallAs)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::call_as) / [`set_call_as(Option)`](crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::set_call_as):
required: **false**

Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

  • If you are signed in to the management account, specify SELF.

  • If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.


+ /// - On success, responds with [`ListStackSetAutoDeploymentTargetsOutput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput) with field(s): + /// - [`summaries(Option>)`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput::summaries):

An array of summaries of the deployment targets for the stack set.

+ /// - [`next_token(Option)`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput::next_token):

If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackSetAutoDeploymentTargets again and use that value for the NextToken parameter. If the request returns all results, NextToken is set to an empty string.

+ /// - On failure, responds with [`SdkError`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError) + pub fn list_stack_set_auto_deployment_targets( + &self, + ) -> crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder { + crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/cloudformation/src/error_meta.rs b/sdk/cloudformation/src/error_meta.rs index 8ed9839fc062..b84dab15b7cc 100644 --- a/sdk/cloudformation/src/error_meta.rs +++ b/sdk/cloudformation/src/error_meta.rs @@ -1667,6 +1667,43 @@ impl From for Error { } } } +impl + From< + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + R, + >, + > for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from( + err: ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + R, + >, + ) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError) -> Self { + match err { + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::StackSetNotFoundException(inner) => { + Error::StackSetNotFoundException(inner) + } + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::Unhandled(inner) => { + Error::Unhandled(inner) + } + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error diff --git a/sdk/cloudformation/src/lib.rs b/sdk/cloudformation/src/lib.rs index f9a913953767..27b4eb5a4113 100644 --- a/sdk/cloudformation/src/lib.rs +++ b/sdk/cloudformation/src/lib.rs @@ -36,7 +36,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-cloudformation = "1.20.0" +//! aws-sdk-cloudformation = "1.21.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/cloudformation/src/operation.rs b/sdk/cloudformation/src/operation.rs index edf429c4d50b..36e2882ba30c 100644 --- a/sdk/cloudformation/src/operation.rs +++ b/sdk/cloudformation/src/operation.rs @@ -169,6 +169,9 @@ pub mod list_stack_instances; /// Types for the `ListStackResources` operation. pub mod list_stack_resources; +/// Types for the `ListStackSetAutoDeploymentTargets` operation. +pub mod list_stack_set_auto_deployment_targets; + /// Types for the `ListStackSetOperationResults` operation. pub mod list_stack_set_operation_results; diff --git a/sdk/cloudformation/src/operation/create_stack/_create_stack_input.rs b/sdk/cloudformation/src/operation/create_stack/_create_stack_input.rs index 859c7b95c0f5..19ba4e12ac09 100644 --- a/sdk/cloudformation/src/operation/create_stack/_create_stack_input.rs +++ b/sdk/cloudformation/src/operation/create_stack/_create_stack_input.rs @@ -42,7 +42,7 @@ pub struct CreateStackInput { ///

If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

///
    ///
  • - ///

    AWS::IAM::AccessKey AWS::IAM::AccessKey

  • + ///

    AWS::IAM::AccessKey

    ///
  • ///

    AWS::IAM::Group

  • ///
  • @@ -156,7 +156,7 @@ impl CreateStackInput { ///

    If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

    ///
      ///
    • - ///

      AWS::IAM::AccessKey AWS::IAM::AccessKey

    • + ///

      AWS::IAM::AccessKey

      ///
    • ///

      AWS::IAM::Group

    • ///
    • @@ -429,7 +429,7 @@ impl CreateStackInputBuilder { ///

      If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

      ///
        ///
      • - ///

        AWS::IAM::AccessKey AWS::IAM::AccessKey

      • + ///

        AWS::IAM::AccessKey

        ///
      • ///

        AWS::IAM::Group

      • ///
      • @@ -478,7 +478,7 @@ impl CreateStackInputBuilder { ///

        If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

        ///
          ///
        • - ///

          AWS::IAM::AccessKey AWS::IAM::AccessKey

        • + ///

          AWS::IAM::AccessKey

          ///
        • ///

          AWS::IAM::Group

        • ///
        • @@ -525,7 +525,7 @@ impl CreateStackInputBuilder { ///

          If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

          ///
            ///
          • - ///

            AWS::IAM::AccessKey AWS::IAM::AccessKey

          • + ///

            AWS::IAM::AccessKey

            ///
          • ///

            AWS::IAM::Group

          • ///
          • diff --git a/sdk/cloudformation/src/operation/create_stack/builders.rs b/sdk/cloudformation/src/operation/create_stack/builders.rs index b2a0c176aef0..ee65f3802e35 100644 --- a/sdk/cloudformation/src/operation/create_stack/builders.rs +++ b/sdk/cloudformation/src/operation/create_stack/builders.rs @@ -264,7 +264,7 @@ impl CreateStackFluentBuilder { ///

            If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

            ///
              ///
            • - ///

              AWS::IAM::AccessKey AWS::IAM::AccessKey

            • + ///

              AWS::IAM::AccessKey

              ///
            • ///

              AWS::IAM::Group

            • ///
            • @@ -311,7 +311,7 @@ impl CreateStackFluentBuilder { ///

              If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

              ///
                ///
              • - ///

                AWS::IAM::AccessKey AWS::IAM::AccessKey

              • + ///

                AWS::IAM::AccessKey

                ///
              • ///

                AWS::IAM::Group

              • ///
              • @@ -358,7 +358,7 @@ impl CreateStackFluentBuilder { ///

                If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.

                ///
                  ///
                • - ///

                  AWS::IAM::AccessKey AWS::IAM::AccessKey

                • + ///

                  AWS::IAM::AccessKey

                  ///
                • ///

                  AWS::IAM::Group

                • ///
                • diff --git a/sdk/iotroborunner/src/operation/update_site.rs b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets.rs similarity index 65% rename from sdk/iotroborunner/src/operation/update_site.rs rename to sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets.rs index 00548dc2cbbf..82e2a8559738 100644 --- a/sdk/iotroborunner/src/operation/update_site.rs +++ b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets.rs @@ -1,20 +1,20 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `UpdateSite`. +/// Orchestration and serialization glue logic for `ListStackSetAutoDeploymentTargets`. #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] -pub struct UpdateSite; -impl UpdateSite { - /// Creates a new `UpdateSite` +pub struct ListStackSetAutoDeploymentTargets; +impl ListStackSetAutoDeploymentTargets { + /// Creates a new `ListStackSetAutoDeploymentTargets` pub fn new() -> Self { Self } pub(crate) async fn orchestrate( runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_site::UpdateSiteInput, + input: crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput, ) -> ::std::result::Result< - crate::operation::update_site::UpdateSiteOutput, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_site::UpdateSiteError, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, >, > { @@ -23,7 +23,7 @@ impl UpdateSite { ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, >| { err.map_service_error(|err| { - err.downcast::() + err.downcast::() .expect("correct error type") }) }; @@ -33,14 +33,14 @@ impl UpdateSite { let output = context.finalize().map_err(map_err)?; ::std::result::Result::Ok( output - .downcast::() + .downcast::() .expect("correct output type"), ) } pub(crate) async fn orchestrate_with_stop_point( runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_site::UpdateSiteInput, + input: crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput, stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, ) -> ::std::result::Result< ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, @@ -50,7 +50,14 @@ impl UpdateSite { >, > { let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "UpdateSite", input, runtime_plugins, stop_point).await + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point( + "cloudformation", + "ListStackSetAutoDeploymentTargets", + input, + runtime_plugins, + stop_point, + ) + .await } pub(crate) fn operation_runtime_plugins( @@ -75,15 +82,15 @@ impl UpdateSite { runtime_plugins } } -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateSite { +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListStackSetAutoDeploymentTargets { fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateSite"); + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListStackSetAutoDeploymentTargets"); cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - UpdateSiteRequestSerializer, + ListStackSetAutoDeploymentTargetsRequestSerializer, )); cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - UpdateSiteResponseDeserializer, + ListStackSetAutoDeploymentTargetsResponseDeserializer, )); cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( @@ -91,8 +98,8 @@ impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateS )); cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "UpdateSite", - "iotroborunner", + "ListStackSetAutoDeploymentTargets", + "cloudformation", )); let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); signing_options.double_uri_encode = true; @@ -113,21 +120,21 @@ impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateS _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateSite") + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListStackSetAutoDeploymentTargets") .with_interceptor( ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, ), ) - .with_interceptor(UpdateSiteEndpointParamsInterceptor) + .with_interceptor(ListStackSetAutoDeploymentTargetsEndpointParamsInterceptor) .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::update_site::UpdateSiteError, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, >::new()) .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::update_site::UpdateSiteError, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, >::new()) .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::update_site::UpdateSiteError, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, >::new()); ::std::borrow::Cow::Owned(rcb) @@ -135,8 +142,8 @@ impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateS } #[derive(Debug)] -struct UpdateSiteResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateSiteResponseDeserializer { +struct ListStackSetAutoDeploymentTargetsResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListStackSetAutoDeploymentTargetsResponseDeserializer { fn deserialize_nonstreaming( &self, response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, @@ -148,39 +155,45 @@ impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateSit let mut force_error = false; ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_update_site::de_update_site_http_error(status, headers, body) + crate::protocol_serde::shape_list_stack_set_auto_deployment_targets::de_list_stack_set_auto_deployment_targets_http_error( + status, headers, body, + ) } else { - crate::protocol_serde::shape_update_site::de_update_site_http_response(status, headers, body) + crate::protocol_serde::shape_list_stack_set_auto_deployment_targets::de_list_stack_set_auto_deployment_targets_http_response( + status, headers, body, + ) }; crate::protocol_serde::type_erase_result(parse_result) } } #[derive(Debug)] -struct UpdateSiteRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateSiteRequestSerializer { +struct ListStackSetAutoDeploymentTargetsRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListStackSetAutoDeploymentTargetsRequestSerializer { #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] fn serialize_input( &self, input: ::aws_smithy_runtime_api::client::interceptors::context::Input, _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input.downcast::().expect("correct type"); + let input = input + .downcast::() + .expect("correct type"); let _header_serialization_settings = _cfg .load::() .cloned() .unwrap_or_default(); let mut request_builder = { fn uri_base( - _input: &crate::operation::update_site::UpdateSiteInput, + _input: &crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput, output: &mut ::std::string::String, ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { use ::std::fmt::Write as _; - ::std::write!(output, "/updateSite").expect("formatting should succeed"); + ::std::write!(output, "/").expect("formatting should succeed"); ::std::result::Result::Ok(()) } #[allow(clippy::unnecessary_wraps)] fn update_http_builder( - input: &crate::operation::update_site::UpdateSiteInput, + input: &crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput, builder: ::http::request::Builder, ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { let mut uri = ::std::string::String::new(); @@ -188,10 +201,14 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateSiteRe ::std::result::Result::Ok(builder.method("POST").uri(uri)) } let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded"); builder }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_site::ser_update_site_input(&input)?); + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_list_stack_set_auto_deployment_targets_input::ser_list_stack_set_auto_deployment_targets_input_input_input( + &input, + )?, + ); if let Some(content_length) = body.content_length() { let content_length = content_length.to_string(); request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); @@ -200,11 +217,11 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateSiteRe } } #[derive(Debug)] -struct UpdateSiteEndpointParamsInterceptor; +struct ListStackSetAutoDeploymentTargetsEndpointParamsInterceptor; -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateSiteEndpointParamsInterceptor { +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListStackSetAutoDeploymentTargetsEndpointParamsInterceptor { fn name(&self) -> &'static str { - "UpdateSiteEndpointParamsInterceptor" + "ListStackSetAutoDeploymentTargetsEndpointParamsInterceptor" } fn read_before_execution( @@ -219,8 +236,8 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateSiteEnd ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { let _input = context .input() - .downcast_ref::() - .ok_or("failed to downcast to UpdateSiteInput")?; + .downcast_ref::() + .ok_or("failed to downcast to ListStackSetAutoDeploymentTargetsInput")?; let params = crate::config::endpoint::Params::builder() .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) @@ -237,31 +254,23 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateSiteEnd } } -/// Error type for the `UpdateSiteError` operation. +/// Error type for the `ListStackSetAutoDeploymentTargetsError` operation. #[non_exhaustive] #[derive(::std::fmt::Debug)] -pub enum UpdateSiteError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), +pub enum ListStackSetAutoDeploymentTargetsError { + ///

                  The specified stack set doesn't exist.

                  + StackSetNotFoundException(crate::types::error::StackSetNotFoundException), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: \    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateSiteError) for what information is available for the error.")] + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListStackSetAutoDeploymentTargetsError) for what information is available for the error.")] Unhandled(crate::error::sealed_unhandled::Unhandled), } -impl UpdateSiteError { - /// Creates the `UpdateSiteError::Unhandled` variant from any error type. +impl ListStackSetAutoDeploymentTargetsError { + /// Creates the `ListStackSetAutoDeploymentTargetsError::Unhandled` variant from any error type. pub fn unhandled( err: impl ::std::convert::Into<::std::boxed::Box>, ) -> Self { @@ -271,7 +280,7 @@ impl UpdateSiteError { }) } - /// Creates the `UpdateSiteError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + /// Creates the `ListStackSetAutoDeploymentTargetsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source: err.clone().into(), @@ -284,55 +293,27 @@ impl UpdateSiteError { /// pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::StackSetNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } - /// Returns `true` if the error kind is `UpdateSiteError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `UpdateSiteError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `UpdateSiteError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `UpdateSiteError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `UpdateSiteError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) + /// Returns `true` if the error kind is `ListStackSetAutoDeploymentTargetsError::StackSetNotFoundException`. + pub fn is_stack_set_not_found_exception(&self) -> bool { + matches!(self, Self::StackSetNotFoundException(_)) } } -impl ::std::error::Error for UpdateSiteError { +impl ::std::error::Error for ListStackSetAutoDeploymentTargetsError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), + Self::StackSetNotFoundException(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } } -impl ::std::fmt::Display for UpdateSiteError { +impl ::std::fmt::Display for ListStackSetAutoDeploymentTargetsError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), + Self::StackSetNotFoundException(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -343,31 +324,23 @@ impl ::std::fmt::Display for UpdateSiteError { } } } -impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateSiteError { +impl ::aws_smithy_types::retry::ProvideErrorKind for ListStackSetAutoDeploymentTargetsError { fn code(&self) -> ::std::option::Option<&str> { ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) } fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } + ::std::option::Option::None } } -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateSiteError { +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListStackSetAutoDeploymentTargetsError { fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::StackSetNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } } -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateSiteError { +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListStackSetAutoDeploymentTargetsError { fn create_unhandled_error( source: ::std::boxed::Box, meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, @@ -378,19 +351,19 @@ impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateSi }) } } -impl ::aws_types::request_id::RequestId for crate::operation::update_site::UpdateSiteError { +impl ::aws_types::request_id::RequestId for crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError { fn request_id(&self) -> Option<&str> { self.meta().request_id() } } -pub use crate::operation::update_site::_update_site_output::UpdateSiteOutput; +pub use crate::operation::list_stack_set_auto_deployment_targets::_list_stack_set_auto_deployment_targets_output::ListStackSetAutoDeploymentTargetsOutput; -pub use crate::operation::update_site::_update_site_input::UpdateSiteInput; +pub use crate::operation::list_stack_set_auto_deployment_targets::_list_stack_set_auto_deployment_targets_input::ListStackSetAutoDeploymentTargetsInput; -mod _update_site_input; +mod _list_stack_set_auto_deployment_targets_input; -mod _update_site_output; +mod _list_stack_set_auto_deployment_targets_output; /// Builders pub mod builders; diff --git a/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_input.rs b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_input.rs new file mode 100644 index 000000000000..4cca4d5fdbcd --- /dev/null +++ b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_input.rs @@ -0,0 +1,163 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ListStackSetAutoDeploymentTargetsInput { + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub stack_set_name: ::std::option::Option<::std::string::String>, + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub next_token: ::std::option::Option<::std::string::String>, + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub max_results: ::std::option::Option, + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub call_as: ::std::option::Option, +} +impl ListStackSetAutoDeploymentTargetsInput { + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub fn stack_set_name(&self) -> ::std::option::Option<&str> { + self.stack_set_name.as_deref() + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn next_token(&self) -> ::std::option::Option<&str> { + self.next_token.as_deref() + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn max_results(&self) -> ::std::option::Option { + self.max_results + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn call_as(&self) -> ::std::option::Option<&crate::types::CallAs> { + self.call_as.as_ref() + } +} +impl ListStackSetAutoDeploymentTargetsInput { + /// Creates a new builder-style object to manufacture [`ListStackSetAutoDeploymentTargetsInput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput). + pub fn builder() -> crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsInputBuilder { + crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsInputBuilder::default() + } +} + +/// A builder for [`ListStackSetAutoDeploymentTargetsInput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ListStackSetAutoDeploymentTargetsInputBuilder { + pub(crate) stack_set_name: ::std::option::Option<::std::string::String>, + pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) max_results: ::std::option::Option, + pub(crate) call_as: ::std::option::Option, +} +impl ListStackSetAutoDeploymentTargetsInputBuilder { + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + /// This field is required. + pub fn stack_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.stack_set_name = ::std::option::Option::Some(input.into()); + self + } + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub fn set_stack_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.stack_set_name = input; + self + } + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub fn get_stack_set_name(&self) -> &::std::option::Option<::std::string::String> { + &self.stack_set_name + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.next_token = ::std::option::Option::Some(input.into()); + self + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.next_token = input; + self + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + &self.next_token + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn max_results(mut self, input: i32) -> Self { + self.max_results = ::std::option::Option::Some(input); + self + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { + self.max_results = input; + self + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn get_max_results(&self) -> &::std::option::Option { + &self.max_results + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn call_as(mut self, input: crate::types::CallAs) -> Self { + self.call_as = ::std::option::Option::Some(input); + self + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn set_call_as(mut self, input: ::std::option::Option) -> Self { + self.call_as = input; + self + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn get_call_as(&self) -> &::std::option::Option { + &self.call_as + } + /// Consumes the builder and constructs a [`ListStackSetAutoDeploymentTargetsInput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput). + pub fn build( + self, + ) -> ::std::result::Result< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput, + ::aws_smithy_types::error::operation::BuildError, + > { + ::std::result::Result::Ok( + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput { + stack_set_name: self.stack_set_name, + next_token: self.next_token, + max_results: self.max_results, + call_as: self.call_as, + }, + ) + } +} diff --git a/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_output.rs b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_output.rs new file mode 100644 index 000000000000..b13375db7e2b --- /dev/null +++ b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/_list_stack_set_auto_deployment_targets_output.rs @@ -0,0 +1,96 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ListStackSetAutoDeploymentTargetsOutput { + ///

                  An array of summaries of the deployment targets for the stack set.

                  + pub summaries: ::std::option::Option<::std::vec::Vec>, + ///

                  If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackSetAutoDeploymentTargets again and use that value for the NextToken parameter. If the request returns all results, NextToken is set to an empty string.

                  + pub next_token: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl ListStackSetAutoDeploymentTargetsOutput { + ///

                  An array of summaries of the deployment targets for the stack set.

                  + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.summaries.is_none()`. + pub fn summaries(&self) -> &[crate::types::StackSetAutoDeploymentTargetSummary] { + self.summaries.as_deref().unwrap_or_default() + } + ///

                  If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackSetAutoDeploymentTargets again and use that value for the NextToken parameter. If the request returns all results, NextToken is set to an empty string.

                  + pub fn next_token(&self) -> ::std::option::Option<&str> { + self.next_token.as_deref() + } +} +impl ::aws_types::request_id::RequestId for ListStackSetAutoDeploymentTargetsOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl ListStackSetAutoDeploymentTargetsOutput { + /// Creates a new builder-style object to manufacture [`ListStackSetAutoDeploymentTargetsOutput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput). + pub fn builder() -> crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsOutputBuilder { + crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsOutputBuilder::default() + } +} + +/// A builder for [`ListStackSetAutoDeploymentTargetsOutput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ListStackSetAutoDeploymentTargetsOutputBuilder { + pub(crate) summaries: ::std::option::Option<::std::vec::Vec>, + pub(crate) next_token: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl ListStackSetAutoDeploymentTargetsOutputBuilder { + /// Appends an item to `summaries`. + /// + /// To override the contents of this collection use [`set_summaries`](Self::set_summaries). + /// + ///

                  An array of summaries of the deployment targets for the stack set.

                  + pub fn summaries(mut self, input: crate::types::StackSetAutoDeploymentTargetSummary) -> Self { + let mut v = self.summaries.unwrap_or_default(); + v.push(input); + self.summaries = ::std::option::Option::Some(v); + self + } + ///

                  An array of summaries of the deployment targets for the stack set.

                  + pub fn set_summaries(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.summaries = input; + self + } + ///

                  An array of summaries of the deployment targets for the stack set.

                  + pub fn get_summaries(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.summaries + } + ///

                  If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackSetAutoDeploymentTargets again and use that value for the NextToken parameter. If the request returns all results, NextToken is set to an empty string.

                  + pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.next_token = ::std::option::Option::Some(input.into()); + self + } + ///

                  If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackSetAutoDeploymentTargets again and use that value for the NextToken parameter. If the request returns all results, NextToken is set to an empty string.

                  + pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.next_token = input; + self + } + ///

                  If the request doesn't return all the remaining results, NextToken is set to a token. To retrieve the next set of results, call ListStackSetAutoDeploymentTargets again and use that value for the NextToken parameter. If the request returns all results, NextToken is set to an empty string.

                  + pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + &self.next_token + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`ListStackSetAutoDeploymentTargetsOutput`](crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput). + pub fn build(self) -> crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput { + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput { + summaries: self.summaries, + next_token: self.next_token, + _request_id: self._request_id, + } + } +} diff --git a/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/builders.rs b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/builders.rs new file mode 100644 index 000000000000..b5d87f66d7fd --- /dev/null +++ b/sdk/cloudformation/src/operation/list_stack_set_auto_deployment_targets/builders.rs @@ -0,0 +1,191 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::list_stack_set_auto_deployment_targets::_list_stack_set_auto_deployment_targets_output::ListStackSetAutoDeploymentTargetsOutputBuilder; + +pub use crate::operation::list_stack_set_auto_deployment_targets::_list_stack_set_auto_deployment_targets_input::ListStackSetAutoDeploymentTargetsInputBuilder; + +impl ListStackSetAutoDeploymentTargetsInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.list_stack_set_auto_deployment_targets(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ListStackSetAutoDeploymentTargets`. +/// +///

                  Returns summary information about deployment targets for a stack set.

                  +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ListStackSetAutoDeploymentTargetsFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + > for ListStackSetAutoDeploymentTargetsFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl ListStackSetAutoDeploymentTargetsFluentBuilder { + /// Creates a new `ListStackSetAutoDeploymentTargets`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the ListStackSetAutoDeploymentTargets as a reference. + pub fn as_input(&self) -> &crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargets::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargets::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { + self.set_config_override(Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { + self.config_override = config_override; + self + } + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub fn stack_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.stack_set_name(input.into()); + self + } + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub fn set_stack_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_stack_set_name(input); + self + } + ///

                  The name or unique ID of the stack set that you want to get automatic deployment targets for.

                  + pub fn get_stack_set_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_stack_set_name() + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.next_token(input.into()); + self + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_next_token(input); + self + } + ///

                  A string that identifies the next page of stack set deployment targets that you want to retrieve.

                  + pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_next_token() + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn max_results(mut self, input: i32) -> Self { + self.inner = self.inner.max_results(input); + self + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_max_results(input); + self + } + ///

                  The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

                  + pub fn get_max_results(&self) -> &::std::option::Option { + self.inner.get_max_results() + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn call_as(mut self, input: crate::types::CallAs) -> Self { + self.inner = self.inner.call_as(input); + self + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn set_call_as(mut self, input: ::std::option::Option) -> Self { + self.inner = self.inner.set_call_as(input); + self + } + ///

                  Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.

                  + ///

                  By default, SELF is specified. Use SELF for StackSets with self-managed permissions.

                  + ///
                    + ///
                  • + ///

                    If you are signed in to the management account, specify SELF.

                  • + ///
                  • + ///

                    If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN.

                    + ///

                    Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.

                  • + ///
                  + pub fn get_call_as(&self) -> &::std::option::Option { + self.inner.get_call_as() + } +} diff --git a/sdk/cloudformation/src/protocol_serde.rs b/sdk/cloudformation/src/protocol_serde.rs index 7383299c814e..b282823227d4 100644 --- a/sdk/cloudformation/src/protocol_serde.rs +++ b/sdk/cloudformation/src/protocol_serde.rs @@ -247,6 +247,10 @@ pub(crate) mod shape_list_stack_resources; pub(crate) mod shape_list_stack_resources_input; +pub(crate) mod shape_list_stack_set_auto_deployment_targets; + +pub(crate) mod shape_list_stack_set_auto_deployment_targets_input; + pub(crate) mod shape_list_stack_set_operation_results; pub(crate) mod shape_list_stack_set_operation_results_input; @@ -495,6 +499,8 @@ pub(crate) mod shape_stack_resources; pub(crate) mod shape_stack_set; +pub(crate) mod shape_stack_set_auto_deployment_target_summaries; + pub(crate) mod shape_stack_set_operation; pub(crate) mod shape_stack_set_operation_result_summaries; @@ -581,6 +587,8 @@ pub(crate) mod shape_stack_resource_drift_information; pub(crate) mod shape_stack_resource_summary; +pub(crate) mod shape_stack_set_auto_deployment_target_summary; + pub(crate) mod shape_stack_set_drift_detection_details; pub(crate) mod shape_stack_set_operation_result_summary; diff --git a/sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets.rs b/sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets.rs new file mode 100644 index 000000000000..de975878fbd2 --- /dev/null +++ b/sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets.rs @@ -0,0 +1,128 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_list_stack_set_auto_deployment_targets_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, +> { + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "StackSetNotFoundException" => { + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::StackSetNotFoundException({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::StackSetNotFoundExceptionBuilder::default(); + output = + crate::protocol_serde::shape_stack_set_not_found_exception::de_stack_set_not_found_exception_xml_err(_response_body, output) + .map_err(crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }) + } + _ => crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_list_stack_set_auto_deployment_targets_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result< + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsOutput, + crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError, +> { + Ok({ + #[allow(unused_mut)] + let mut output = + crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsOutputBuilder::default(); + output = + crate::protocol_serde::shape_list_stack_set_auto_deployment_targets::de_list_stack_set_auto_deployment_targets(_response_body, output) + .map_err(crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +#[allow(unused_mut)] +pub fn de_list_stack_set_auto_deployment_targets( + inp: &[u8], + mut builder: crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsOutputBuilder, +) -> Result< + crate::operation::list_stack_set_auto_deployment_targets::builders::ListStackSetAutoDeploymentTargetsOutputBuilder, + ::aws_smithy_xml::decode::XmlDecodeError, +> { + let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?; + + #[allow(unused_mut)] + let mut decoder = doc.root_element()?; + #[allow(unused_variables)] + let start_el = decoder.start_el(); + if !(start_el.matches("ListStackSetAutoDeploymentTargetsResponse")) { + return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!( + "invalid root, expected ListStackSetAutoDeploymentTargetsResponse got {:?}", + start_el + ))); + } + if let Some(mut result_tag) = decoder.next_tag() { + let start_el = result_tag.start_el(); + if !(start_el.matches("ListStackSetAutoDeploymentTargetsResult")) { + return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!( + "invalid result, expected ListStackSetAutoDeploymentTargetsResult got {:?}", + start_el + ))); + } + while let Some(mut tag) = result_tag.next_tag() { + match tag.start_el() { + s if s.matches("Summaries") /* Summaries com.amazonaws.cloudformation.synthetic#ListStackSetAutoDeploymentTargetsOutput$Summaries */ => { + let var_1 = + Some( + crate::protocol_serde::shape_stack_set_auto_deployment_target_summaries::de_stack_set_auto_deployment_target_summaries(&mut tag) + ? + ) + ; + builder = builder.set_summaries(var_1); + } + , + s if s.matches("NextToken") /* NextToken com.amazonaws.cloudformation.synthetic#ListStackSetAutoDeploymentTargetsOutput$NextToken */ => { + let var_2 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_next_token(var_2); + } + , + _ => {} + } + } + } else { + return Err(::aws_smithy_xml::decode::XmlDecodeError::custom( + "expected ListStackSetAutoDeploymentTargetsResult tag", + )); + }; + Ok(builder) +} diff --git a/sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets_input.rs b/sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets_input.rs new file mode 100644 index 000000000000..665037d09df8 --- /dev/null +++ b/sdk/cloudformation/src/protocol_serde/shape_list_stack_set_auto_deployment_targets_input.rs @@ -0,0 +1,33 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_list_stack_set_auto_deployment_targets_input_input_input( + input: &crate::operation::list_stack_set_auto_deployment_targets::ListStackSetAutoDeploymentTargetsInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + #[allow(unused_mut)] + let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "ListStackSetAutoDeploymentTargets", "2010-05-15"); + #[allow(unused_mut)] + let mut scope_1 = writer.prefix("StackSetName"); + if let Some(var_2) = &input.stack_set_name { + scope_1.string(var_2); + } + #[allow(unused_mut)] + let mut scope_3 = writer.prefix("NextToken"); + if let Some(var_4) = &input.next_token { + scope_3.string(var_4); + } + #[allow(unused_mut)] + let mut scope_5 = writer.prefix("MaxResults"); + if let Some(var_6) = &input.max_results { + scope_5.number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_6).into()), + ); + } + #[allow(unused_mut)] + let mut scope_7 = writer.prefix("CallAs"); + if let Some(var_8) = &input.call_as { + scope_7.string(var_8.as_str()); + } + writer.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summaries.rs b/sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summaries.rs new file mode 100644 index 000000000000..690f3734b1a8 --- /dev/null +++ b/sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summaries.rs @@ -0,0 +1,19 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn de_stack_set_auto_deployment_target_summaries( + decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder, +) -> Result<::std::vec::Vec, ::aws_smithy_xml::decode::XmlDecodeError> { + let mut out = std::vec::Vec::new(); + while let Some(mut tag) = decoder.next_tag() { + match tag.start_el() { + s if s.matches("member") /* member com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummaries$member */ => { + out.push( + crate::protocol_serde::shape_stack_set_auto_deployment_target_summary::de_stack_set_auto_deployment_target_summary(&mut tag) + ? + ); + } + , + _ => {} + } + } + Ok(out) +} diff --git a/sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summary.rs b/sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summary.rs new file mode 100644 index 000000000000..588b78e6f493 --- /dev/null +++ b/sdk/cloudformation/src/protocol_serde/shape_stack_set_auto_deployment_target_summary.rs @@ -0,0 +1,37 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::needless_question_mark)] +pub fn de_stack_set_auto_deployment_target_summary( + decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder, +) -> Result { + #[allow(unused_mut)] + let mut builder = crate::types::StackSetAutoDeploymentTargetSummary::builder(); + while let Some(mut tag) = decoder.next_tag() { + match tag.start_el() { + s if s.matches("OrganizationalUnitId") /* OrganizationalUnitId com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummary$OrganizationalUnitId */ => { + let var_1 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_organizational_unit_id(var_1); + } + , + s if s.matches("Regions") /* Regions com.amazonaws.cloudformation#StackSetAutoDeploymentTargetSummary$Regions */ => { + let var_2 = + Some( + crate::protocol_serde::shape_region_list::de_region_list(&mut tag) + ? + ) + ; + builder = builder.set_regions(var_2); + } + , + _ => {} + } + } + Ok(builder.build()) +} diff --git a/sdk/cloudformation/src/types.rs b/sdk/cloudformation/src/types.rs index a5478b8966e2..91d427fbeeb7 100644 --- a/sdk/cloudformation/src/types.rs +++ b/sdk/cloudformation/src/types.rs @@ -93,6 +93,8 @@ pub use crate::types::_operation_result_filter::OperationResultFilter; pub use crate::types::_operation_result_filter_name::OperationResultFilterName; +pub use crate::types::_stack_set_auto_deployment_target_summary::StackSetAutoDeploymentTargetSummary; + pub use crate::types::_stack_summary::StackSummary; pub use crate::types::_stack_drift_information_summary::StackDriftInformationSummary; @@ -471,6 +473,8 @@ mod _stack_resource_summary; mod _stack_set; +mod _stack_set_auto_deployment_target_summary; + mod _stack_set_drift_detection_details; mod _stack_set_drift_detection_status; diff --git a/sdk/cloudformation/src/types/_stack_instance_comprehensive_status.rs b/sdk/cloudformation/src/types/_stack_instance_comprehensive_status.rs index 459cbecd7943..972102cdd749 100644 --- a/sdk/cloudformation/src/types/_stack_instance_comprehensive_status.rs +++ b/sdk/cloudformation/src/types/_stack_instance_comprehensive_status.rs @@ -10,6 +10,8 @@ pub struct StackInstanceComprehensiveStatus { ///
                • ///

                  FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • ///
                • + ///

                  FAILED_IMPORT: The import of the stack instance in the specified account and Region failed and left the stack in an unstable state. Once the issues causing the failure are fixed, the import operation can be retried. If enough stack set operations fail in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • + ///
                • ///

                  INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

                • ///
                • ///

                  PENDING: The operation in the specified account and Region has yet to start.

                • @@ -29,6 +31,8 @@ impl StackInstanceComprehensiveStatus { ///
                • ///

                  FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • ///
                • + ///

                  FAILED_IMPORT: The import of the stack instance in the specified account and Region failed and left the stack in an unstable state. Once the issues causing the failure are fixed, the import operation can be retried. If enough stack set operations fail in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • + ///
                • ///

                  INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

                • ///
                • ///

                  PENDING: The operation in the specified account and Region has yet to start.

                • @@ -63,6 +67,8 @@ impl StackInstanceComprehensiveStatusBuilder { ///
                • ///

                  FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • ///
                • + ///

                  FAILED_IMPORT: The import of the stack instance in the specified account and Region failed and left the stack in an unstable state. Once the issues causing the failure are fixed, the import operation can be retried. If enough stack set operations fail in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • + ///
                • ///

                  INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

                • ///
                • ///

                  PENDING: The operation in the specified account and Region has yet to start.

                • @@ -83,6 +89,8 @@ impl StackInstanceComprehensiveStatusBuilder { ///
                • ///

                  FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • ///
                • + ///

                  FAILED_IMPORT: The import of the stack instance in the specified account and Region failed and left the stack in an unstable state. Once the issues causing the failure are fixed, the import operation can be retried. If enough stack set operations fail in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • + ///
                • ///

                  INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

                • ///
                • ///

                  PENDING: The operation in the specified account and Region has yet to start.

                • @@ -103,6 +111,8 @@ impl StackInstanceComprehensiveStatusBuilder { ///
                • ///

                  FAILED: The operation in the specified account and Region failed. If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • ///
                • + ///

                  FAILED_IMPORT: The import of the stack instance in the specified account and Region failed and left the stack in an unstable state. Once the issues causing the failure are fixed, the import operation can be retried. If enough stack set operations fail in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.

                • + ///
                • ///

                  INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an unstable state. Stacks in this state are excluded from further UpdateStackSet operations. You might need to perform a DeleteStackInstances operation, with RetainStacks set to true, to delete the stack instance, and then delete the stack manually.

                • ///
                • ///

                  PENDING: The operation in the specified account and Region has yet to start.

                • diff --git a/sdk/cloudformation/src/types/_stack_set_auto_deployment_target_summary.rs b/sdk/cloudformation/src/types/_stack_set_auto_deployment_target_summary.rs new file mode 100644 index 000000000000..0429e0b7514e --- /dev/null +++ b/sdk/cloudformation/src/types/_stack_set_auto_deployment_target_summary.rs @@ -0,0 +1,80 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

                  One of the targets for the stack set. Returned by the ListStackSetAutoDeploymentTargets API operation.

                  +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct StackSetAutoDeploymentTargetSummary { + ///

                  The organization root ID or organizational unit (OU) IDs where the stack set is targeted.

                  + pub organizational_unit_id: ::std::option::Option<::std::string::String>, + ///

                  The list of Regions targeted for this organization or OU.

                  + pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl StackSetAutoDeploymentTargetSummary { + ///

                  The organization root ID or organizational unit (OU) IDs where the stack set is targeted.

                  + pub fn organizational_unit_id(&self) -> ::std::option::Option<&str> { + self.organizational_unit_id.as_deref() + } + ///

                  The list of Regions targeted for this organization or OU.

                  + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.regions.is_none()`. + pub fn regions(&self) -> &[::std::string::String] { + self.regions.as_deref().unwrap_or_default() + } +} +impl StackSetAutoDeploymentTargetSummary { + /// Creates a new builder-style object to manufacture [`StackSetAutoDeploymentTargetSummary`](crate::types::StackSetAutoDeploymentTargetSummary). + pub fn builder() -> crate::types::builders::StackSetAutoDeploymentTargetSummaryBuilder { + crate::types::builders::StackSetAutoDeploymentTargetSummaryBuilder::default() + } +} + +/// A builder for [`StackSetAutoDeploymentTargetSummary`](crate::types::StackSetAutoDeploymentTargetSummary). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct StackSetAutoDeploymentTargetSummaryBuilder { + pub(crate) organizational_unit_id: ::std::option::Option<::std::string::String>, + pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>, +} +impl StackSetAutoDeploymentTargetSummaryBuilder { + ///

                  The organization root ID or organizational unit (OU) IDs where the stack set is targeted.

                  + pub fn organizational_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.organizational_unit_id = ::std::option::Option::Some(input.into()); + self + } + ///

                  The organization root ID or organizational unit (OU) IDs where the stack set is targeted.

                  + pub fn set_organizational_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.organizational_unit_id = input; + self + } + ///

                  The organization root ID or organizational unit (OU) IDs where the stack set is targeted.

                  + pub fn get_organizational_unit_id(&self) -> &::std::option::Option<::std::string::String> { + &self.organizational_unit_id + } + /// Appends an item to `regions`. + /// + /// To override the contents of this collection use [`set_regions`](Self::set_regions). + /// + ///

                  The list of Regions targeted for this organization or OU.

                  + pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.regions.unwrap_or_default(); + v.push(input.into()); + self.regions = ::std::option::Option::Some(v); + self + } + ///

                  The list of Regions targeted for this organization or OU.

                  + pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.regions = input; + self + } + ///

                  The list of Regions targeted for this organization or OU.

                  + pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.regions + } + /// Consumes the builder and constructs a [`StackSetAutoDeploymentTargetSummary`](crate::types::StackSetAutoDeploymentTargetSummary). + pub fn build(self) -> crate::types::StackSetAutoDeploymentTargetSummary { + crate::types::StackSetAutoDeploymentTargetSummary { + organizational_unit_id: self.organizational_unit_id, + regions: self.regions, + } + } +} diff --git a/sdk/cloudformation/src/types/builders.rs b/sdk/cloudformation/src/types/builders.rs index f2a79fdb1977..9727354b557a 100644 --- a/sdk/cloudformation/src/types/builders.rs +++ b/sdk/cloudformation/src/types/builders.rs @@ -41,6 +41,8 @@ pub use crate::types::_account_gate_result::AccountGateResultBuilder; pub use crate::types::_operation_result_filter::OperationResultFilterBuilder; +pub use crate::types::_stack_set_auto_deployment_target_summary::StackSetAutoDeploymentTargetSummaryBuilder; + pub use crate::types::_stack_summary::StackSummaryBuilder; pub use crate::types::_stack_drift_information_summary::StackDriftInformationSummaryBuilder; diff --git a/sdk/iotroborunner/Cargo.toml b/sdk/iotroborunner/Cargo.toml deleted file mode 100644 index 4af9186387ac..000000000000 --- a/sdk/iotroborunner/Cargo.toml +++ /dev/null @@ -1,89 +0,0 @@ -# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -[package] -name = "aws-sdk-iotroborunner" -version = "1.17.0" -authors = ["AWS Rust SDK Team ", "Russell Cohen "] -description = "AWS SDK for AWS IoT RoboRunner" -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/awslabs/aws-sdk-rust" -readme = "README.md" -[package.metadata.smithy] -codegen-version = "b43c7ad2e7733f0e1d62b8c959ac7ff47045804d" -[package.metadata.docs.rs] -all-features = true -targets = ["x86_64-unknown-linux-gnu"] -[dependencies.aws-credential-types] -path = "../aws-credential-types" -version = "1.1.8" - -[dependencies.aws-runtime] -path = "../aws-runtime" -version = "1.1.8" - -[dependencies.aws-smithy-async] -path = "../aws-smithy-async" -version = "1.1.8" - -[dependencies.aws-smithy-http] -path = "../aws-smithy-http" -version = "0.60.7" - -[dependencies.aws-smithy-json] -path = "../aws-smithy-json" -version = "0.60.7" - -[dependencies.aws-smithy-runtime] -path = "../aws-smithy-runtime" -features = ["client"] -version = "1.1.8" - -[dependencies.aws-smithy-runtime-api] -path = "../aws-smithy-runtime-api" -features = ["client", "http-02x"] -version = "1.2.0" - -[dependencies.aws-smithy-types] -path = "../aws-smithy-types" -version = "1.1.8" - -[dependencies.aws-types] -path = "../aws-types" -version = "1.1.8" - -[dependencies.bytes] -version = "1.0.0" - -[dependencies.fastrand] -version = "2.0.0" - -[dependencies.http] -version = "0.2.9" - -[dependencies.once_cell] -version = "1.16" - -[dependencies.regex-lite] -version = "0.1.5" - -[dependencies.tracing] -version = "0.1" -[dev-dependencies.aws-config] -path = "../aws-config" -version = "1.1.8" - -[dev-dependencies.aws-credential-types] -path = "../aws-credential-types" -features = ["test-util"] -version = "1.1.8" - -[dev-dependencies.tokio] -version = "1.23.1" -features = ["macros", "test-util", "rt-multi-thread"] - -[features] -behavior-version-latest = [] -rustls = ["aws-smithy-runtime/tls-rustls"] -rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-types/rt-tokio"] -test-util = ["aws-credential-types/test-util", "aws-smithy-runtime/test-util"] -default = ["rustls", "rt-tokio"] diff --git a/sdk/iotroborunner/LICENSE b/sdk/iotroborunner/LICENSE deleted file mode 100644 index 3581ac356771..000000000000 --- a/sdk/iotroborunner/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - 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 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - 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/sdk/iotroborunner/README.md b/sdk/iotroborunner/README.md deleted file mode 100644 index 7d8000bcc47c..000000000000 --- a/sdk/iotroborunner/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# aws-sdk-iotroborunner - -An example service, deployed with the Octane Service creator, which will echo the string - -## Getting Started - -> Examples are available for many services and operations, check out the -> [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples). - -The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio) -as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-iotroborunner` to -your project, add the following to your **Cargo.toml** file: - -```toml -[dependencies] -aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-iotroborunner = "1.17.0" -tokio = { version = "1", features = ["full"] } -``` - -Then in code, a client can be created with the following: - -```rust,no_run -use aws_sdk_iotroborunner as iotroborunner; - -#[::tokio::main] -async fn main() -> Result<(), iotroborunner::Error> { - let config = aws_config::load_from_env().await; - let client = aws_sdk_iotroborunner::Client::new(&config); - - // ... make some calls with the client - - Ok(()) -} -``` - -See the [client documentation](https://docs.rs/aws-sdk-iotroborunner/latest/aws_sdk_iotroborunner/client/struct.Client.html) -for information on what calls can be made, and the inputs and outputs for each of those calls. - -## Using the SDK - -Until the SDK is released, we will be adding information about using the SDK to the -[Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest -additional sections for the guide by opening an issue and describing what you are trying to do. - -## Getting Help - -* [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions -* [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests -* [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/) -* [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples) - -## License - -This project is licensed under the Apache-2.0 License. - diff --git a/sdk/iotroborunner/src/auth_plugin.rs b/sdk/iotroborunner/src/auth_plugin.rs deleted file mode 100644 index 6367570f4123..000000000000 --- a/sdk/iotroborunner/src/auth_plugin.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use std::borrow::Cow; - -use aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolver; -use aws_smithy_runtime_api::client::auth::AuthSchemeId; -use aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder; -use aws_smithy_runtime_api::client::runtime_plugin::{Order, RuntimePlugin}; - -#[derive(Debug)] -pub(crate) struct DefaultAuthOptionsPlugin { - runtime_components: RuntimeComponentsBuilder, -} - -impl DefaultAuthOptionsPlugin { - pub(crate) fn new(auth_schemes: Vec) -> Self { - let runtime_components = RuntimeComponentsBuilder::new("default_auth_options") - .with_auth_scheme_option_resolver(Some(StaticAuthSchemeOptionResolver::new(auth_schemes))); - Self { runtime_components } - } -} - -impl RuntimePlugin for DefaultAuthOptionsPlugin { - fn order(&self) -> Order { - Order::Defaults - } - - fn runtime_components(&self, _current_components: &RuntimeComponentsBuilder) -> Cow<'_, RuntimeComponentsBuilder> { - Cow::Borrowed(&self.runtime_components) - } -} diff --git a/sdk/iotroborunner/src/client.rs b/sdk/iotroborunner/src/client.rs deleted file mode 100644 index 68234a0eb5ab..000000000000 --- a/sdk/iotroborunner/src/client.rs +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[derive(Debug)] -pub(crate) struct Handle { - pub(crate) conf: crate::Config, - #[allow(dead_code)] // unused when a service does not provide any operations - pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, -} - -/// Client for AWS IoT RoboRunner -/// -/// Client for invoking operations on AWS IoT RoboRunner. Each operation on AWS IoT RoboRunner is a method on this -/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service. -/// ## Constructing a `Client` -/// -/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`] -/// crate should be used to automatically resolve this config using -/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared -/// across multiple different AWS SDK clients. This config resolution process can be customized -/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses -/// the [builder pattern] to customize the default config. -/// -/// In the simplest case, creating a client looks as follows: -/// ```rust,no_run -/// # async fn wrapper() { -/// let config = aws_config::load_from_env().await; -/// let client = aws_sdk_iotroborunner::Client::new(&config); -/// # } -/// ``` -/// -/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that -/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired. -/// The [`Config`] struct implements `From<&SdkConfig>`, so setting these specific settings can be -/// done as follows: -/// -/// ```rust,no_run -/// # async fn wrapper() { -/// let sdk_config = ::aws_config::load_from_env().await; -/// let config = aws_sdk_iotroborunner::config::Builder::from(&sdk_config) -/// # /* -/// .some_service_specific_setting("value") -/// # */ -/// .build(); -/// # } -/// ``` -/// -/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration. -/// -/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should -/// be done once at application start-up. -/// -/// [`Config`]: crate::Config -/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html -/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html -/// [`aws-config` docs]: https://docs.rs/aws-config/* -/// [`aws-config`]: https://crates.io/crates/aws-config -/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html -/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html -/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder -/// # Using the `Client` -/// -/// A client has a function for every operation that can be performed by the service. -/// For example, the [`CreateWorker`](crate::operation::create_worker) operation has -/// a [`Client::create_worker`], function which returns a builder for that operation. -/// The fluent builder ultimately has a `send()` function that returns an async future that -/// returns a result, as illustrated below: -/// -/// ```rust,ignore -/// let result = client.create_worker() -/// .client_token("example") -/// .send() -/// .await; -/// ``` -/// -/// The underlying HTTP requests that get made by this can be modified with the `customize_operation` -/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more -/// information. -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct Client { - handle: ::std::sync::Arc, -} - -impl Client { - /// Creates a new client from the service [`Config`](crate::Config). - /// - /// # Panics - /// - /// This method will panic in the following cases: - /// - /// - Retries or timeouts are enabled without a `sleep_impl` configured. - /// - Identity caching is enabled without a `sleep_impl` and `time_source` configured. - /// - No `behavior_version` is provided. - /// - /// The panic message for each of these will have instructions on how to resolve them. - #[track_caller] - pub fn from_conf(conf: crate::Config) -> Self { - let handle = Handle { - conf: conf.clone(), - runtime_plugins: crate::config::base_client_runtime_plugins(conf), - }; - if let Err(err) = Self::validate_config(&handle) { - panic!("Invalid client configuration: {err}"); - } - Self { - handle: ::std::sync::Arc::new(handle), - } - } - - /// Returns the client's configuration. - pub fn config(&self) -> &crate::Config { - &self.handle.conf - } - - fn validate_config(handle: &Handle) -> Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base(); - handle - .runtime_plugins - .apply_client_configuration(&mut cfg)? - .validate_base_client_config(&cfg)?; - Ok(()) - } -} - -impl Client { - /// Creates a new client from an [SDK Config](::aws_types::sdk_config::SdkConfig). - /// - /// # Panics - /// - /// - This method will panic if the `sdk_config` is missing an async sleep implementation. If you experience this panic, set - /// the `sleep_impl` on the Config passed into this function to fix it. - /// - This method will panic if the `sdk_config` is missing an HTTP connector. If you experience this panic, set the - /// `http_connector` on the Config passed into this function to fix it. - /// - This method will panic if no `BehaviorVersion` is provided. If you experience this panic, set `behavior_version` on the Config or enable the `behavior-version-latest` Cargo feature. - #[track_caller] - pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self { - Self::from_conf(sdk_config.into()) - } -} - -mod create_destination; - -mod create_site; - -mod create_worker; - -mod create_worker_fleet; - -/// Operation customization and supporting types. -/// -/// The underlying HTTP requests made during an operation can be customized -/// by calling the `customize()` method on the builder returned from a client -/// operation call. For example, this can be used to add an additional HTTP header: -/// -/// ```ignore -/// # async fn wrapper() -> ::std::result::Result<(), aws_sdk_iotroborunner::Error> { -/// # let client: aws_sdk_iotroborunner::Client = unimplemented!(); -/// use ::http::header::{HeaderName, HeaderValue}; -/// -/// let result = client.create_worker() -/// .customize() -/// .mutate_request(|req| { -/// // Add `x-example-header` with value -/// req.headers_mut() -/// .insert( -/// HeaderName::from_static("x-example-header"), -/// HeaderValue::from_static("1"), -/// ); -/// }) -/// .send() -/// .await; -/// # } -/// ``` -pub mod customize; - -mod delete_destination; - -mod delete_site; - -mod delete_worker; - -mod delete_worker_fleet; - -mod get_destination; - -mod get_site; - -mod get_worker; - -mod get_worker_fleet; - -mod list_destinations; - -mod list_sites; - -mod list_worker_fleets; - -mod list_workers; - -mod update_destination; - -mod update_site; - -mod update_worker; - -mod update_worker_fleet; diff --git a/sdk/iotroborunner/src/client/create_destination.rs b/sdk/iotroborunner/src/client/create_destination.rs deleted file mode 100644 index ce83de778c4c..000000000000 --- a/sdk/iotroborunner/src/client/create_destination.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`CreateDestination`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`client_token(impl Into)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::client_token) / [`set_client_token(Option)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::set_client_token):
                  required: **false**
                  Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
                  - /// - [`name(impl Into)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::name) / [`set_name(Option)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::set_name):
                  required: **true**
                  Human friendly name of the resource.
                  - /// - [`site(impl Into)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::site) / [`set_site(Option)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::set_site):
                  required: **true**
                  Site ARN.
                  - /// - [`state(DestinationState)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::state) / [`set_state(Option)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::set_state):
                  required: **false**
                  The state of the destination. Default used if not specified.
                  - /// - [`additional_fixed_properties(impl Into)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::additional_fixed_properties) / [`set_additional_fixed_properties(Option)`](crate::operation::create_destination::builders::CreateDestinationFluentBuilder::set_additional_fixed_properties):
                  required: **false**
                  JSON document containing additional fixed properties regarding the destination
                  - /// - On success, responds with [`CreateDestinationOutput`](crate::operation::create_destination::CreateDestinationOutput) with field(s): - /// - [`arn(String)`](crate::operation::create_destination::CreateDestinationOutput::arn): Destination ARN. - /// - [`id(String)`](crate::operation::create_destination::CreateDestinationOutput::id): Filters access by the destination's identifier - /// - [`created_at(DateTime)`](crate::operation::create_destination::CreateDestinationOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::create_destination::CreateDestinationOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`state(DestinationState)`](crate::operation::create_destination::CreateDestinationOutput::state): State of the destination. - /// - On failure, responds with [`SdkError`](crate::operation::create_destination::CreateDestinationError) - pub fn create_destination(&self) -> crate::operation::create_destination::builders::CreateDestinationFluentBuilder { - crate::operation::create_destination::builders::CreateDestinationFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/create_site.rs b/sdk/iotroborunner/src/client/create_site.rs deleted file mode 100644 index 3543290015a2..000000000000 --- a/sdk/iotroborunner/src/client/create_site.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`CreateSite`](crate::operation::create_site::builders::CreateSiteFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`client_token(impl Into)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::client_token) / [`set_client_token(Option)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::set_client_token):
                  required: **false**
                  Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
                  - /// - [`name(impl Into)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::name) / [`set_name(Option)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::set_name):
                  required: **true**
                  Human friendly name of the resource.
                  - /// - [`country_code(impl Into)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::country_code) / [`set_country_code(Option)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::set_country_code):
                  required: **true**
                  A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US.
                  - /// - [`description(impl Into)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::description) / [`set_description(Option)`](crate::operation::create_site::builders::CreateSiteFluentBuilder::set_description):
                  required: **false**
                  A high-level description of the site.
                  - /// - On success, responds with [`CreateSiteOutput`](crate::operation::create_site::CreateSiteOutput) with field(s): - /// - [`arn(String)`](crate::operation::create_site::CreateSiteOutput::arn): Site ARN. - /// - [`id(String)`](crate::operation::create_site::CreateSiteOutput::id): Filters access by the site's identifier - /// - [`created_at(DateTime)`](crate::operation::create_site::CreateSiteOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::create_site::CreateSiteOutput::updated_at): Timestamp at which the resource was last updated. - /// - On failure, responds with [`SdkError`](crate::operation::create_site::CreateSiteError) - pub fn create_site(&self) -> crate::operation::create_site::builders::CreateSiteFluentBuilder { - crate::operation::create_site::builders::CreateSiteFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/create_worker.rs b/sdk/iotroborunner/src/client/create_worker.rs deleted file mode 100644 index b0d64b60a3ee..000000000000 --- a/sdk/iotroborunner/src/client/create_worker.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`CreateWorker`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`client_token(impl Into)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::client_token) / [`set_client_token(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_client_token):
                  required: **false**
                  Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
                  - /// - [`name(impl Into)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::name) / [`set_name(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_name):
                  required: **true**
                  Human friendly name of the resource.
                  - /// - [`fleet(impl Into)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::fleet) / [`set_fleet(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_fleet):
                  required: **true**
                  Full ARN of the worker fleet.
                  - /// - [`additional_transient_properties(impl Into)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::additional_transient_properties) / [`set_additional_transient_properties(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_additional_transient_properties):
                  required: **false**
                  JSON blob containing unstructured worker properties that are transient and may change during regular operation.
                  - /// - [`additional_fixed_properties(impl Into)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::additional_fixed_properties) / [`set_additional_fixed_properties(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_additional_fixed_properties):
                  required: **false**
                  JSON blob containing unstructured worker properties that are fixed and won't change during regular operation.
                  - /// - [`vendor_properties(VendorProperties)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::vendor_properties) / [`set_vendor_properties(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_vendor_properties):
                  required: **false**
                  Properties of the worker that are provided by the vendor FMS.
                  - /// - [`position(PositionCoordinates)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::position) / [`set_position(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_position):
                  required: **false**
                  Supported coordinates for worker position.
                  - /// - [`orientation(Orientation)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::orientation) / [`set_orientation(Option)`](crate::operation::create_worker::builders::CreateWorkerFluentBuilder::set_orientation):
                  required: **false**
                  Worker orientation measured in units clockwise from north.
                  - /// - On success, responds with [`CreateWorkerOutput`](crate::operation::create_worker::CreateWorkerOutput) with field(s): - /// - [`arn(String)`](crate::operation::create_worker::CreateWorkerOutput::arn): Full ARN of the worker. - /// - [`id(String)`](crate::operation::create_worker::CreateWorkerOutput::id): Filters access by the workers identifier - /// - [`created_at(DateTime)`](crate::operation::create_worker::CreateWorkerOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::create_worker::CreateWorkerOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`site(String)`](crate::operation::create_worker::CreateWorkerOutput::site): Site ARN. - /// - On failure, responds with [`SdkError`](crate::operation::create_worker::CreateWorkerError) - pub fn create_worker(&self) -> crate::operation::create_worker::builders::CreateWorkerFluentBuilder { - crate::operation::create_worker::builders::CreateWorkerFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/create_worker_fleet.rs b/sdk/iotroborunner/src/client/create_worker_fleet.rs deleted file mode 100644 index 4177c7420725..000000000000 --- a/sdk/iotroborunner/src/client/create_worker_fleet.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`CreateWorkerFleet`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`client_token(impl Into)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::client_token) / [`set_client_token(Option)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::set_client_token):
                  required: **false**
                  Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
                  - /// - [`name(impl Into)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::name) / [`set_name(Option)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::set_name):
                  required: **true**
                  Human friendly name of the resource.
                  - /// - [`site(impl Into)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::site) / [`set_site(Option)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::set_site):
                  required: **true**
                  Site ARN.
                  - /// - [`additional_fixed_properties(impl Into)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::additional_fixed_properties) / [`set_additional_fixed_properties(Option)`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::set_additional_fixed_properties):
                  required: **false**
                  JSON blob containing additional fixed properties regarding the worker fleet
                  - /// - On success, responds with [`CreateWorkerFleetOutput`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput) with field(s): - /// - [`arn(String)`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput::arn): Full ARN of the worker fleet. - /// - [`id(String)`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput::id): Filters access by the worker fleet's identifier - /// - [`created_at(DateTime)`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput::updated_at): Timestamp at which the resource was last updated. - /// - On failure, responds with [`SdkError`](crate::operation::create_worker_fleet::CreateWorkerFleetError) - pub fn create_worker_fleet(&self) -> crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder { - crate::operation::create_worker_fleet::builders::CreateWorkerFleetFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/customize.rs b/sdk/iotroborunner/src/client/customize.rs deleted file mode 100644 index 1a70244060cc..000000000000 --- a/sdk/iotroborunner/src/client/customize.rs +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// `CustomizableOperation` allows for configuring a single operation invocation before it is sent. -pub struct CustomizableOperation { - customizable_send: B, - config_override: ::std::option::Option, - interceptors: Vec<::aws_smithy_runtime_api::client::interceptors::SharedInterceptor>, - runtime_plugins: Vec<::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin>, - _output: ::std::marker::PhantomData, - _error: ::std::marker::PhantomData, -} - -impl CustomizableOperation { - /// Creates a new `CustomizableOperation` from `customizable_send`. - #[allow(dead_code)] // unused when a service does not provide any operations - pub(crate) fn new(customizable_send: B) -> Self { - Self { - customizable_send, - config_override: ::std::option::Option::None, - interceptors: vec![], - runtime_plugins: vec![], - _output: ::std::marker::PhantomData, - _error: ::std::marker::PhantomData, - } - } - - pub(crate) fn execute(self, f: impl ::std::ops::FnOnce(B, crate::config::Builder) -> U) -> U { - let mut config_override = self.config_override.unwrap_or_default(); - self.interceptors.into_iter().for_each(|interceptor| { - config_override.push_interceptor(interceptor); - }); - self.runtime_plugins.into_iter().for_each(|plugin| { - config_override.push_runtime_plugin(plugin); - }); - f(self.customizable_send, config_override) - } - - /// Adds an [interceptor](::aws_smithy_runtime_api::client::interceptors::Intercept) that runs at specific stages of the request execution pipeline. - /// - /// Note that interceptors can also be added to `CustomizableOperation` by `config_override`, - /// `map_request`, and `mutate_request` (the last two are implemented via interceptors under the hood). - /// The order in which those user-specified operation interceptors are invoked should not be relied upon - /// as it is an implementation detail. - pub fn interceptor(mut self, interceptor: impl ::aws_smithy_runtime_api::client::interceptors::Intercept + 'static) -> Self { - self.interceptors - .push(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::new(interceptor)); - self - } - - /// Adds a runtime plugin. - #[allow(unused)] - pub(crate) fn runtime_plugin(mut self, runtime_plugin: impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin + 'static) -> Self { - self.runtime_plugins - .push(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(runtime_plugin)); - self - } - - /// Allows for customizing the operation's request. - pub fn map_request(mut self, f: F) -> Self - where - F: ::std::ops::Fn( - ::aws_smithy_runtime_api::client::orchestrator::HttpRequest, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, MapE> - + ::std::marker::Send - + ::std::marker::Sync - + 'static, - MapE: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static, - { - self.interceptors - .push(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::new( - ::aws_smithy_runtime::client::interceptors::MapRequestInterceptor::new(f), - )); - self - } - - /// Convenience for `map_request` where infallible direct mutation of request is acceptable. - pub fn mutate_request(mut self, f: F) -> Self - where - F: ::std::ops::Fn(&mut ::aws_smithy_runtime_api::client::orchestrator::HttpRequest) + ::std::marker::Send + ::std::marker::Sync + 'static, - { - self.interceptors - .push(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::new( - ::aws_smithy_runtime::client::interceptors::MutateRequestInterceptor::new(f), - )); - self - } - - /// Overrides config for a single operation invocation. - /// - /// `config_override` is applied to the operation configuration level. - /// The fields in the builder that are `Some` override those applied to the service - /// configuration level. For instance, - /// - /// | Config A | overridden by Config B | = Config C | - /// |--------------------|------------------------|--------------------| - /// | field_1: None, | field_1: Some(v2), | field_1: Some(v2), | - /// | field_2: Some(v1), | field_2: Some(v2), | field_2: Some(v2), | - /// | field_3: Some(v1), | field_3: None, | field_3: Some(v1), | - pub fn config_override(mut self, config_override: impl ::std::convert::Into) -> Self { - self.config_override = Some(config_override.into()); - self - } - - /// Sends the request and returns the response. - pub async fn send(self) -> crate::client::customize::internal::SendResult - where - E: std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static, - B: crate::client::customize::internal::CustomizableSend, - { - self.execute(|sender, config| sender.send(config)).await - } -} - -pub(crate) mod internal; diff --git a/sdk/iotroborunner/src/client/customize/internal.rs b/sdk/iotroborunner/src/client/customize/internal.rs deleted file mode 100644 index a4492e4c3942..000000000000 --- a/sdk/iotroborunner/src/client/customize/internal.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub type BoxFuture = ::std::pin::Pin<::std::boxed::Box + ::std::marker::Send>>; - -pub type SendResult = - ::std::result::Result>; - -pub trait CustomizableSend: ::std::marker::Send + ::std::marker::Sync { - // Takes an owned `self` as the implementation will internally call methods that take `self`. - // If it took `&self`, that would make this trait object safe, but some implementing types do not - // derive `Clone`, unable to yield `self` from `&self`. - fn send(self, config_override: crate::config::Builder) -> BoxFuture>; -} diff --git a/sdk/iotroborunner/src/client/delete_destination.rs b/sdk/iotroborunner/src/client/delete_destination.rs deleted file mode 100644 index f76cff224158..000000000000 --- a/sdk/iotroborunner/src/client/delete_destination.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`DeleteDestination`](crate::operation::delete_destination::builders::DeleteDestinationFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::delete_destination::builders::DeleteDestinationFluentBuilder::id) / [`set_id(Option)`](crate::operation::delete_destination::builders::DeleteDestinationFluentBuilder::set_id):
                  required: **true**
                  Destination ARN.
                  - /// - On success, responds with [`DeleteDestinationOutput`](crate::operation::delete_destination::DeleteDestinationOutput) - /// - On failure, responds with [`SdkError`](crate::operation::delete_destination::DeleteDestinationError) - pub fn delete_destination(&self) -> crate::operation::delete_destination::builders::DeleteDestinationFluentBuilder { - crate::operation::delete_destination::builders::DeleteDestinationFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/delete_site.rs b/sdk/iotroborunner/src/client/delete_site.rs deleted file mode 100644 index 60f62197d523..000000000000 --- a/sdk/iotroborunner/src/client/delete_site.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`DeleteSite`](crate::operation::delete_site::builders::DeleteSiteFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::delete_site::builders::DeleteSiteFluentBuilder::id) / [`set_id(Option)`](crate::operation::delete_site::builders::DeleteSiteFluentBuilder::set_id):
                  required: **true**
                  Site ARN.
                  - /// - On success, responds with [`DeleteSiteOutput`](crate::operation::delete_site::DeleteSiteOutput) - /// - On failure, responds with [`SdkError`](crate::operation::delete_site::DeleteSiteError) - pub fn delete_site(&self) -> crate::operation::delete_site::builders::DeleteSiteFluentBuilder { - crate::operation::delete_site::builders::DeleteSiteFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/delete_worker.rs b/sdk/iotroborunner/src/client/delete_worker.rs deleted file mode 100644 index bd6368775f5e..000000000000 --- a/sdk/iotroborunner/src/client/delete_worker.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`DeleteWorker`](crate::operation::delete_worker::builders::DeleteWorkerFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::delete_worker::builders::DeleteWorkerFluentBuilder::id) / [`set_id(Option)`](crate::operation::delete_worker::builders::DeleteWorkerFluentBuilder::set_id):
                  required: **true**
                  Full ARN of the worker.
                  - /// - On success, responds with [`DeleteWorkerOutput`](crate::operation::delete_worker::DeleteWorkerOutput) - /// - On failure, responds with [`SdkError`](crate::operation::delete_worker::DeleteWorkerError) - pub fn delete_worker(&self) -> crate::operation::delete_worker::builders::DeleteWorkerFluentBuilder { - crate::operation::delete_worker::builders::DeleteWorkerFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/delete_worker_fleet.rs b/sdk/iotroborunner/src/client/delete_worker_fleet.rs deleted file mode 100644 index 815c11b37df6..000000000000 --- a/sdk/iotroborunner/src/client/delete_worker_fleet.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`DeleteWorkerFleet`](crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetFluentBuilder::id) / [`set_id(Option)`](crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetFluentBuilder::set_id):
                  required: **true**
                  Full ARN of the worker fleet.
                  - /// - On success, responds with [`DeleteWorkerFleetOutput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput) - /// - On failure, responds with [`SdkError`](crate::operation::delete_worker_fleet::DeleteWorkerFleetError) - pub fn delete_worker_fleet(&self) -> crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetFluentBuilder { - crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/get_destination.rs b/sdk/iotroborunner/src/client/get_destination.rs deleted file mode 100644 index 70fa69b3deeb..000000000000 --- a/sdk/iotroborunner/src/client/get_destination.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`GetDestination`](crate::operation::get_destination::builders::GetDestinationFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::get_destination::builders::GetDestinationFluentBuilder::id) / [`set_id(Option)`](crate::operation::get_destination::builders::GetDestinationFluentBuilder::set_id):
                  required: **true**
                  Destination ARN.
                  - /// - On success, responds with [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput) with field(s): - /// - [`arn(String)`](crate::operation::get_destination::GetDestinationOutput::arn): Destination ARN. - /// - [`id(String)`](crate::operation::get_destination::GetDestinationOutput::id): Filters access by the destination's identifier - /// - [`name(String)`](crate::operation::get_destination::GetDestinationOutput::name): Human friendly name of the resource. - /// - [`site(String)`](crate::operation::get_destination::GetDestinationOutput::site): Site ARN. - /// - [`created_at(DateTime)`](crate::operation::get_destination::GetDestinationOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::get_destination::GetDestinationOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`state(DestinationState)`](crate::operation::get_destination::GetDestinationOutput::state): State of the destination. - /// - [`additional_fixed_properties(Option)`](crate::operation::get_destination::GetDestinationOutput::additional_fixed_properties): JSON document containing additional fixed properties regarding the destination - /// - On failure, responds with [`SdkError`](crate::operation::get_destination::GetDestinationError) - pub fn get_destination(&self) -> crate::operation::get_destination::builders::GetDestinationFluentBuilder { - crate::operation::get_destination::builders::GetDestinationFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/get_site.rs b/sdk/iotroborunner/src/client/get_site.rs deleted file mode 100644 index 1ff56c61395b..000000000000 --- a/sdk/iotroborunner/src/client/get_site.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`GetSite`](crate::operation::get_site::builders::GetSiteFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::get_site::builders::GetSiteFluentBuilder::id) / [`set_id(Option)`](crate::operation::get_site::builders::GetSiteFluentBuilder::set_id):
                  required: **true**
                  Site ARN.
                  - /// - On success, responds with [`GetSiteOutput`](crate::operation::get_site::GetSiteOutput) with field(s): - /// - [`arn(String)`](crate::operation::get_site::GetSiteOutput::arn): Site ARN. - /// - [`id(String)`](crate::operation::get_site::GetSiteOutput::id): Filters access by the site's identifier - /// - [`name(String)`](crate::operation::get_site::GetSiteOutput::name): Human friendly name of the resource. - /// - [`country_code(String)`](crate::operation::get_site::GetSiteOutput::country_code): A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - /// - [`description(Option)`](crate::operation::get_site::GetSiteOutput::description): A high-level description of the site. - /// - [`created_at(DateTime)`](crate::operation::get_site::GetSiteOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::get_site::GetSiteOutput::updated_at): Timestamp at which the resource was last updated. - /// - On failure, responds with [`SdkError`](crate::operation::get_site::GetSiteError) - pub fn get_site(&self) -> crate::operation::get_site::builders::GetSiteFluentBuilder { - crate::operation::get_site::builders::GetSiteFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/get_worker.rs b/sdk/iotroborunner/src/client/get_worker.rs deleted file mode 100644 index 54f343849f80..000000000000 --- a/sdk/iotroborunner/src/client/get_worker.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`GetWorker`](crate::operation::get_worker::builders::GetWorkerFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::get_worker::builders::GetWorkerFluentBuilder::id) / [`set_id(Option)`](crate::operation::get_worker::builders::GetWorkerFluentBuilder::set_id):
                  required: **true**
                  Full ARN of the worker.
                  - /// - On success, responds with [`GetWorkerOutput`](crate::operation::get_worker::GetWorkerOutput) with field(s): - /// - [`arn(String)`](crate::operation::get_worker::GetWorkerOutput::arn): Full ARN of the worker. - /// - [`id(String)`](crate::operation::get_worker::GetWorkerOutput::id): Filters access by the workers identifier - /// - [`fleet(String)`](crate::operation::get_worker::GetWorkerOutput::fleet): Full ARN of the worker fleet. - /// - [`site(String)`](crate::operation::get_worker::GetWorkerOutput::site): Site ARN. - /// - [`created_at(DateTime)`](crate::operation::get_worker::GetWorkerOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::get_worker::GetWorkerOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`name(String)`](crate::operation::get_worker::GetWorkerOutput::name): Human friendly name of the resource. - /// - [`additional_transient_properties(Option)`](crate::operation::get_worker::GetWorkerOutput::additional_transient_properties): JSON blob containing unstructured worker properties that are transient and may change during regular operation. - /// - [`additional_fixed_properties(Option)`](crate::operation::get_worker::GetWorkerOutput::additional_fixed_properties): JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - /// - [`vendor_properties(Option)`](crate::operation::get_worker::GetWorkerOutput::vendor_properties): Properties of the worker that are provided by the vendor FMS. - /// - [`position(Option)`](crate::operation::get_worker::GetWorkerOutput::position): Supported coordinates for worker position. - /// - [`orientation(Option)`](crate::operation::get_worker::GetWorkerOutput::orientation): Worker orientation measured in units clockwise from north. - /// - On failure, responds with [`SdkError`](crate::operation::get_worker::GetWorkerError) - pub fn get_worker(&self) -> crate::operation::get_worker::builders::GetWorkerFluentBuilder { - crate::operation::get_worker::builders::GetWorkerFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/get_worker_fleet.rs b/sdk/iotroborunner/src/client/get_worker_fleet.rs deleted file mode 100644 index 1de3adf63056..000000000000 --- a/sdk/iotroborunner/src/client/get_worker_fleet.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`GetWorkerFleet`](crate::operation::get_worker_fleet::builders::GetWorkerFleetFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::get_worker_fleet::builders::GetWorkerFleetFluentBuilder::id) / [`set_id(Option)`](crate::operation::get_worker_fleet::builders::GetWorkerFleetFluentBuilder::set_id):
                  required: **true**
                  Full ARN of the worker fleet.
                  - /// - On success, responds with [`GetWorkerFleetOutput`](crate::operation::get_worker_fleet::GetWorkerFleetOutput) with field(s): - /// - [`id(String)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::id): Filters access by the worker fleet's identifier - /// - [`arn(String)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::arn): Full ARN of the worker fleet. - /// - [`name(String)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::name): Human friendly name of the resource. - /// - [`site(String)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::site): Site ARN. - /// - [`created_at(DateTime)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::created_at): Timestamp at which the resource was created. - /// - [`updated_at(DateTime)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`additional_fixed_properties(Option)`](crate::operation::get_worker_fleet::GetWorkerFleetOutput::additional_fixed_properties): JSON blob containing additional fixed properties regarding the worker fleet - /// - On failure, responds with [`SdkError`](crate::operation::get_worker_fleet::GetWorkerFleetError) - pub fn get_worker_fleet(&self) -> crate::operation::get_worker_fleet::builders::GetWorkerFleetFluentBuilder { - crate::operation::get_worker_fleet::builders::GetWorkerFleetFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/list_destinations.rs b/sdk/iotroborunner/src/client/list_destinations.rs deleted file mode 100644 index 722ecc3a7528..000000000000 --- a/sdk/iotroborunner/src/client/list_destinations.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`ListDestinations`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder) operation. - /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::into_paginator). - /// - /// - The fluent builder is configurable: - /// - [`site(impl Into)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::site) / [`set_site(Option)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::set_site):
                  required: **true**
                  Site ARN.
                  - /// - [`max_results(i32)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::set_max_results):
                  required: **false**
                  Maximum number of results to retrieve in a single call.
                  - /// - [`next_token(impl Into)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::set_next_token):
                  required: **false**
                  Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page.
                  - /// - [`state(DestinationState)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::state) / [`set_state(Option)`](crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::set_state):
                  required: **false**
                  State of the destination.
                  - /// - On success, responds with [`ListDestinationsOutput`](crate::operation::list_destinations::ListDestinationsOutput) with field(s): - /// - [`next_token(Option)`](crate::operation::list_destinations::ListDestinationsOutput::next_token): Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - /// - [`destinations(Option>)`](crate::operation::list_destinations::ListDestinationsOutput::destinations): List of destinations. - /// - On failure, responds with [`SdkError`](crate::operation::list_destinations::ListDestinationsError) - pub fn list_destinations(&self) -> crate::operation::list_destinations::builders::ListDestinationsFluentBuilder { - crate::operation::list_destinations::builders::ListDestinationsFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/list_sites.rs b/sdk/iotroborunner/src/client/list_sites.rs deleted file mode 100644 index 245a8868f7bd..000000000000 --- a/sdk/iotroborunner/src/client/list_sites.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`ListSites`](crate::operation::list_sites::builders::ListSitesFluentBuilder) operation. - /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_sites::builders::ListSitesFluentBuilder::into_paginator). - /// - /// - The fluent builder is configurable: - /// - [`max_results(i32)`](crate::operation::list_sites::builders::ListSitesFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_sites::builders::ListSitesFluentBuilder::set_max_results):
                  required: **false**
                  Maximum number of results to retrieve in a single ListSites call.
                  - /// - [`next_token(impl Into)`](crate::operation::list_sites::builders::ListSitesFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_sites::builders::ListSitesFluentBuilder::set_next_token):
                  required: **false**
                  Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page.
                  - /// - On success, responds with [`ListSitesOutput`](crate::operation::list_sites::ListSitesOutput) with field(s): - /// - [`next_token(Option)`](crate::operation::list_sites::ListSitesOutput::next_token): Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - /// - [`sites(Option>)`](crate::operation::list_sites::ListSitesOutput::sites): List of facilities. - /// - On failure, responds with [`SdkError`](crate::operation::list_sites::ListSitesError) - pub fn list_sites(&self) -> crate::operation::list_sites::builders::ListSitesFluentBuilder { - crate::operation::list_sites::builders::ListSitesFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/list_worker_fleets.rs b/sdk/iotroborunner/src/client/list_worker_fleets.rs deleted file mode 100644 index 9ec9f64ded26..000000000000 --- a/sdk/iotroborunner/src/client/list_worker_fleets.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`ListWorkerFleets`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder) operation. - /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::into_paginator). - /// - /// - The fluent builder is configurable: - /// - [`site(impl Into)`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::site) / [`set_site(Option)`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::set_site):
                  required: **true**
                  Site ARN.
                  - /// - [`max_results(i32)`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::set_max_results):
                  required: **false**
                  Maximum number of results to retrieve in a single ListWorkerFleets call.
                  - /// - [`next_token(impl Into)`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::set_next_token):
                  required: **false**
                  Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page.
                  - /// - On success, responds with [`ListWorkerFleetsOutput`](crate::operation::list_worker_fleets::ListWorkerFleetsOutput) with field(s): - /// - [`next_token(Option)`](crate::operation::list_worker_fleets::ListWorkerFleetsOutput::next_token): Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - /// - [`worker_fleets(Option>)`](crate::operation::list_worker_fleets::ListWorkerFleetsOutput::worker_fleets): List of worker fleets. - /// - On failure, responds with [`SdkError`](crate::operation::list_worker_fleets::ListWorkerFleetsError) - pub fn list_worker_fleets(&self) -> crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder { - crate::operation::list_worker_fleets::builders::ListWorkerFleetsFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/list_workers.rs b/sdk/iotroborunner/src/client/list_workers.rs deleted file mode 100644 index e92364e2aa0d..000000000000 --- a/sdk/iotroborunner/src/client/list_workers.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`ListWorkers`](crate::operation::list_workers::builders::ListWorkersFluentBuilder) operation. - /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::into_paginator). - /// - /// - The fluent builder is configurable: - /// - [`site(impl Into)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::site) / [`set_site(Option)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::set_site):
                  required: **true**
                  Site ARN.
                  - /// - [`max_results(i32)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::set_max_results):
                  required: **false**
                  Maximum number of results to retrieve in a single ListWorkers call.
                  - /// - [`next_token(impl Into)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::set_next_token):
                  required: **false**
                  Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page.
                  - /// - [`fleet(impl Into)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::fleet) / [`set_fleet(Option)`](crate::operation::list_workers::builders::ListWorkersFluentBuilder::set_fleet):
                  required: **false**
                  Full ARN of the worker fleet.
                  - /// - On success, responds with [`ListWorkersOutput`](crate::operation::list_workers::ListWorkersOutput) with field(s): - /// - [`next_token(Option)`](crate::operation::list_workers::ListWorkersOutput::next_token): Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - /// - [`workers(Option>)`](crate::operation::list_workers::ListWorkersOutput::workers): List of workers. - /// - On failure, responds with [`SdkError`](crate::operation::list_workers::ListWorkersError) - pub fn list_workers(&self) -> crate::operation::list_workers::builders::ListWorkersFluentBuilder { - crate::operation::list_workers::builders::ListWorkersFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/update_destination.rs b/sdk/iotroborunner/src/client/update_destination.rs deleted file mode 100644 index 0b2ac75b87b0..000000000000 --- a/sdk/iotroborunner/src/client/update_destination.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`UpdateDestination`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::id) / [`set_id(Option)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::set_id):
                  required: **true**
                  Destination ARN.
                  - /// - [`name(impl Into)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::name) / [`set_name(Option)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::set_name):
                  required: **false**
                  Human friendly name of the resource.
                  - /// - [`state(DestinationState)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::state) / [`set_state(Option)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::set_state):
                  required: **false**
                  State of the destination.
                  - /// - [`additional_fixed_properties(impl Into)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::additional_fixed_properties) / [`set_additional_fixed_properties(Option)`](crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::set_additional_fixed_properties):
                  required: **false**
                  JSON document containing additional fixed properties regarding the destination
                  - /// - On success, responds with [`UpdateDestinationOutput`](crate::operation::update_destination::UpdateDestinationOutput) with field(s): - /// - [`arn(String)`](crate::operation::update_destination::UpdateDestinationOutput::arn): Destination ARN. - /// - [`id(String)`](crate::operation::update_destination::UpdateDestinationOutput::id): Filters access by the destination's identifier - /// - [`name(String)`](crate::operation::update_destination::UpdateDestinationOutput::name): Human friendly name of the resource. - /// - [`updated_at(DateTime)`](crate::operation::update_destination::UpdateDestinationOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`state(DestinationState)`](crate::operation::update_destination::UpdateDestinationOutput::state): State of the destination. - /// - [`additional_fixed_properties(Option)`](crate::operation::update_destination::UpdateDestinationOutput::additional_fixed_properties): JSON document containing additional fixed properties regarding the destination - /// - On failure, responds with [`SdkError`](crate::operation::update_destination::UpdateDestinationError) - pub fn update_destination(&self) -> crate::operation::update_destination::builders::UpdateDestinationFluentBuilder { - crate::operation::update_destination::builders::UpdateDestinationFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/update_site.rs b/sdk/iotroborunner/src/client/update_site.rs deleted file mode 100644 index a462c3f41ad6..000000000000 --- a/sdk/iotroborunner/src/client/update_site.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`UpdateSite`](crate::operation::update_site::builders::UpdateSiteFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::id) / [`set_id(Option)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::set_id):
                  required: **true**
                  Site ARN.
                  - /// - [`name(impl Into)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::name) / [`set_name(Option)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::set_name):
                  required: **false**
                  Human friendly name of the resource.
                  - /// - [`country_code(impl Into)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::country_code) / [`set_country_code(Option)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::set_country_code):
                  required: **false**
                  A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US.
                  - /// - [`description(impl Into)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::description) / [`set_description(Option)`](crate::operation::update_site::builders::UpdateSiteFluentBuilder::set_description):
                  required: **false**
                  A high-level description of the site.
                  - /// - On success, responds with [`UpdateSiteOutput`](crate::operation::update_site::UpdateSiteOutput) with field(s): - /// - [`arn(String)`](crate::operation::update_site::UpdateSiteOutput::arn): Site ARN. - /// - [`id(String)`](crate::operation::update_site::UpdateSiteOutput::id): Filters access by the site's identifier - /// - [`name(String)`](crate::operation::update_site::UpdateSiteOutput::name): Human friendly name of the resource. - /// - [`country_code(Option)`](crate::operation::update_site::UpdateSiteOutput::country_code): A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - /// - [`description(Option)`](crate::operation::update_site::UpdateSiteOutput::description): A high-level description of the site. - /// - [`updated_at(DateTime)`](crate::operation::update_site::UpdateSiteOutput::updated_at): Timestamp at which the resource was last updated. - /// - On failure, responds with [`SdkError`](crate::operation::update_site::UpdateSiteError) - pub fn update_site(&self) -> crate::operation::update_site::builders::UpdateSiteFluentBuilder { - crate::operation::update_site::builders::UpdateSiteFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/update_worker.rs b/sdk/iotroborunner/src/client/update_worker.rs deleted file mode 100644 index d5eef6305473..000000000000 --- a/sdk/iotroborunner/src/client/update_worker.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`UpdateWorker`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::id) / [`set_id(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_id):
                  required: **true**
                  Full ARN of the worker.
                  - /// - [`name(impl Into)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::name) / [`set_name(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_name):
                  required: **false**
                  Human friendly name of the resource.
                  - /// - [`additional_transient_properties(impl Into)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::additional_transient_properties) / [`set_additional_transient_properties(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_additional_transient_properties):
                  required: **false**
                  JSON blob containing unstructured worker properties that are transient and may change during regular operation.
                  - /// - [`additional_fixed_properties(impl Into)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::additional_fixed_properties) / [`set_additional_fixed_properties(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_additional_fixed_properties):
                  required: **false**
                  JSON blob containing unstructured worker properties that are fixed and won't change during regular operation.
                  - /// - [`vendor_properties(VendorProperties)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::vendor_properties) / [`set_vendor_properties(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_vendor_properties):
                  required: **false**
                  Properties of the worker that are provided by the vendor FMS.
                  - /// - [`position(PositionCoordinates)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::position) / [`set_position(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_position):
                  required: **false**
                  Supported coordinates for worker position.
                  - /// - [`orientation(Orientation)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::orientation) / [`set_orientation(Option)`](crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::set_orientation):
                  required: **false**
                  Worker orientation measured in units clockwise from north.
                  - /// - On success, responds with [`UpdateWorkerOutput`](crate::operation::update_worker::UpdateWorkerOutput) with field(s): - /// - [`arn(String)`](crate::operation::update_worker::UpdateWorkerOutput::arn): Full ARN of the worker. - /// - [`id(String)`](crate::operation::update_worker::UpdateWorkerOutput::id): Filters access by the workers identifier - /// - [`fleet(String)`](crate::operation::update_worker::UpdateWorkerOutput::fleet): Full ARN of the worker fleet. - /// - [`updated_at(DateTime)`](crate::operation::update_worker::UpdateWorkerOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`name(String)`](crate::operation::update_worker::UpdateWorkerOutput::name): Human friendly name of the resource. - /// - [`additional_transient_properties(Option)`](crate::operation::update_worker::UpdateWorkerOutput::additional_transient_properties): JSON blob containing unstructured worker properties that are transient and may change during regular operation. - /// - [`additional_fixed_properties(Option)`](crate::operation::update_worker::UpdateWorkerOutput::additional_fixed_properties): JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - /// - [`orientation(Option)`](crate::operation::update_worker::UpdateWorkerOutput::orientation): Worker orientation measured in units clockwise from north. - /// - [`vendor_properties(Option)`](crate::operation::update_worker::UpdateWorkerOutput::vendor_properties): Properties of the worker that are provided by the vendor FMS. - /// - [`position(Option)`](crate::operation::update_worker::UpdateWorkerOutput::position): Supported coordinates for worker position. - /// - On failure, responds with [`SdkError`](crate::operation::update_worker::UpdateWorkerError) - pub fn update_worker(&self) -> crate::operation::update_worker::builders::UpdateWorkerFluentBuilder { - crate::operation::update_worker::builders::UpdateWorkerFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client/update_worker_fleet.rs b/sdk/iotroborunner/src/client/update_worker_fleet.rs deleted file mode 100644 index 41b8a5a675f3..000000000000 --- a/sdk/iotroborunner/src/client/update_worker_fleet.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -impl super::Client { - /// Constructs a fluent builder for the [`UpdateWorkerFleet`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder) operation. - /// - /// - The fluent builder is configurable: - /// - [`id(impl Into)`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::id) / [`set_id(Option)`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::set_id):
                  required: **true**
                  Full ARN of the worker fleet.
                  - /// - [`name(impl Into)`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::name) / [`set_name(Option)`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::set_name):
                  required: **false**
                  Human friendly name of the resource.
                  - /// - [`additional_fixed_properties(impl Into)`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::additional_fixed_properties) / [`set_additional_fixed_properties(Option)`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::set_additional_fixed_properties):
                  required: **false**
                  JSON blob containing additional fixed properties regarding the worker fleet
                  - /// - On success, responds with [`UpdateWorkerFleetOutput`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput) with field(s): - /// - [`arn(String)`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput::arn): Full ARN of the worker fleet. - /// - [`id(String)`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput::id): Filters access by the worker fleet's identifier - /// - [`name(String)`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput::name): Human friendly name of the resource. - /// - [`updated_at(DateTime)`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput::updated_at): Timestamp at which the resource was last updated. - /// - [`additional_fixed_properties(Option)`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput::additional_fixed_properties): JSON blob containing additional fixed properties regarding the worker fleet - /// - On failure, responds with [`SdkError`](crate::operation::update_worker_fleet::UpdateWorkerFleetError) - pub fn update_worker_fleet(&self) -> crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder { - crate::operation::update_worker_fleet::builders::UpdateWorkerFleetFluentBuilder::new(self.handle.clone()) - } -} diff --git a/sdk/iotroborunner/src/client_idempotency_token.rs b/sdk/iotroborunner/src/client_idempotency_token.rs deleted file mode 100644 index e6cbb8442e82..000000000000 --- a/sdk/iotroborunner/src/client_idempotency_token.rs +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use std::borrow::Cow; -use std::fmt; - -use aws_smithy_runtime_api::box_error::BoxError; -use aws_smithy_runtime_api::client::interceptors::context::{BeforeSerializationInterceptorContextMut, Input}; -use aws_smithy_runtime_api::client::interceptors::{Intercept, SharedInterceptor}; -use aws_smithy_runtime_api::client::runtime_components::{RuntimeComponents, RuntimeComponentsBuilder}; -use aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin; -use aws_smithy_types::config_bag::ConfigBag; - -use crate::idempotency_token::IdempotencyTokenProvider; - -#[derive(Debug)] -pub(crate) struct IdempotencyTokenRuntimePlugin { - runtime_components: RuntimeComponentsBuilder, -} - -impl IdempotencyTokenRuntimePlugin { - pub(crate) fn new(set_token: S) -> Self - where - S: Fn(IdempotencyTokenProvider, &mut Input) + Send + Sync + 'static, - { - Self { - runtime_components: RuntimeComponentsBuilder::new("IdempotencyTokenRuntimePlugin") - .with_interceptor(SharedInterceptor::new(IdempotencyTokenInterceptor { set_token })), - } - } -} - -impl RuntimePlugin for IdempotencyTokenRuntimePlugin { - fn runtime_components(&self, _: &RuntimeComponentsBuilder) -> Cow<'_, RuntimeComponentsBuilder> { - Cow::Borrowed(&self.runtime_components) - } -} - -struct IdempotencyTokenInterceptor { - set_token: S, -} - -impl fmt::Debug for IdempotencyTokenInterceptor { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("IdempotencyTokenInterceptor").finish() - } -} - -impl Intercept for IdempotencyTokenInterceptor -where - S: Fn(IdempotencyTokenProvider, &mut Input) + Send + Sync, -{ - fn name(&self) -> &'static str { - "IdempotencyTokenInterceptor" - } - - fn modify_before_serialization( - &self, - context: &mut BeforeSerializationInterceptorContextMut<'_>, - _runtime_components: &RuntimeComponents, - cfg: &mut ConfigBag, - ) -> Result<(), BoxError> { - let token_provider = cfg - .load::() - .expect("the idempotency provider must be set") - .clone(); - (self.set_token)(token_provider, context.input_mut()); - Ok(()) - } -} diff --git a/sdk/iotroborunner/src/config.rs b/sdk/iotroborunner/src/config.rs deleted file mode 100644 index 968ce890f418..000000000000 --- a/sdk/iotroborunner/src/config.rs +++ /dev/null @@ -1,1348 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Configuration for a aws_sdk_iotroborunner service client. -/// -/// -/// Service configuration allows for customization of endpoints, region, credentials providers, -/// and retry configuration. Generally, it is constructed automatically for you from a shared -/// configuration loaded by the `aws-config` crate. For example: -/// -/// ```ignore -/// // Load a shared config from the environment -/// let shared_config = aws_config::from_env().load().await; -/// // The client constructor automatically converts the shared config into the service config -/// let client = Client::new(&shared_config); -/// ``` -/// -/// The service config can also be constructed manually using its builder. -/// -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct Config { - // Both `config` and `cloneable` are the same config, but the cloneable one - // is kept around so that it is possible to convert back into a builder. This can be - // optimized in the future. - pub(crate) config: crate::config::FrozenLayer, - cloneable: ::aws_smithy_types::config_bag::CloneableLayer, - pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder, - pub(crate) runtime_plugins: ::std::vec::Vec, - behavior_version: ::std::option::Option, -} -impl Config { - /// Constructs a config builder. - pub fn builder() -> Builder { - Builder::default() - } - /// Converts this config back into a builder so that it can be tweaked. - pub fn to_builder(&self) -> Builder { - Builder { - config: self.cloneable.clone(), - runtime_components: self.runtime_components.clone(), - runtime_plugins: self.runtime_plugins.clone(), - behavior_version: self.behavior_version.clone(), - } - } - /// Return a reference to the stalled stream protection configuration contained in this config, if any. - pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> { - self.config.load::() - } - /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any. - pub fn http_client(&self) -> Option { - self.runtime_components.http_client() - } - /// Returns the endpoint resolver. - pub fn endpoint_resolver(&self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver { - self.runtime_components.endpoint_resolver().expect("resolver defaulted if not set") - } - /// Return a reference to the retry configuration contained in this config, if any. - pub fn retry_config(&self) -> ::std::option::Option<&::aws_smithy_types::retry::RetryConfig> { - self.config.load::<::aws_smithy_types::retry::RetryConfig>() - } - - /// Return a cloned shared async sleep implementation from this config, if any. - pub fn sleep_impl(&self) -> ::std::option::Option { - self.runtime_components.sleep_impl() - } - - /// Return a reference to the timeout configuration contained in this config, if any. - pub fn timeout_config(&self) -> ::std::option::Option<&::aws_smithy_types::timeout::TimeoutConfig> { - self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>() - } - - /// Returns a reference to the retry partition contained in this config, if any. - /// - /// WARNING: This method is unstable and may be removed at any time. Do not rely on this - /// method for anything! - pub fn retry_partition(&self) -> ::std::option::Option<&::aws_smithy_runtime::client::retries::RetryPartition> { - self.config.load::<::aws_smithy_runtime::client::retries::RetryPartition>() - } - /// Returns the configured identity cache for auth. - pub fn identity_cache(&self) -> ::std::option::Option { - self.runtime_components.identity_cache() - } - /// Returns interceptors currently registered by the user. - pub fn interceptors(&self) -> impl Iterator + '_ { - self.runtime_components.interceptors() - } - /// Return time source used for this service. - pub fn time_source(&self) -> ::std::option::Option<::aws_smithy_async::time::SharedTimeSource> { - self.runtime_components.time_source() - } - /// Returns retry classifiers currently registered by the user. - pub fn retry_classifiers(&self) -> impl Iterator + '_ { - self.runtime_components.retry_classifiers() - } - /// Returns the name of the app that is using the client, if it was provided. - /// - /// This _optional_ name is used to identify the application in the user agent that - /// gets sent along with requests. - pub fn app_name(&self) -> ::std::option::Option<&::aws_types::app_name::AppName> { - self.config.load::<::aws_types::app_name::AppName>() - } - /// Returns the invocation ID generator if one was given in config. - /// - /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic. - pub fn invocation_id_generator(&self) -> ::std::option::Option<::aws_runtime::invocation_id::SharedInvocationIdGenerator> { - self.config.load::<::aws_runtime::invocation_id::SharedInvocationIdGenerator>().cloned() - } - /// Creates a new [service config](crate::Config) from a [shared `config`](::aws_types::sdk_config::SdkConfig). - pub fn new(config: &::aws_types::sdk_config::SdkConfig) -> Self { - Builder::from(config).build() - } - /// The signature version 4 service signing name to use in the credential scope when signing requests. - /// - /// The signing service may be overridden by the `Endpoint`, or by specifying a custom - /// [`SigningName`](aws_types::SigningName) during operation construction - pub fn signing_name(&self) -> &'static str { - "iotroborunner" - } - /// Returns the AWS region, if it was provided. - pub fn region(&self) -> ::std::option::Option<&crate::config::Region> { - self.config.load::() - } - /// This function was intended to be removed, and has been broken since release-2023-11-15 as it always returns a `None`. Do not use. - #[deprecated( - note = "This function was intended to be removed, and has been broken since release-2023-11-15 as it always returns a `None`. Do not use." - )] - pub fn credentials_provider(&self) -> Option { - ::std::option::Option::None - } -} -/// Builder for creating a `Config`. -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct Builder { - pub(crate) config: ::aws_smithy_types::config_bag::CloneableLayer, - pub(crate) runtime_components: crate::config::RuntimeComponentsBuilder, - pub(crate) runtime_plugins: ::std::vec::Vec, - pub(crate) behavior_version: ::std::option::Option, -} -impl ::std::default::Default for Builder { - fn default() -> Self { - Self { - config: ::std::default::Default::default(), - runtime_components: crate::config::RuntimeComponentsBuilder::new("service config"), - runtime_plugins: ::std::default::Default::default(), - behavior_version: ::std::default::Default::default(), - } - } -} -impl Builder { - /// Constructs a config builder. - pub fn new() -> Self { - Self::default() - } - /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag, - /// but not those in runtime components. - #[allow(unused)] - pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self { - let mut builder = Self::new(); - builder.set_stalled_stream_protection(config_bag.load::().cloned()); - builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned()); - builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned()); - builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned()); - builder.set_app_name(config_bag.load::<::aws_types::app_name::AppName>().cloned()); - builder.set_endpoint_url(config_bag.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())); - builder.set_use_dual_stack(config_bag.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)); - builder.set_use_fips(config_bag.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)); - builder.set_region(config_bag.load::().cloned()); - builder - } - /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig) - /// to configure protection for stalled streams. - pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self { - self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config)); - self - } - /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig) - /// to configure protection for stalled streams. - pub fn set_stalled_stream_protection( - &mut self, - stalled_stream_protection_config: ::std::option::Option, - ) -> &mut Self { - self.config.store_or_unset(stalled_stream_protection_config); - self - } - /// Sets the idempotency token provider to use for service calls that require tokens. - pub fn idempotency_token_provider( - mut self, - idempotency_token_provider: impl ::std::convert::Into, - ) -> Self { - self.set_idempotency_token_provider(::std::option::Option::Some(idempotency_token_provider.into())); - self - } - /// Sets the idempotency token provider to use for service calls that require tokens. - pub fn set_idempotency_token_provider( - &mut self, - idempotency_token_provider: ::std::option::Option, - ) -> &mut Self { - self.config.store_or_unset(idempotency_token_provider); - self - } - /// Sets the HTTP client to use when making requests. - /// - /// # Examples - /// ```no_run - /// # #[cfg(test)] - /// # mod tests { - /// # #[test] - /// # fn example() { - /// use std::time::Duration; - /// use aws_sdk_iotroborunner::config::Config; - /// use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder; - /// - /// let https_connector = hyper_rustls::HttpsConnectorBuilder::new() - /// .with_webpki_roots() - /// .https_only() - /// .enable_http1() - /// .enable_http2() - /// .build(); - /// let hyper_client = HyperClientBuilder::new().build(https_connector); - /// - /// // This connector can then be given to a generated service Config - /// let config = my_service_client::Config::builder() - /// .endpoint_url("https://example.com") - /// .http_client(hyper_client) - /// .build(); - /// let client = my_service_client::Client::from_conf(config); - /// # } - /// # } - /// ``` - pub fn http_client(mut self, http_client: impl crate::config::HttpClient + 'static) -> Self { - self.set_http_client(::std::option::Option::Some(crate::config::IntoShared::into_shared(http_client))); - self - } - - /// Sets the HTTP client to use when making requests. - /// - /// # Examples - /// ```no_run - /// # #[cfg(test)] - /// # mod tests { - /// # #[test] - /// # fn example() { - /// use std::time::Duration; - /// use aws_sdk_iotroborunner::config::{Builder, Config}; - /// use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder; - /// - /// fn override_http_client(builder: &mut Builder) { - /// let https_connector = hyper_rustls::HttpsConnectorBuilder::new() - /// .with_webpki_roots() - /// .https_only() - /// .enable_http1() - /// .enable_http2() - /// .build(); - /// let hyper_client = HyperClientBuilder::new().build(https_connector); - /// builder.set_http_client(Some(hyper_client)); - /// } - /// - /// let mut builder = aws_sdk_iotroborunner::Config::builder(); - /// override_http_client(&mut builder); - /// let config = builder.build(); - /// # } - /// # } - /// ``` - pub fn set_http_client(&mut self, http_client: Option) -> &mut Self { - self.runtime_components.set_http_client(http_client); - self - } - /// Sets the endpoint resolver to use when making requests. - /// - - /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution - /// rules for `aws_sdk_iotroborunner`. - - /// - /// Note: setting an endpoint resolver will replace any endpoint URL that has been set. - /// This method accepts an endpoint resolver [specific to this service](crate::config::endpoint::ResolveEndpoint). If you want to - /// provide a shared endpoint resolver, use [`Self::set_endpoint_resolver`]. - /// - /// # Examples - /// Create a custom endpoint resolver that resolves a different endpoing per-stage, e.g. staging vs. production. - /// ```no_run - /// use aws_sdk_iotroborunner::config::endpoint::{ResolveEndpoint, EndpointFuture, Params, Endpoint}; - /// #[derive(Debug)] - /// struct StageResolver { stage: String } - /// impl ResolveEndpoint for StageResolver { - /// fn resolve_endpoint(&self, params: &Params) -> EndpointFuture<'_> { - /// let stage = &self.stage; - /// EndpointFuture::ready(Ok(Endpoint::builder().url(format!("{stage}.myservice.com")).build())) - /// } - /// } - /// let resolver = StageResolver { stage: std::env::var("STAGE").unwrap() }; - /// let config = aws_sdk_iotroborunner::Config::builder().endpoint_resolver(resolver).build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - pub fn endpoint_resolver(mut self, endpoint_resolver: impl crate::config::endpoint::ResolveEndpoint + 'static) -> Self { - self.set_endpoint_resolver(::std::option::Option::Some(endpoint_resolver.into_shared_resolver())); - self - } - - /// Sets the endpoint resolver to use when making requests. - /// - - /// When unset, the client will used a generated endpoint resolver based on the endpoint resolution - /// rules for `aws_sdk_iotroborunner`. - pub fn set_endpoint_resolver( - &mut self, - endpoint_resolver: ::std::option::Option<::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver>, - ) -> &mut Self { - self.runtime_components.set_endpoint_resolver(endpoint_resolver); - self - } - /// Set the retry_config for the builder - /// - /// # Examples - /// ```no_run - /// use aws_sdk_iotroborunner::config::Config; - /// use aws_sdk_iotroborunner::config::retry::RetryConfig; - /// - /// let retry_config = RetryConfig::standard().with_max_attempts(5); - /// let config = Config::builder().retry_config(retry_config).build(); - /// ``` - pub fn retry_config(mut self, retry_config: ::aws_smithy_types::retry::RetryConfig) -> Self { - self.set_retry_config(Some(retry_config)); - self - } - - /// Set the retry_config for the builder - /// - /// # Examples - /// ```no_run - /// use aws_sdk_iotroborunner::config::{Builder, Config}; - /// use aws_sdk_iotroborunner::config::retry::RetryConfig; - /// - /// fn disable_retries(builder: &mut Builder) { - /// let retry_config = RetryConfig::standard().with_max_attempts(1); - /// builder.set_retry_config(Some(retry_config)); - /// } - /// - /// let mut builder = Config::builder(); - /// disable_retries(&mut builder); - /// let config = builder.build(); - /// ``` - pub fn set_retry_config(&mut self, retry_config: ::std::option::Option<::aws_smithy_types::retry::RetryConfig>) -> &mut Self { - retry_config.map(|r| self.config.store_put(r)); - self - } - /// Set the sleep_impl for the builder - /// - /// # Examples - /// - /// ```no_run - /// use aws_sdk_iotroborunner::config::{AsyncSleep, Config, SharedAsyncSleep, Sleep}; - /// - /// #[derive(Debug)] - /// pub struct ForeverSleep; - /// - /// impl AsyncSleep for ForeverSleep { - /// fn sleep(&self, duration: std::time::Duration) -> Sleep { - /// Sleep::new(std::future::pending()) - /// } - /// } - /// - /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep); - /// let config = Config::builder().sleep_impl(sleep_impl).build(); - /// ``` - pub fn sleep_impl(mut self, sleep_impl: impl crate::config::AsyncSleep + 'static) -> Self { - self.set_sleep_impl(Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared(sleep_impl))); - self - } - - /// Set the sleep_impl for the builder - /// - /// # Examples - /// - /// ```no_run - /// use aws_sdk_iotroborunner::config::{AsyncSleep, Builder, Config, SharedAsyncSleep, Sleep}; - /// - /// #[derive(Debug)] - /// pub struct ForeverSleep; - /// - /// impl AsyncSleep for ForeverSleep { - /// fn sleep(&self, duration: std::time::Duration) -> Sleep { - /// Sleep::new(std::future::pending()) - /// } - /// } - /// - /// fn set_never_ending_sleep_impl(builder: &mut Builder) { - /// let sleep_impl = SharedAsyncSleep::new(ForeverSleep); - /// builder.set_sleep_impl(Some(sleep_impl)); - /// } - /// - /// let mut builder = Config::builder(); - /// set_never_ending_sleep_impl(&mut builder); - /// let config = builder.build(); - /// ``` - pub fn set_sleep_impl(&mut self, sleep_impl: ::std::option::Option) -> &mut Self { - self.runtime_components.set_sleep_impl(sleep_impl); - self - } - /// Set the timeout_config for the builder - /// - /// # Examples - /// - /// ```no_run - /// # use std::time::Duration; - /// use aws_sdk_iotroborunner::config::Config; - /// use aws_sdk_iotroborunner::config::timeout::TimeoutConfig; - /// - /// let timeout_config = TimeoutConfig::builder() - /// .operation_attempt_timeout(Duration::from_secs(1)) - /// .build(); - /// let config = Config::builder().timeout_config(timeout_config).build(); - /// ``` - pub fn timeout_config(mut self, timeout_config: ::aws_smithy_types::timeout::TimeoutConfig) -> Self { - self.set_timeout_config(Some(timeout_config)); - self - } - - /// Set the timeout_config for the builder. - /// - /// Setting this to `None` has no effect if another source of configuration has set timeouts. If you - /// are attempting to disable timeouts, use [`TimeoutConfig::disabled`](::aws_smithy_types::timeout::TimeoutConfig::disabled) - /// - /// - /// # Examples - /// - /// ```no_run - /// # use std::time::Duration; - /// use aws_sdk_iotroborunner::config::{Builder, Config}; - /// use aws_sdk_iotroborunner::config::timeout::TimeoutConfig; - /// - /// fn set_request_timeout(builder: &mut Builder) { - /// let timeout_config = TimeoutConfig::builder() - /// .operation_attempt_timeout(Duration::from_secs(1)) - /// .build(); - /// builder.set_timeout_config(Some(timeout_config)); - /// } - /// - /// let mut builder = Config::builder(); - /// set_request_timeout(&mut builder); - /// let config = builder.build(); - /// ``` - pub fn set_timeout_config(&mut self, timeout_config: ::std::option::Option<::aws_smithy_types::timeout::TimeoutConfig>) -> &mut Self { - // passing None has no impact. - let Some(mut timeout_config) = timeout_config else { return self }; - - if let Some(base) = self.config.load::<::aws_smithy_types::timeout::TimeoutConfig>() { - timeout_config.take_defaults_from(base); - } - self.config.store_put(timeout_config); - self - } - /// Set the partition for retry-related state. When clients share a retry partition, they will - /// also share things like token buckets and client rate limiters. By default, all clients - /// for the same service will share a partition. - pub fn retry_partition(mut self, retry_partition: ::aws_smithy_runtime::client::retries::RetryPartition) -> Self { - self.set_retry_partition(Some(retry_partition)); - self - } - /// Set the partition for retry-related state. When clients share a retry partition, they will - /// also share things like token buckets and client rate limiters. By default, all clients - /// for the same service will share a partition. - pub fn set_retry_partition( - &mut self, - retry_partition: ::std::option::Option<::aws_smithy_runtime::client::retries::RetryPartition>, - ) -> &mut Self { - retry_partition.map(|r| self.config.store_put(r)); - self - } - /// Set the identity cache for auth. - /// - /// The identity cache defaults to a lazy caching implementation that will resolve - /// an identity when it is requested, and place it in the cache thereafter. Subsequent - /// requests will take the value from the cache while it is still valid. Once it expires, - /// the next request will result in refreshing the identity. - /// - /// This configuration allows you to disable or change the default caching mechanism. - /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity) - /// trait and pass that implementation into this function. - /// - /// # Examples - /// - /// Disabling identity caching: - /// ```no_run - /// use aws_sdk_iotroborunner::config::IdentityCache; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .identity_cache(IdentityCache::no_cache()) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - /// - /// Customizing lazy caching: - /// ```no_run - /// use aws_sdk_iotroborunner::config::IdentityCache; - /// use std::time::Duration; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .identity_cache( - /// IdentityCache::lazy() - /// // change the load timeout to 10 seconds - /// .load_timeout(Duration::from_secs(10)) - /// .build() - /// ) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - - pub fn identity_cache(mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> Self { - self.set_identity_cache(identity_cache); - self - } - - /// Set the identity cache for auth. - /// - /// The identity cache defaults to a lazy caching implementation that will resolve - /// an identity when it is requested, and place it in the cache thereafter. Subsequent - /// requests will take the value from the cache while it is still valid. Once it expires, - /// the next request will result in refreshing the identity. - /// - /// This configuration allows you to disable or change the default caching mechanism. - /// To use a custom caching mechanism, implement the [`ResolveCachedIdentity`](crate::config::ResolveCachedIdentity) - /// trait and pass that implementation into this function. - /// - /// # Examples - /// - /// Disabling identity caching: - /// ```no_run - /// use aws_sdk_iotroborunner::config::IdentityCache; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .identity_cache(IdentityCache::no_cache()) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - /// - /// Customizing lazy caching: - /// ```no_run - /// use aws_sdk_iotroborunner::config::IdentityCache; - /// use std::time::Duration; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .identity_cache( - /// IdentityCache::lazy() - /// // change the load timeout to 10 seconds - /// .load_timeout(Duration::from_secs(10)) - /// .build() - /// ) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - - pub fn set_identity_cache(&mut self, identity_cache: impl crate::config::ResolveCachedIdentity + 'static) -> &mut Self { - self.runtime_components.set_identity_cache(::std::option::Option::Some(identity_cache)); - self - } - /// Add an [interceptor](crate::config::Intercept) that runs at specific stages of the request execution pipeline. - /// - /// Interceptors targeted at a certain stage are executed according to the pre-defined priority. - /// The SDK provides a default set of interceptors. An interceptor configured by this method - /// will run after those default interceptors. - /// - /// # Examples - /// ```no_run - /// # #[cfg(test)] - /// # mod tests { - /// # #[test] - /// # fn example() { - /// use aws_smithy_runtime_api::client::interceptors::context::phase::BeforeTransmit; - /// use aws_smithy_runtime_api::client::interceptors::{Interceptor, InterceptorContext}; - /// use aws_smithy_types::config_bag::ConfigBag; - /// use aws_sdk_iotroborunner::config::Config; - /// - /// fn base_url() -> String { - /// // ... - /// # String::new() - /// } - /// - /// #[derive(Debug)] - /// pub struct UriModifierInterceptor; - /// impl Intercept for UriModifierInterceptor { - /// fn modify_before_signing( - /// &self, - /// context: &mut InterceptorContext, - /// _cfg: &mut ConfigBag, - /// ) -> Result<(), aws_smithy_runtime_api::client::interceptors::BoxError> { - /// let request = context.request_mut(); - /// let uri = format!("{}{}", base_url(), request.uri().path()); - /// *request.uri_mut() = uri.parse()?; - /// - /// Ok(()) - /// } - /// } - /// - /// let config = Config::builder() - /// .interceptor(UriModifierInterceptor) - /// .build(); - /// # } - /// # } - /// ``` - pub fn interceptor(mut self, interceptor: impl crate::config::Intercept + 'static) -> Self { - self.push_interceptor(crate::config::SharedInterceptor::new(interceptor)); - self - } - - /// Add a [`SharedInterceptor`](crate::config::SharedInterceptor) that runs at specific stages of the request execution pipeline. - /// - /// Interceptors targeted at a certain stage are executed according to the pre-defined priority. - /// The SDK provides a default set of interceptors. An interceptor configured by this method - /// will run after those default interceptors. - /// - /// # Examples - /// ```no_run - /// # #[cfg(test)] - /// # mod tests { - /// # #[test] - /// # fn example() { - /// use aws_smithy_runtime_api::client::interceptors::context::phase::BeforeTransmit; - /// use aws_smithy_runtime_api::client::interceptors::{Interceptor, InterceptorContext, SharedInterceptor}; - /// use aws_smithy_types::config_bag::ConfigBag; - /// use aws_sdk_iotroborunner::config::{Builder, Config}; - /// - /// fn base_url() -> String { - /// // ... - /// # String::new() - /// } - /// - /// fn modify_request_uri(builder: &mut Builder) { - /// #[derive(Debug)] - /// pub struct UriModifierInterceptor; - /// impl Intercept for UriModifierInterceptor { - /// fn modify_before_signing( - /// &self, - /// context: &mut InterceptorContext, - /// _cfg: &mut ConfigBag, - /// ) -> Result<(), aws_smithy_runtime_api::client::interceptors::BoxError> { - /// let request = context.request_mut(); - /// let uri = format!("{}{}", base_url(), request.uri().path()); - /// *request.uri_mut() = uri.parse()?; - /// - /// Ok(()) - /// } - /// } - /// builder.push_interceptor(SharedInterceptor::new(UriModifierInterceptor)); - /// } - /// - /// let mut builder = Config::builder(); - /// modify_request_uri(&mut builder); - /// let config = builder.build(); - /// # } - /// # } - /// ``` - pub fn push_interceptor(&mut self, interceptor: crate::config::SharedInterceptor) -> &mut Self { - self.runtime_components.push_interceptor(interceptor); - self - } - - /// Set [`SharedInterceptor`](crate::config::SharedInterceptor)s for the builder. - pub fn set_interceptors(&mut self, interceptors: impl IntoIterator) -> &mut Self { - self.runtime_components.set_interceptors(interceptors.into_iter()); - self - } - /// Sets the time source used for this service - pub fn time_source(mut self, time_source: impl ::aws_smithy_async::time::TimeSource + 'static) -> Self { - self.set_time_source(::std::option::Option::Some(::aws_smithy_runtime_api::shared::IntoShared::into_shared( - time_source, - ))); - self - } - /// Sets the time source used for this service - pub fn set_time_source(&mut self, time_source: ::std::option::Option<::aws_smithy_async::time::SharedTimeSource>) -> &mut Self { - self.runtime_components.set_time_source(time_source); - self - } - /// Add type implementing [`ClassifyRetry`](::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry) that will be used by the - /// [`RetryStrategy`](::aws_smithy_runtime_api::client::retries::RetryStrategy) to determine what responses should be retried. - /// - /// A retry classifier configured by this method will run according to its [priority](::aws_smithy_runtime_api::client::retries::classifiers::RetryClassifierPriority). - /// - /// # Examples - /// ```no_run - /// # #[cfg(test)] - /// # mod tests { - /// # #[test] - /// # fn example() { - /// use aws_smithy_runtime_api::client::interceptors::context::InterceptorContext; - /// use aws_smithy_runtime_api::client::orchestrator::OrchestratorError; - /// use aws_smithy_runtime_api::client::retries::classifiers::{ - /// ClassifyRetry, RetryAction, RetryClassifierPriority, - /// }; - /// use aws_smithy_types::error::metadata::ProvideErrorMetadata; - /// use aws_smithy_types::retry::ErrorKind; - /// use std::error::Error as StdError; - /// use std::marker::PhantomData; - /// use aws_sdk_iotroborunner::config::Config; - /// # struct SomeOperationError {} - /// - /// const RETRYABLE_ERROR_CODES: &[&str] = [ - /// // List error codes to be retried here... - /// ]; - /// - /// // When classifying at an operation's error type, classifiers require a generic parameter. - /// // When classifying the HTTP response alone, no generic is needed. - /// #[derive(Debug, Default)] - /// pub struct ErrorCodeClassifier { - /// _inner: PhantomData, - /// } - /// - /// impl ExampleErrorCodeClassifier { - /// pub fn new() -> Self { - /// Self { - /// _inner: PhantomData, - /// } - /// } - /// } - /// - /// impl ClassifyRetry for ExampleErrorCodeClassifier - /// where - /// // Adding a trait bound for ProvideErrorMetadata allows us to inspect the error code. - /// E: StdError + ProvideErrorMetadata + Send + Sync + 'static, - /// { - /// fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction { - /// // Check for a result - /// let output_or_error = ctx.output_or_error(); - /// // Check for an error - /// let error = match output_or_error { - /// Some(Ok(_)) | None => return RetryAction::NoActionIndicated, - /// Some(Err(err)) => err, - /// }; - /// - /// // Downcast the generic error and extract the code - /// let error_code = OrchestratorError::as_operation_error(error) - /// .and_then(|err| err.downcast_ref::()) - /// .and_then(|err| err.code()); - /// - /// // If this error's code is in our list, return an action that tells the RetryStrategy to retry this request. - /// if let Some(error_code) = error_code { - /// if RETRYABLE_ERROR_CODES.contains(&error_code) { - /// return RetryAction::transient_error(); - /// } - /// } - /// - /// // Otherwise, return that no action is indicated i.e. that this classifier doesn't require a retry. - /// // Another classifier may still classify this response as retryable. - /// RetryAction::NoActionIndicated - /// } - /// - /// fn name(&self) -> &'static str { "Example Error Code Classifier" } - /// } - /// - /// let config = Config::builder() - /// .retry_classifier(ExampleErrorCodeClassifier::::new()) - /// .build(); - /// # } - /// # } - /// ``` - pub fn retry_classifier( - mut self, - retry_classifier: impl ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry + 'static, - ) -> Self { - self.push_retry_classifier(::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier::new( - retry_classifier, - )); - self - } - - /// Add a [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier) that will be used by the - /// [`RetryStrategy`](::aws_smithy_runtime_api::client::retries::RetryStrategy) to determine what responses should be retried. - /// - /// A retry classifier configured by this method will run according to its priority. - /// - /// # Examples - /// ```no_run - /// # #[cfg(test)] - /// # mod tests { - /// # #[test] - /// # fn example() { - /// use aws_smithy_runtime_api::client::interceptors::context::InterceptorContext; - /// use aws_smithy_runtime_api::client::orchestrator::OrchestratorError; - /// use aws_smithy_runtime_api::client::retries::classifiers::{ - /// ClassifyRetry, RetryAction, RetryClassifierPriority, - /// }; - /// use aws_smithy_types::error::metadata::ProvideErrorMetadata; - /// use aws_smithy_types::retry::ErrorKind; - /// use std::error::Error as StdError; - /// use std::marker::PhantomData; - /// use aws_sdk_iotroborunner::config::{Builder, Config}; - /// # struct SomeOperationError {} - /// - /// const RETRYABLE_ERROR_CODES: &[&str] = [ - /// // List error codes to be retried here... - /// ]; - /// fn set_example_error_code_classifier(builder: &mut Builder) { - /// // When classifying at an operation's error type, classifiers require a generic parameter. - /// // When classifying the HTTP response alone, no generic is needed. - /// #[derive(Debug, Default)] - /// pub struct ExampleErrorCodeClassifier { - /// _inner: PhantomData, - /// } - /// - /// impl ExampleErrorCodeClassifier { - /// pub fn new() -> Self { - /// Self { - /// _inner: PhantomData, - /// } - /// } - /// } - /// - /// impl ClassifyRetry for ExampleErrorCodeClassifier - /// where - /// // Adding a trait bound for ProvideErrorMetadata allows us to inspect the error code. - /// E: StdError + ProvideErrorMetadata + Send + Sync + 'static, - /// { - /// fn classify_retry(&self, ctx: &InterceptorContext) -> RetryAction { - /// // Check for a result - /// let output_or_error = ctx.output_or_error(); - /// // Check for an error - /// let error = match output_or_error { - /// Some(Ok(_)) | None => return RetryAction::NoActionIndicated, - /// Some(Err(err)) => err, - /// }; - /// - /// // Downcast the generic error and extract the code - /// let error_code = OrchestratorError::as_operation_error(error) - /// .and_then(|err| err.downcast_ref::()) - /// .and_then(|err| err.code()); - /// - /// // If this error's code is in our list, return an action that tells the RetryStrategy to retry this request. - /// if let Some(error_code) = error_code { - /// if RETRYABLE_ERROR_CODES.contains(&error_code) { - /// return RetryAction::transient_error(); - /// } - /// } - /// - /// // Otherwise, return that no action is indicated i.e. that this classifier doesn't require a retry. - /// // Another classifier may still classify this response as retryable. - /// RetryAction::NoActionIndicated - /// } - /// - /// fn name(&self) -> &'static str { "Example Error Code Classifier" } - /// } - /// - /// builder.push_retry_classifier(ExampleErrorCodeClassifier::::new()) - /// } - /// - /// let mut builder = Config::builder(); - /// set_example_error_code_classifier(&mut builder); - /// let config = builder.build(); - /// # } - /// # } - /// ``` - pub fn push_retry_classifier( - &mut self, - retry_classifier: ::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier, - ) -> &mut Self { - self.runtime_components.push_retry_classifier(retry_classifier); - self - } - - /// Set [`SharedRetryClassifier`](::aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier)s for the builder, replacing any that - /// were previously set. - pub fn set_retry_classifiers( - &mut self, - retry_classifiers: impl IntoIterator, - ) -> &mut Self { - self.runtime_components.set_retry_classifiers(retry_classifiers.into_iter()); - self - } - /// Sets the name of the app that is using the client. - /// - /// This _optional_ name is used to identify the application in the user agent that - /// gets sent along with requests. - pub fn app_name(mut self, app_name: ::aws_types::app_name::AppName) -> Self { - self.set_app_name(Some(app_name)); - self - } - /// Sets the name of the app that is using the client. - /// - /// This _optional_ name is used to identify the application in the user agent that - /// gets sent along with requests. - pub fn set_app_name(&mut self, app_name: ::std::option::Option<::aws_types::app_name::AppName>) -> &mut Self { - self.config.store_or_unset(app_name); - self - } - /// Overrides the default invocation ID generator. - /// - /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic. - pub fn invocation_id_generator(mut self, gen: impl ::aws_runtime::invocation_id::InvocationIdGenerator + 'static) -> Self { - self.set_invocation_id_generator(::std::option::Option::Some( - ::aws_runtime::invocation_id::SharedInvocationIdGenerator::new(gen), - )); - self - } - /// Overrides the default invocation ID generator. - /// - /// The invocation ID generator generates ID values for the `amz-sdk-invocation-id` header. By default, this will be a random UUID. Overriding it may be useful in tests that examine the HTTP request and need to be deterministic. - pub fn set_invocation_id_generator( - &mut self, - gen: ::std::option::Option<::aws_runtime::invocation_id::SharedInvocationIdGenerator>, - ) -> &mut Self { - self.config.store_or_unset(gen); - self - } - /// Sets the endpoint URL used to communicate with this service - - /// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix - /// will be prefixed onto this URL. To fully override the endpoint resolver, use - /// [`Builder::endpoint_resolver`]. - pub fn endpoint_url(mut self, endpoint_url: impl Into<::std::string::String>) -> Self { - self.set_endpoint_url(Some(endpoint_url.into())); - self - } - /// Sets the endpoint URL used to communicate with this service - - /// Note: this is used in combination with other endpoint rules, e.g. an API that applies a host-label prefix - /// will be prefixed onto this URL. To fully override the endpoint resolver, use - /// [`Builder::endpoint_resolver`]. - pub fn set_endpoint_url(&mut self, endpoint_url: Option<::std::string::String>) -> &mut Self { - self.config.store_or_unset(endpoint_url.map(::aws_types::endpoint_config::EndpointUrl)); - self - } - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - pub fn use_dual_stack(mut self, use_dual_stack: impl Into) -> Self { - self.set_use_dual_stack(Some(use_dual_stack.into())); - self - } - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - pub fn set_use_dual_stack(&mut self, use_dual_stack: Option) -> &mut Self { - self.config.store_or_unset(use_dual_stack.map(::aws_types::endpoint_config::UseDualStack)); - self - } - /// 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. - pub fn use_fips(mut self, use_fips: impl Into) -> Self { - self.set_use_fips(Some(use_fips.into())); - self - } - /// 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. - pub fn set_use_fips(&mut self, use_fips: Option) -> &mut Self { - self.config.store_or_unset(use_fips.map(::aws_types::endpoint_config::UseFips)); - self - } - /// Sets the AWS region to use when making requests. - /// - /// # Examples - /// ```no_run - /// use aws_types::region::Region; - /// use aws_sdk_iotroborunner::config::{Builder, Config}; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .region(Region::new("us-east-1")) - /// .build(); - /// ``` - pub fn region(mut self, region: impl ::std::convert::Into<::std::option::Option>) -> Self { - self.set_region(region.into()); - self - } - /// Sets the AWS region to use when making requests. - pub fn set_region(&mut self, region: ::std::option::Option) -> &mut Self { - self.config.store_or_unset(region); - self - } - /// Sets the credentials provider for this service - pub fn credentials_provider(mut self, credentials_provider: impl crate::config::ProvideCredentials + 'static) -> Self { - self.set_credentials_provider(::std::option::Option::Some(crate::config::SharedCredentialsProvider::new( - credentials_provider, - ))); - self - } - /// Sets the credentials provider for this service - pub fn set_credentials_provider(&mut self, credentials_provider: ::std::option::Option) -> &mut Self { - if let Some(credentials_provider) = credentials_provider { - self.runtime_components - .set_identity_resolver(::aws_runtime::auth::sigv4::SCHEME_ID, credentials_provider); - } - self - } - /// Sets the [`behavior major version`](crate::config::BehaviorVersion). - /// - /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards - /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for - /// all operations might be the ideal behavior but could break existing applications. - /// - /// # Examples - /// - /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature. - /// ```no_run - /// use aws_sdk_iotroborunner::config::BehaviorVersion; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .behavior_version(BehaviorVersion::latest()) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - /// - /// Customizing behavior major version: - /// ```no_run - /// use aws_sdk_iotroborunner::config::BehaviorVersion; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .behavior_version(BehaviorVersion::v2023_11_09()) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - - pub fn behavior_version(mut self, behavior_version: crate::config::BehaviorVersion) -> Self { - self.set_behavior_version(Some(behavior_version)); - self - } - - /// Sets the [`behavior major version`](crate::config::BehaviorVersion). - /// - /// Over time, new best-practice behaviors are introduced. However, these behaviors might not be backwards - /// compatible. For example, a change which introduces new default timeouts or a new retry-mode for - /// all operations might be the ideal behavior but could break existing applications. - /// - /// # Examples - /// - /// Set the behavior major version to `latest`. This is equivalent to enabling the `behavior-version-latest` cargo feature. - /// ```no_run - /// use aws_sdk_iotroborunner::config::BehaviorVersion; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .behavior_version(BehaviorVersion::latest()) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - /// - /// Customizing behavior major version: - /// ```no_run - /// use aws_sdk_iotroborunner::config::BehaviorVersion; - /// - /// let config = aws_sdk_iotroborunner::Config::builder() - /// .behavior_version(BehaviorVersion::v2023_11_09()) - /// // ... - /// .build(); - /// let client = aws_sdk_iotroborunner::Client::from_conf(config); - /// ``` - - pub fn set_behavior_version(&mut self, behavior_version: Option) -> &mut Self { - self.behavior_version = behavior_version; - self - } - - /// Convenience method to set the latest behavior major version - /// - /// This is equivalent to enabling the `behavior-version-latest` Cargo feature - pub fn behavior_version_latest(mut self) -> Self { - self.set_behavior_version(Some(crate::config::BehaviorVersion::latest())); - self - } - /// Adds a runtime plugin to the config. - #[allow(unused)] - pub(crate) fn runtime_plugin(mut self, plugin: impl crate::config::RuntimePlugin + 'static) -> Self { - self.push_runtime_plugin(crate::config::SharedRuntimePlugin::new(plugin)); - self - } - /// Adds a runtime plugin to the config. - #[allow(unused)] - pub(crate) fn push_runtime_plugin(&mut self, plugin: crate::config::SharedRuntimePlugin) -> &mut Self { - self.runtime_plugins.push(plugin); - self - } - #[cfg(any(feature = "test-util", test))] - #[allow(unused_mut)] - /// Apply test defaults to the builder - pub fn apply_test_defaults(&mut self) -> &mut Self { - self.set_idempotency_token_provider(Some("00000000-0000-4000-8000-000000000000".into())); - self.set_time_source(::std::option::Option::Some(::aws_smithy_async::time::SharedTimeSource::new( - ::aws_smithy_async::time::StaticTimeSource::new(::std::time::UNIX_EPOCH + ::std::time::Duration::from_secs(1234567890)), - ))); - self.config.store_put(::aws_runtime::user_agent::AwsUserAgent::for_tests()); - self.set_credentials_provider(Some(crate::config::SharedCredentialsProvider::new( - ::aws_credential_types::Credentials::for_tests(), - ))); - self.behavior_version = ::std::option::Option::Some(crate::config::BehaviorVersion::latest()); - self - } - #[cfg(any(feature = "test-util", test))] - #[allow(unused_mut)] - /// Apply test defaults to the builder - pub fn with_test_defaults(mut self) -> Self { - self.apply_test_defaults(); - self - } - /// Builds a [`Config`]. - #[allow(unused_mut)] - pub fn build(mut self) -> Config { - let mut layer = self.config; - if self.runtime_components.time_source().is_none() { - self.runtime_components - .set_time_source(::std::option::Option::Some(::std::default::Default::default())); - } - layer.store_put(crate::meta::API_METADATA.clone()); - layer.store_put(::aws_types::SigningName::from_static("iotroborunner")); - layer - .load::<::aws_types::region::Region>() - .cloned() - .map(|r| layer.store_put(::aws_types::region::SigningRegion::from(r))); - Config { - config: crate::config::Layer::from(layer.clone()) - .with_name("aws_sdk_iotroborunner::config::Config") - .freeze(), - cloneable: layer, - runtime_components: self.runtime_components, - runtime_plugins: self.runtime_plugins, - behavior_version: self.behavior_version, - } - } -} -#[derive(::std::fmt::Debug)] -pub(crate) struct ServiceRuntimePlugin { - config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>, - runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, -} - -impl ServiceRuntimePlugin { - pub fn new(_service_config: crate::config::Config) -> Self { - let config = { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("IoTRoboRunner"); - cfg.store_put(crate::idempotency_token::default_provider()); - ::std::option::Option::Some(cfg.freeze()) - }; - let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin"); - runtime_components.set_endpoint_resolver(Some({ - use crate::config::endpoint::ResolveEndpoint; - crate::config::endpoint::DefaultResolver::new().into_shared_resolver() - })); - runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new()); - runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default()); - runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new()); - runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new()); - runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new()); - runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new()); - runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new()); - runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new( - ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(), - )); - Self { config, runtime_components } - } -} - -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - self.config.clone() - } - - fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order { - ::aws_smithy_runtime_api::client::runtime_plugin::Order::Defaults - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - ::std::borrow::Cow::Borrowed(&self.runtime_components) - } -} - -/// Cross-operation shared-state singletons - -/// A plugin that enables configuration for a single operation invocation -/// -/// The `config` method will return a `FrozenLayer` by storing values from `config_override`. -/// In the case of default values requested, they will be obtained from `client_config`. -#[derive(Debug)] -pub(crate) struct ConfigOverrideRuntimePlugin { - pub(crate) config: ::aws_smithy_types::config_bag::FrozenLayer, - pub(crate) components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, -} - -impl ConfigOverrideRuntimePlugin { - #[allow(dead_code)] // unused when a service does not provide any operations - pub(crate) fn new( - config_override: Builder, - initial_config: ::aws_smithy_types::config_bag::FrozenLayer, - initial_components: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> Self { - let mut layer = config_override.config; - let mut components = config_override.runtime_components; - #[allow(unused_mut)] - let mut resolver = - ::aws_smithy_runtime::client::config_override::Resolver::overrid(initial_config, initial_components, &mut layer, &mut components); - - resolver - .config_mut() - .load::<::aws_types::region::Region>() - .cloned() - .map(|r| resolver.config_mut().store_put(::aws_types::region::SigningRegion::from(r))); - - let _ = resolver; - Self { - config: ::aws_smithy_types::config_bag::Layer::from(layer) - .with_name("aws_sdk_iotroborunner::config::ConfigOverrideRuntimePlugin") - .freeze(), - components, - } - } -} - -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ConfigOverrideRuntimePlugin { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - Some(self.config.clone()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - ::std::borrow::Cow::Borrowed(&self.components) - } -} - -pub use ::aws_smithy_runtime::client::identity::IdentityCache; -pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents; -pub use ::aws_smithy_types::config_bag::ConfigBag; - -pub use ::aws_credential_types::Credentials; - -impl From<&::aws_types::sdk_config::SdkConfig> for Builder { - fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self { - let mut builder = Builder::default(); - builder.set_credentials_provider(input.credentials_provider()); - builder = builder.region(input.region().cloned()); - builder.set_use_fips(input.use_fips()); - builder.set_use_dual_stack(input.use_dual_stack()); - builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string())); - // resiliency - builder.set_retry_config(input.retry_config().cloned()); - builder.set_timeout_config(input.timeout_config().cloned()); - builder.set_sleep_impl(input.sleep_impl()); - - builder.set_http_client(input.http_client()); - builder.set_time_source(input.time_source()); - builder.set_behavior_version(input.behavior_version()); - // setting `None` here removes the default - if let Some(config) = input.stalled_stream_protection() { - builder.set_stalled_stream_protection(Some(config)); - } - - if let Some(cache) = input.identity_cache() { - builder.set_identity_cache(cache); - } - builder.set_app_name(input.app_name().cloned()); - - builder - } -} - -impl From<&::aws_types::sdk_config::SdkConfig> for Config { - fn from(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self { - Builder::from(sdk_config).build() - } -} - -pub use ::aws_types::app_name::AppName; - -pub use ::aws_smithy_async::rt::sleep::Sleep; - -pub(crate) fn base_client_runtime_plugins(mut config: crate::Config) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut configured_plugins = ::std::vec::Vec::new(); - ::std::mem::swap(&mut config.runtime_plugins, &mut configured_plugins); - #[allow(unused_mut)] - let mut behavior_version = config.behavior_version.clone(); - #[cfg(feature = "behavior-version-latest")] - { - if behavior_version.is_none() { - behavior_version = Some(::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion::latest()); - } - } - - let mut plugins = ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins::new() - // defaults - .with_client_plugins(::aws_smithy_runtime::client::defaults::default_plugins( - ::aws_smithy_runtime::client::defaults::DefaultPluginParams::new() - .with_retry_partition_name("iotroborunner") - .with_behavior_version(behavior_version.expect("Invalid client configuration: A behavior major version must be set when sending a request or constructing a client. You must set it during client construction or by enabling the `behavior-version-latest` cargo feature.")) - )) - // user config - .with_client_plugin( - ::aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin::new() - .with_config(config.config.clone()) - .with_runtime_components(config.runtime_components.clone()) - ) - // codegen config - .with_client_plugin(crate::config::ServiceRuntimePlugin::new(config.clone())) - .with_client_plugin(::aws_smithy_runtime::client::auth::no_auth::NoAuthRuntimePlugin::new()); - - for plugin in configured_plugins { - plugins = plugins.with_client_plugin(plugin); - } - plugins -} - -pub use ::aws_smithy_types::config_bag::FrozenLayer; - -pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder; - -pub use ::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin; - -pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion; - -pub use ::aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig; - -pub use ::aws_smithy_runtime_api::client::http::SharedHttpClient; - -pub use ::aws_smithy_async::rt::sleep::SharedAsyncSleep; - -pub use ::aws_smithy_runtime_api::client::identity::SharedIdentityCache; - -pub use ::aws_smithy_runtime_api::client::interceptors::SharedInterceptor; - -pub use ::aws_types::region::Region; - -pub use ::aws_credential_types::provider::SharedCredentialsProvider; - -pub use ::aws_smithy_runtime_api::client::http::HttpClient; - -pub use ::aws_smithy_runtime_api::shared::IntoShared; - -pub use ::aws_smithy_async::rt::sleep::AsyncSleep; - -pub use ::aws_smithy_runtime_api::client::identity::ResolveCachedIdentity; - -pub use ::aws_smithy_runtime_api::client::interceptors::Intercept; - -pub use ::aws_credential_types::provider::ProvideCredentials; - -pub use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin; - -pub use ::aws_smithy_types::config_bag::Layer; - -/// Types needed to configure endpoint resolution. -pub mod endpoint; - -/// Types needed to implement [`Intercept`](crate::config::Intercept). -pub mod interceptors; - -/// Retry configuration. -pub mod retry; - -/// Timeout configuration. -pub mod timeout; diff --git a/sdk/iotroborunner/src/config/endpoint.rs b/sdk/iotroborunner/src/config/endpoint.rs deleted file mode 100644 index af8791468973..000000000000 --- a/sdk/iotroborunner/src/config/endpoint.rs +++ /dev/null @@ -1,695 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_smithy_runtime_api::client::endpoint::EndpointFuture; -pub use ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver; -pub use ::aws_smithy_types::endpoint::Endpoint; - -/// -#[cfg(test)] -mod test { - - /// For region us-east-1 with FIPS enabled and DualStack enabled - #[test] - fn test_1() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(true) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.us-east-1.api.aws"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.us-east-1.api.aws") - .build() - ); - } - - /// For region us-east-1 with FIPS enabled and DualStack disabled - #[test] - fn test_2() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(true) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.us-east-1.amazonaws.com"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.us-east-1.amazonaws.com") - .build() - ); - } - - /// For region us-east-1 with FIPS disabled and DualStack enabled - #[test] - fn test_3() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(false) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.us-east-1.api.aws"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.us-east-1.api.aws") - .build() - ); - } - - /// For region us-east-1 with FIPS disabled and DualStack disabled - #[test] - fn test_4() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(false) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.us-east-1.amazonaws.com"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.us-east-1.amazonaws.com") - .build() - ); - } - - /// For region cn-north-1 with FIPS enabled and DualStack enabled - #[test] - fn test_5() { - let params = crate::config::endpoint::Params::builder() - .region("cn-north-1".to_string()) - .use_fips(true) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.cn-north-1.api.amazonwebservices.com.cn"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.cn-north-1.api.amazonwebservices.com.cn") - .build() - ); - } - - /// For region cn-north-1 with FIPS enabled and DualStack disabled - #[test] - fn test_6() { - let params = crate::config::endpoint::Params::builder() - .region("cn-north-1".to_string()) - .use_fips(true) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.cn-north-1.amazonaws.com.cn"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.cn-north-1.amazonaws.com.cn") - .build() - ); - } - - /// For region cn-north-1 with FIPS disabled and DualStack enabled - #[test] - fn test_7() { - let params = crate::config::endpoint::Params::builder() - .region("cn-north-1".to_string()) - .use_fips(false) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.cn-north-1.api.amazonwebservices.com.cn"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.cn-north-1.api.amazonwebservices.com.cn") - .build() - ); - } - - /// For region cn-north-1 with FIPS disabled and DualStack disabled - #[test] - fn test_8() { - let params = crate::config::endpoint::Params::builder() - .region("cn-north-1".to_string()) - .use_fips(false) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.cn-north-1.amazonaws.com.cn"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.cn-north-1.amazonaws.com.cn") - .build() - ); - } - - /// For region us-gov-east-1 with FIPS enabled and DualStack enabled - #[test] - fn test_9() { - let params = crate::config::endpoint::Params::builder() - .region("us-gov-east-1".to_string()) - .use_fips(true) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.us-gov-east-1.api.aws"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.us-gov-east-1.api.aws") - .build() - ); - } - - /// For region us-gov-east-1 with FIPS enabled and DualStack disabled - #[test] - fn test_10() { - let params = crate::config::endpoint::Params::builder() - .region("us-gov-east-1".to_string()) - .use_fips(true) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.us-gov-east-1.amazonaws.com"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.us-gov-east-1.amazonaws.com") - .build() - ); - } - - /// For region us-gov-east-1 with FIPS disabled and DualStack enabled - #[test] - fn test_11() { - let params = crate::config::endpoint::Params::builder() - .region("us-gov-east-1".to_string()) - .use_fips(false) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.us-gov-east-1.api.aws"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.us-gov-east-1.api.aws") - .build() - ); - } - - /// For region us-gov-east-1 with FIPS disabled and DualStack disabled - #[test] - fn test_12() { - let params = crate::config::endpoint::Params::builder() - .region("us-gov-east-1".to_string()) - .use_fips(false) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.us-gov-east-1.amazonaws.com"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.us-gov-east-1.amazonaws.com") - .build() - ); - } - - /// For region us-iso-east-1 with FIPS enabled and DualStack enabled - #[test] - fn test_13() { - let params = crate::config::endpoint::Params::builder() - .region("us-iso-east-1".to_string()) - .use_fips(true) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: FIPS and DualStack are enabled, but this partition does not support one or both [For region us-iso-east-1 with FIPS enabled and DualStack enabled]"); - assert_eq!( - format!("{}", error), - "FIPS and DualStack are enabled, but this partition does not support one or both" - ) - } - - /// For region us-iso-east-1 with FIPS enabled and DualStack disabled - #[test] - fn test_14() { - let params = crate::config::endpoint::Params::builder() - .region("us-iso-east-1".to_string()) - .use_fips(true) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.us-iso-east-1.c2s.ic.gov"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.us-iso-east-1.c2s.ic.gov") - .build() - ); - } - - /// For region us-iso-east-1 with FIPS disabled and DualStack enabled - #[test] - fn test_15() { - let params = crate::config::endpoint::Params::builder() - .region("us-iso-east-1".to_string()) - .use_fips(false) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: DualStack is enabled but this partition does not support DualStack [For region us-iso-east-1 with FIPS disabled and DualStack enabled]"); - assert_eq!(format!("{}", error), "DualStack is enabled but this partition does not support DualStack") - } - - /// For region us-iso-east-1 with FIPS disabled and DualStack disabled - #[test] - fn test_16() { - let params = crate::config::endpoint::Params::builder() - .region("us-iso-east-1".to_string()) - .use_fips(false) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.us-iso-east-1.c2s.ic.gov"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.us-iso-east-1.c2s.ic.gov") - .build() - ); - } - - /// For region us-isob-east-1 with FIPS enabled and DualStack enabled - #[test] - fn test_17() { - let params = crate::config::endpoint::Params::builder() - .region("us-isob-east-1".to_string()) - .use_fips(true) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: FIPS and DualStack are enabled, but this partition does not support one or both [For region us-isob-east-1 with FIPS enabled and DualStack enabled]"); - assert_eq!( - format!("{}", error), - "FIPS and DualStack are enabled, but this partition does not support one or both" - ) - } - - /// For region us-isob-east-1 with FIPS enabled and DualStack disabled - #[test] - fn test_18() { - let params = crate::config::endpoint::Params::builder() - .region("us-isob-east-1".to_string()) - .use_fips(true) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner-fips.us-isob-east-1.sc2s.sgov.gov"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner-fips.us-isob-east-1.sc2s.sgov.gov") - .build() - ); - } - - /// For region us-isob-east-1 with FIPS disabled and DualStack enabled - #[test] - fn test_19() { - let params = crate::config::endpoint::Params::builder() - .region("us-isob-east-1".to_string()) - .use_fips(false) - .use_dual_stack(true) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: DualStack is enabled but this partition does not support DualStack [For region us-isob-east-1 with FIPS disabled and DualStack enabled]"); - assert_eq!(format!("{}", error), "DualStack is enabled but this partition does not support DualStack") - } - - /// For region us-isob-east-1 with FIPS disabled and DualStack disabled - #[test] - fn test_20() { - let params = crate::config::endpoint::Params::builder() - .region("us-isob-east-1".to_string()) - .use_fips(false) - .use_dual_stack(false) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://iotroborunner.us-isob-east-1.sc2s.sgov.gov"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder() - .url("https://iotroborunner.us-isob-east-1.sc2s.sgov.gov") - .build() - ); - } - - /// For custom endpoint with region set and fips disabled and dualstack disabled - #[test] - fn test_21() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(false) - .use_dual_stack(false) - .endpoint("https://example.com".to_string()) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://example.com"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder().url("https://example.com").build() - ); - } - - /// For custom endpoint with region not set and fips disabled and dualstack disabled - #[test] - fn test_22() { - let params = crate::config::endpoint::Params::builder() - .use_fips(false) - .use_dual_stack(false) - .endpoint("https://example.com".to_string()) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let endpoint = endpoint.expect("Expected valid endpoint: https://example.com"); - assert_eq!( - endpoint, - ::aws_smithy_types::endpoint::Endpoint::builder().url("https://example.com").build() - ); - } - - /// For custom endpoint with fips enabled and dualstack disabled - #[test] - fn test_23() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(true) - .use_dual_stack(false) - .endpoint("https://example.com".to_string()) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: Invalid Configuration: FIPS and custom endpoint are not supported [For custom endpoint with fips enabled and dualstack disabled]"); - assert_eq!(format!("{}", error), "Invalid Configuration: FIPS and custom endpoint are not supported") - } - - /// For custom endpoint with fips disabled and dualstack enabled - #[test] - fn test_24() { - let params = crate::config::endpoint::Params::builder() - .region("us-east-1".to_string()) - .use_fips(false) - .use_dual_stack(true) - .endpoint("https://example.com".to_string()) - .build() - .expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: Invalid Configuration: Dualstack and custom endpoint are not supported [For custom endpoint with fips disabled and dualstack enabled]"); - assert_eq!( - format!("{}", error), - "Invalid Configuration: Dualstack and custom endpoint are not supported" - ) - } - - /// Missing region - #[test] - fn test_25() { - let params = crate::config::endpoint::Params::builder().build().expect("invalid params"); - let resolver = crate::config::endpoint::DefaultResolver::new(); - let endpoint = resolver.resolve_endpoint(¶ms); - let error = endpoint.expect_err("expected error: Invalid Configuration: Missing Region [Missing region]"); - assert_eq!(format!("{}", error), "Invalid Configuration: Missing Region") - } -} - -/// Endpoint resolver trait specific to AWS IoT RoboRunner -pub trait ResolveEndpoint: ::std::marker::Send + ::std::marker::Sync + ::std::fmt::Debug { - /// Resolve an endpoint with the given parameters - fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a>; - - /// Convert this service-specific resolver into a `SharedEndpointResolver` - /// - /// The resulting resolver will downcast `EndpointResolverParams` into `crate::config::endpoint::Params`. - fn into_shared_resolver(self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver - where - Self: Sized + 'static, - { - ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver::new(DowncastParams(self)) - } -} - -#[derive(Debug)] -struct DowncastParams(T); -impl ::aws_smithy_runtime_api::client::endpoint::ResolveEndpoint for DowncastParams -where - T: ResolveEndpoint, -{ - fn resolve_endpoint<'a>( - &'a self, - params: &'a ::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams, - ) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> { - let ep = match params.get::() { - Some(params) => self.0.resolve_endpoint(params), - None => ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(Err("params of expected type was not present".into())), - }; - ep - } -} - -/// The default endpoint resolver -#[derive(Debug, Default)] -pub struct DefaultResolver { - partition_resolver: crate::endpoint_lib::partition::PartitionResolver, -} - -impl DefaultResolver { - /// Create a new endpoint resolver with default settings - pub fn new() -> Self { - Self { - partition_resolver: crate::endpoint_lib::DEFAULT_PARTITION_RESOLVER.clone(), - } - } - - fn resolve_endpoint( - &self, - params: &crate::config::endpoint::Params, - ) -> Result<::aws_smithy_types::endpoint::Endpoint, ::aws_smithy_runtime_api::box_error::BoxError> { - let mut diagnostic_collector = crate::endpoint_lib::diagnostic::DiagnosticCollector::new(); - Ok( - crate::config::endpoint::internals::resolve_endpoint(params, &mut diagnostic_collector, &self.partition_resolver) - .map_err(|err| err.with_source(diagnostic_collector.take_last_error()))?, - ) - } -} - -impl crate::config::endpoint::ResolveEndpoint for DefaultResolver { - fn resolve_endpoint(&self, params: &crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture { - ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(self.resolve_endpoint(params)) - } -} - -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -/// Configuration parameters for resolving the correct endpoint -pub struct Params { - /// The AWS region used to dispatch the request. - pub(crate) region: ::std::option::Option<::std::string::String>, - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - pub(crate) use_dual_stack: 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. - pub(crate) use_fips: bool, - /// Override the endpoint used to send this request - pub(crate) endpoint: ::std::option::Option<::std::string::String>, -} -impl Params { - /// Create a builder for [`Params`] - pub fn builder() -> crate::config::endpoint::ParamsBuilder { - crate::config::endpoint::ParamsBuilder::default() - } - /// The AWS region used to dispatch the request. - pub fn region(&self) -> ::std::option::Option<&str> { - self.region.as_deref() - } - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - pub fn use_dual_stack(&self) -> ::std::option::Option { - Some(self.use_dual_stack) - } - /// 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. - pub fn use_fips(&self) -> ::std::option::Option { - Some(self.use_fips) - } - /// Override the endpoint used to send this request - pub fn endpoint(&self) -> ::std::option::Option<&str> { - self.endpoint.as_deref() - } -} - -/// Builder for [`Params`] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ParamsBuilder { - region: ::std::option::Option<::std::string::String>, - use_dual_stack: ::std::option::Option, - use_fips: ::std::option::Option, - endpoint: ::std::option::Option<::std::string::String>, -} -impl ParamsBuilder { - /// Consume this builder, creating [`Params`]. - pub fn build(self) -> ::std::result::Result { - Ok( - #[allow(clippy::unnecessary_lazy_evaluations)] - crate::config::endpoint::Params { - region: self.region, - use_dual_stack: self - .use_dual_stack - .or_else(|| Some(false)) - .ok_or_else(|| crate::config::endpoint::InvalidParams::missing("use_dual_stack"))?, - use_fips: self - .use_fips - .or_else(|| Some(false)) - .ok_or_else(|| crate::config::endpoint::InvalidParams::missing("use_fips"))?, - endpoint: self.endpoint, - }, - ) - } - /// Sets the value for region - /// - /// The AWS region used to dispatch the request. - pub fn region(mut self, value: impl Into<::std::string::String>) -> Self { - self.region = Some(value.into()); - self - } - - /// Sets the value for region - /// - /// The AWS region used to dispatch the request. - pub fn set_region(mut self, param: Option<::std::string::String>) -> Self { - self.region = param; - self - } - /// Sets the value for use_dual_stack - /// - /// When unset, this parameter has a default value of `false`. - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - pub fn use_dual_stack(mut self, value: impl Into) -> Self { - self.use_dual_stack = Some(value.into()); - self - } - - /// Sets the value for use_dual_stack - /// - /// When unset, this parameter has a default value of `false`. - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - pub fn set_use_dual_stack(mut self, param: Option) -> Self { - self.use_dual_stack = param; - self - } - /// Sets the value for use_fips - /// - /// When unset, this parameter has a default value of `false`. - /// 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. - pub fn use_fips(mut self, value: impl Into) -> Self { - self.use_fips = Some(value.into()); - self - } - - /// Sets the value for use_fips - /// - /// When unset, this parameter has a default value of `false`. - /// 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. - pub fn set_use_fips(mut self, param: Option) -> Self { - self.use_fips = param; - self - } - /// Sets the value for endpoint - /// - /// Override the endpoint used to send this request - pub fn endpoint(mut self, value: impl Into<::std::string::String>) -> Self { - self.endpoint = Some(value.into()); - self - } - - /// Sets the value for endpoint - /// - /// Override the endpoint used to send this request - pub fn set_endpoint(mut self, param: Option<::std::string::String>) -> Self { - self.endpoint = param; - self - } -} - -/// An error that occurred during endpoint resolution -#[derive(Debug)] -pub struct InvalidParams { - field: std::borrow::Cow<'static, str>, -} - -impl InvalidParams { - #[allow(dead_code)] - fn missing(field: &'static str) -> Self { - Self { field: field.into() } - } -} - -impl std::fmt::Display for InvalidParams { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "a required field was missing: `{}`", self.field) - } -} - -impl std::error::Error for InvalidParams {} - -mod internals; diff --git a/sdk/iotroborunner/src/config/endpoint/internals.rs b/sdk/iotroborunner/src/config/endpoint/internals.rs deleted file mode 100644 index 79009080c98c..000000000000 --- a/sdk/iotroborunner/src/config/endpoint/internals.rs +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow( - clippy::collapsible_if, - clippy::bool_comparison, - clippy::nonminimal_bool, - clippy::comparison_to_empty, - clippy::redundant_pattern_matching -)] -pub(super) fn resolve_endpoint( - _params: &crate::config::endpoint::Params, - _diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector, - partition_resolver: &crate::endpoint_lib::partition::PartitionResolver, -) -> ::aws_smithy_http::endpoint::Result { - #[allow(unused_variables)] - let region = &_params.region; - #[allow(unused_variables)] - let use_dual_stack = &_params.use_dual_stack; - #[allow(unused_variables)] - let use_fips = &_params.use_fips; - #[allow(unused_variables)] - let endpoint = &_params.endpoint; - #[allow(unused_variables)] - if let Some(endpoint) = endpoint { - if (*use_fips) == (true) { - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message( - "Invalid Configuration: FIPS and custom endpoint are not supported".to_string(), - )); - } - if (*use_dual_stack) == (true) { - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message( - "Invalid Configuration: Dualstack and custom endpoint are not supported".to_string(), - )); - } - return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url(endpoint.to_owned()).build()); - } - #[allow(unused_variables)] - if let Some(region) = region { - #[allow(unused_variables)] - if let Some(partition_result) = partition_resolver.resolve_partition(region, _diagnostic_collector) { - if (*use_fips) == (true) { - if (*use_dual_stack) == (true) { - if (true) == (partition_result.supports_fips()) { - if (true) == (partition_result.supports_dual_stack()) { - return Ok(::aws_smithy_types::endpoint::Endpoint::builder() - .url({ - let mut out = String::new(); - out.push_str("https://iotroborunner-fips."); - #[allow(clippy::needless_borrow)] - out.push_str(®ion); - out.push('.'); - #[allow(clippy::needless_borrow)] - out.push_str(&partition_result.dual_stack_dns_suffix()); - out - }) - .build()); - } - } - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message( - "FIPS and DualStack are enabled, but this partition does not support one or both".to_string(), - )); - } - } - if (*use_fips) == (true) { - if (partition_result.supports_fips()) == (true) { - return Ok(::aws_smithy_types::endpoint::Endpoint::builder() - .url({ - let mut out = String::new(); - out.push_str("https://iotroborunner-fips."); - #[allow(clippy::needless_borrow)] - out.push_str(®ion); - out.push('.'); - #[allow(clippy::needless_borrow)] - out.push_str(&partition_result.dns_suffix()); - out - }) - .build()); - } - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message( - "FIPS is enabled but this partition does not support FIPS".to_string(), - )); - } - if (*use_dual_stack) == (true) { - if (true) == (partition_result.supports_dual_stack()) { - return Ok(::aws_smithy_types::endpoint::Endpoint::builder() - .url({ - let mut out = String::new(); - out.push_str("https://iotroborunner."); - #[allow(clippy::needless_borrow)] - out.push_str(®ion); - out.push('.'); - #[allow(clippy::needless_borrow)] - out.push_str(&partition_result.dual_stack_dns_suffix()); - out - }) - .build()); - } - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message( - "DualStack is enabled but this partition does not support DualStack".to_string(), - )); - } - return Ok(::aws_smithy_types::endpoint::Endpoint::builder() - .url({ - let mut out = String::new(); - out.push_str("https://iotroborunner."); - #[allow(clippy::needless_borrow)] - out.push_str(®ion); - out.push('.'); - #[allow(clippy::needless_borrow)] - out.push_str(&partition_result.dns_suffix()); - out - }) - .build()); - } - #[allow(unreachable_code)] - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!( - "No rules matched these parameters. This is a bug. {:?}", - _params - ))); - } - return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message( - "Invalid Configuration: Missing Region".to_string(), - )); -} diff --git a/sdk/iotroborunner/src/config/interceptors.rs b/sdk/iotroborunner/src/config/interceptors.rs deleted file mode 100644 index cfde73a6e1a8..000000000000 --- a/sdk/iotroborunner/src/config/interceptors.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_smithy_runtime_api::client::interceptors::context::AfterDeserializationInterceptorContextRef; -pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextMut; -pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeDeserializationInterceptorContextRef; -pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextMut; -pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef; -pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextMut; -pub use ::aws_smithy_runtime_api::client::interceptors::context::BeforeTransmitInterceptorContextRef; -pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextMut; -pub use ::aws_smithy_runtime_api::client::interceptors::context::FinalizerInterceptorContextRef; -pub use ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext; diff --git a/sdk/iotroborunner/src/config/retry.rs b/sdk/iotroborunner/src/config/retry.rs deleted file mode 100644 index 595062713158..000000000000 --- a/sdk/iotroborunner/src/config/retry.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry; -pub use ::aws_smithy_runtime_api::client::retries::classifiers::RetryAction; -pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; - -pub use ::aws_smithy_runtime::client::retries::RetryPartition; -pub use ::aws_smithy_types::retry::{ReconnectMode, RetryConfig, RetryConfigBuilder, RetryMode}; diff --git a/sdk/iotroborunner/src/config/timeout.rs b/sdk/iotroborunner/src/config/timeout.rs deleted file mode 100644 index bc2026d62a04..000000000000 --- a/sdk/iotroborunner/src/config/timeout.rs +++ /dev/null @@ -1,2 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_smithy_types::timeout::{TimeoutConfig, TimeoutConfigBuilder}; diff --git a/sdk/iotroborunner/src/endpoint_lib.rs b/sdk/iotroborunner/src/endpoint_lib.rs deleted file mode 100644 index 667fd084b4ea..000000000000 --- a/sdk/iotroborunner/src/endpoint_lib.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -// Loading the partition JSON is expensive since it involves many regex compilations, -// so cache the result so that it only need to be paid for the first constructed client. -pub(crate) static DEFAULT_PARTITION_RESOLVER: ::once_cell::sync::Lazy = - ::once_cell::sync::Lazy::new(|| { - crate::endpoint_lib::partition::PartitionResolver::new_from_json(b"{\"partitions\":[{\"id\":\"aws\",\"outputs\":{\"dnsSuffix\":\"amazonaws.com\",\"dualStackDnsSuffix\":\"api.aws\",\"implicitGlobalRegion\":\"us-east-1\",\"name\":\"aws\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"af-south-1\":{\"description\":\"Africa (Cape Town)\"},\"ap-east-1\":{\"description\":\"Asia Pacific (Hong Kong)\"},\"ap-northeast-1\":{\"description\":\"Asia Pacific (Tokyo)\"},\"ap-northeast-2\":{\"description\":\"Asia Pacific (Seoul)\"},\"ap-northeast-3\":{\"description\":\"Asia Pacific (Osaka)\"},\"ap-south-1\":{\"description\":\"Asia Pacific (Mumbai)\"},\"ap-south-2\":{\"description\":\"Asia Pacific (Hyderabad)\"},\"ap-southeast-1\":{\"description\":\"Asia Pacific (Singapore)\"},\"ap-southeast-2\":{\"description\":\"Asia Pacific (Sydney)\"},\"ap-southeast-3\":{\"description\":\"Asia Pacific (Jakarta)\"},\"ap-southeast-4\":{\"description\":\"Asia Pacific (Melbourne)\"},\"aws-global\":{\"description\":\"AWS Standard global region\"},\"ca-central-1\":{\"description\":\"Canada (Central)\"},\"ca-west-1\":{\"description\":\"Canada West (Calgary)\"},\"eu-central-1\":{\"description\":\"Europe (Frankfurt)\"},\"eu-central-2\":{\"description\":\"Europe (Zurich)\"},\"eu-north-1\":{\"description\":\"Europe (Stockholm)\"},\"eu-south-1\":{\"description\":\"Europe (Milan)\"},\"eu-south-2\":{\"description\":\"Europe (Spain)\"},\"eu-west-1\":{\"description\":\"Europe (Ireland)\"},\"eu-west-2\":{\"description\":\"Europe (London)\"},\"eu-west-3\":{\"description\":\"Europe (Paris)\"},\"il-central-1\":{\"description\":\"Israel (Tel Aviv)\"},\"me-central-1\":{\"description\":\"Middle East (UAE)\"},\"me-south-1\":{\"description\":\"Middle East (Bahrain)\"},\"sa-east-1\":{\"description\":\"South America (Sao Paulo)\"},\"us-east-1\":{\"description\":\"US East (N. Virginia)\"},\"us-east-2\":{\"description\":\"US East (Ohio)\"},\"us-west-1\":{\"description\":\"US West (N. California)\"},\"us-west-2\":{\"description\":\"US West (Oregon)\"}}},{\"id\":\"aws-cn\",\"outputs\":{\"dnsSuffix\":\"amazonaws.com.cn\",\"dualStackDnsSuffix\":\"api.amazonwebservices.com.cn\",\"implicitGlobalRegion\":\"cn-northwest-1\",\"name\":\"aws-cn\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-cn-global\":{\"description\":\"AWS China global region\"},\"cn-north-1\":{\"description\":\"China (Beijing)\"},\"cn-northwest-1\":{\"description\":\"China (Ningxia)\"}}},{\"id\":\"aws-us-gov\",\"outputs\":{\"dnsSuffix\":\"amazonaws.com\",\"dualStackDnsSuffix\":\"api.aws\",\"implicitGlobalRegion\":\"us-gov-west-1\",\"name\":\"aws-us-gov\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-us-gov-global\":{\"description\":\"AWS GovCloud (US) global region\"},\"us-gov-east-1\":{\"description\":\"AWS GovCloud (US-East)\"},\"us-gov-west-1\":{\"description\":\"AWS GovCloud (US-West)\"}}},{\"id\":\"aws-iso\",\"outputs\":{\"dnsSuffix\":\"c2s.ic.gov\",\"dualStackDnsSuffix\":\"c2s.ic.gov\",\"implicitGlobalRegion\":\"us-iso-east-1\",\"name\":\"aws-iso\",\"supportsDualStack\":false,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-iso-global\":{\"description\":\"AWS ISO (US) global region\"},\"us-iso-east-1\":{\"description\":\"US ISO East\"},\"us-iso-west-1\":{\"description\":\"US ISO WEST\"}}},{\"id\":\"aws-iso-b\",\"outputs\":{\"dnsSuffix\":\"sc2s.sgov.gov\",\"dualStackDnsSuffix\":\"sc2s.sgov.gov\",\"implicitGlobalRegion\":\"us-isob-east-1\",\"name\":\"aws-iso-b\",\"supportsDualStack\":false,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-iso-b-global\":{\"description\":\"AWS ISOB (US) global region\"},\"us-isob-east-1\":{\"description\":\"US ISOB East (Ohio)\"}}},{\"id\":\"aws-iso-e\",\"outputs\":{\"dnsSuffix\":\"cloud.adc-e.uk\",\"dualStackDnsSuffix\":\"cloud.adc-e.uk\",\"implicitGlobalRegion\":\"eu-isoe-west-1\",\"name\":\"aws-iso-e\",\"supportsDualStack\":false,\"supportsFIPS\":true},\"regionRegex\":\"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{}},{\"id\":\"aws-iso-f\",\"outputs\":{\"dnsSuffix\":\"csp.hci.ic.gov\",\"dualStackDnsSuffix\":\"csp.hci.ic.gov\",\"implicitGlobalRegion\":\"us-isof-south-1\",\"name\":\"aws-iso-f\",\"supportsDualStack\":false,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{}}],\"version\":\"1.1\"}").expect("valid JSON") - }); - -pub(crate) mod diagnostic; - -pub(crate) mod partition; diff --git a/sdk/iotroborunner/src/endpoint_lib/diagnostic.rs b/sdk/iotroborunner/src/endpoint_lib/diagnostic.rs deleted file mode 100644 index 3413d0ea46d3..000000000000 --- a/sdk/iotroborunner/src/endpoint_lib/diagnostic.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use std::error::Error; - -/// Diagnostic collector for endpoint resolution -/// -/// Endpoint functions return `Option`—to enable diagnostic information to flow, we capture the -/// last error that occurred. -#[derive(Debug, Default)] -pub(crate) struct DiagnosticCollector { - last_error: Option>, -} - -impl DiagnosticCollector { - #[allow(unused)] - /// Report an error to the collector - pub(crate) fn report_error(&mut self, err: impl Into>) { - self.last_error = Some(err.into()); - } - - #[allow(unused)] - /// Capture a result, returning Some(t) when the input was `Ok` and `None` otherwise - pub(crate) fn capture>>(&mut self, err: Result) -> Option { - match err { - Ok(res) => Some(res), - Err(e) => { - self.report_error(e); - None - } - } - } - - pub(crate) fn take_last_error(&mut self) -> Option> { - self.last_error.take() - } - - /// Create a new diagnostic collector - pub(crate) fn new() -> Self { - Self { last_error: None } - } -} diff --git a/sdk/iotroborunner/src/endpoint_lib/partition.rs b/sdk/iotroborunner/src/endpoint_lib/partition.rs deleted file mode 100644 index 6863e271bc8b..000000000000 --- a/sdk/iotroborunner/src/endpoint_lib/partition.rs +++ /dev/null @@ -1,536 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -//! Partition function to determine a partition for a given region -//! -//! This function supports adding regions dynamically, parsing a JSON file, and builder construction. -//! -//! If, at a future point, this interface stabilizes it is a good candidate for extraction into a -//! shared crate. -use crate::endpoint_lib::diagnostic::DiagnosticCollector; -use crate::endpoint_lib::partition::deser::deserialize_partitions; -use aws_smithy_json::deserialize::error::DeserializeError; -use regex_lite::Regex; -use std::borrow::Cow; -use std::collections::HashMap; - -/// Determine the AWS partition metadata for a given region -#[derive(Clone, Debug, Default)] -pub(crate) struct PartitionResolver { - partitions: Vec, -} - -impl PartitionResolver { - pub(crate) fn from_partitions(partitions: Vec) -> Self { - Self { partitions } - } -} - -/// Partition result returned from partition resolver -pub(crate) struct Partition<'a> { - name: &'a str, - dns_suffix: &'a str, - dual_stack_dns_suffix: &'a str, - supports_fips: bool, - supports_dual_stack: bool, -} - -#[allow(unused)] -impl<'a> Partition<'a> { - pub(crate) fn name(&self) -> &str { - self.name - } - - pub(crate) fn dns_suffix(&self) -> &str { - self.dns_suffix - } - - pub(crate) fn supports_fips(&self) -> bool { - self.supports_fips - } - - pub(crate) fn dual_stack_dns_suffix(&self) -> &str { - self.dual_stack_dns_suffix - } - - pub(crate) fn supports_dual_stack(&self) -> bool { - self.supports_dual_stack - } -} - -static DEFAULT_OVERRIDE: &PartitionOutputOverride = &PartitionOutputOverride { - name: None, - dns_suffix: None, - dual_stack_dns_suffix: None, - supports_fips: None, - supports_dual_stack: None, -}; - -/// Merge the base output and the override output, dealing with `Cow`s -macro_rules! merge { - ($base: expr, $output: expr, $field: ident) => { - $output.$field.as_ref().map(|s| s.as_ref()).unwrap_or($base.outputs.$field.as_ref()) - }; -} - -impl PartitionResolver { - #[allow(unused)] - pub(crate) fn empty() -> PartitionResolver { - PartitionResolver { partitions: vec![] } - } - - #[allow(unused)] - pub(crate) fn add_partition(&mut self, partition: PartitionMetadata) { - self.partitions.push(partition); - } - - pub(crate) fn new_from_json(partition_dot_json: &[u8]) -> Result { - deserialize_partitions(partition_dot_json) - } - - /// Resolve a partition for a given region - /// - /// 1. Enumerate each partition in the `partitions` array, and determine if the identifier to be - /// resolved matches an explicit region listed in the `regions` array for a given partition. - /// If identifier matches, proceed to step 4, otherwise continue to step 2. - /// 2. Enumerate each partition in the `partitions` array, use the regular expression - /// `regionRegex` to determine if the identifier matches the regular expression. If the - /// identifier matches, proceed to step 4, otherwise continue to step 3. - /// 3. If no partition is matched after exhausting step 1 and step 2, then fallback to matching - /// the identifier to the partition where `id == "aws"`, and proceed to step 4. If no `aws` - /// partition is present, return `None`. - /// 4. After matching the identifier to a partition using one of the previous steps, the partition function should return a - /// typed data structure containing the fields in `outputs` in the matched partition. **Important:** If a specific region - /// was matched, the properties associated with that region **MUST** be merged with the `outputs` field. - pub(crate) fn resolve_partition(&self, region: &str, e: &mut DiagnosticCollector) -> Option { - let mut explicit_match_partition = self.partitions.iter().flat_map(|part| part.explicit_match(region)); - let mut regex_match_partition = self.partitions.iter().flat_map(|part| part.regex_match(region)); - - let (base, region_override) = explicit_match_partition.next().or_else(|| regex_match_partition.next()).or_else(|| { - match self.partitions.iter().find(|p| p.id == "aws") { - Some(partition) => Some((partition, None)), - None => { - e.report_error("no AWS partition!"); - None - } - } - })?; - let region_override = region_override.as_ref().unwrap_or(&DEFAULT_OVERRIDE); - Some(Partition { - name: merge!(base, region_override, name), - dns_suffix: merge!(base, region_override, dns_suffix), - dual_stack_dns_suffix: merge!(base, region_override, dual_stack_dns_suffix), - supports_fips: region_override.supports_fips.unwrap_or(base.outputs.supports_fips), - supports_dual_stack: region_override.supports_dual_stack.unwrap_or(base.outputs.supports_dual_stack), - }) - } -} - -type Str = Cow<'static, str>; - -#[derive(Clone, Debug)] -pub(crate) struct PartitionMetadata { - id: Str, - region_regex: Regex, - regions: HashMap, - outputs: PartitionOutput, -} - -#[derive(Default)] -pub(crate) struct PartitionMetadataBuilder { - pub(crate) id: Option, - pub(crate) region_regex: Option, - pub(crate) regions: HashMap, - pub(crate) outputs: Option, -} - -impl PartitionMetadataBuilder { - pub(crate) fn build(self) -> PartitionMetadata { - PartitionMetadata { - id: self.id.expect("id must be defined"), - region_regex: self.region_regex.expect("region regex must be defined"), - regions: self.regions, - outputs: self - .outputs - .expect("outputs must be defined") - .into_partition_output() - .expect("missing fields on outputs"), - } - } -} - -impl PartitionMetadata { - fn explicit_match(&self, region: &str) -> Option<(&PartitionMetadata, Option<&PartitionOutputOverride>)> { - self.regions.get(region).map(|output_override| (self, Some(output_override))) - } - - fn regex_match(&self, region: &str) -> Option<(&PartitionMetadata, Option<&PartitionOutputOverride>)> { - if self.region_regex.is_match(region) { - Some((self, None)) - } else { - None - } - } -} - -#[derive(Clone, Debug)] -pub(crate) struct PartitionOutput { - name: Str, - dns_suffix: Str, - dual_stack_dns_suffix: Str, - supports_fips: bool, - supports_dual_stack: bool, -} - -#[derive(Clone, Debug, Default)] -pub(crate) struct PartitionOutputOverride { - name: Option, - dns_suffix: Option, - dual_stack_dns_suffix: Option, - supports_fips: Option, - supports_dual_stack: Option, -} - -impl PartitionOutputOverride { - pub(crate) fn into_partition_output(self) -> Result> { - Ok(PartitionOutput { - name: self.name.ok_or("missing name")?, - dns_suffix: self.dns_suffix.ok_or("missing dnsSuffix")?, - dual_stack_dns_suffix: self.dual_stack_dns_suffix.ok_or("missing dual_stackDnsSuffix")?, - supports_fips: self.supports_fips.ok_or("missing supports fips")?, - supports_dual_stack: self.supports_dual_stack.ok_or("missing supportsDualstack")?, - }) - } -} - -/// JSON deserializers for partition metadata -/// -/// This code was generated by smithy-rs and then hand edited for clarity -mod deser { - use crate::endpoint_lib::partition::{PartitionMetadata, PartitionMetadataBuilder, PartitionOutputOverride, PartitionResolver}; - use aws_smithy_json::deserialize::token::{expect_bool_or_null, expect_start_object, expect_string_or_null, skip_value}; - use aws_smithy_json::deserialize::{error::DeserializeError, json_token_iter, Token}; - use regex_lite::Regex; - use std::borrow::Cow; - use std::collections::HashMap; - - pub(crate) fn deserialize_partitions(value: &[u8]) -> Result { - let mut tokens_owned = json_token_iter(value).peekable(); - let tokens = &mut tokens_owned; - expect_start_object(tokens.next())?; - let mut resolver = None; - loop { - match tokens.next().transpose()? { - Some(Token::EndObject { .. }) => break, - Some(Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "partitions" => { - resolver = Some(PartitionResolver::from_partitions(deser_partitions(tokens)?)); - } - _ => skip_value(tokens)?, - }, - other => return Err(DeserializeError::custom(format!("expected object key or end object, found: {:?}", other))), - } - } - if tokens.next().is_some() { - return Err(DeserializeError::custom("found more JSON tokens after completing parsing")); - } - resolver.ok_or_else(|| DeserializeError::custom("did not find partitions array")) - } - - fn deser_partitions<'a, I>(tokens: &mut std::iter::Peekable) -> Result, DeserializeError> - where - I: Iterator, DeserializeError>>, - { - match tokens.next().transpose()? { - Some(Token::StartArray { .. }) => { - let mut items = Vec::new(); - loop { - match tokens.peek() { - Some(Ok(Token::EndArray { .. })) => { - tokens.next().transpose().unwrap(); - break; - } - _ => { - items.push(deser_partition(tokens)?); - } - } - } - Ok(items) - } - _ => Err(DeserializeError::custom("expected start array")), - } - } - - pub(crate) fn deser_partition<'a, I>(tokens: &mut std::iter::Peekable) -> Result - where - I: Iterator, DeserializeError>>, - { - match tokens.next().transpose()? { - Some(Token::StartObject { .. }) => { - let mut builder = PartitionMetadataBuilder::default(); - loop { - match tokens.next().transpose()? { - Some(Token::EndObject { .. }) => break, - Some(Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "id" => { - builder.id = token_to_str(tokens.next())?; - } - "regionRegex" => { - builder.region_regex = token_to_str(tokens.next())? - .map(|region_regex| Regex::new(®ion_regex)) - .transpose() - .map_err(|_e| DeserializeError::custom("invalid regex"))?; - } - "regions" => { - builder.regions = deser_explicit_regions(tokens)?; - } - "outputs" => { - builder.outputs = deser_outputs(tokens)?; - } - _ => skip_value(tokens)?, - }, - other => return Err(DeserializeError::custom(format!("expected object key or end object, found: {:?}", other))), - } - } - Ok(builder.build()) - } - _ => Err(DeserializeError::custom("expected start object")), - } - } - - #[allow(clippy::type_complexity, non_snake_case)] - pub(crate) fn deser_explicit_regions<'a, I>( - tokens: &mut std::iter::Peekable, - ) -> Result, DeserializeError> - where - I: Iterator, DeserializeError>>, - { - match tokens.next().transpose()? { - Some(Token::StartObject { .. }) => { - let mut map = HashMap::new(); - loop { - match tokens.next().transpose()? { - Some(Token::EndObject { .. }) => break, - Some(Token::ObjectKey { key, .. }) => { - let key = key.to_unescaped().map(|u| u.into_owned())?; - let value = deser_outputs(tokens)?; - if let Some(value) = value { - map.insert(key.into(), value); - } - } - other => return Err(DeserializeError::custom(format!("expected object key or end object, found: {:?}", other))), - } - } - Ok(map) - } - _ => Err(DeserializeError::custom("expected start object")), - } - } - - /// Convert a token to `Str` (a potentially static String) - fn token_to_str(token: Option>) -> Result, DeserializeError> { - Ok(expect_string_or_null(token)? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()? - .map(Cow::Owned)) - } - - fn deser_outputs<'a, I>(tokens: &mut std::iter::Peekable) -> Result, DeserializeError> - where - I: Iterator, DeserializeError>>, - { - match tokens.next().transpose()? { - Some(Token::StartObject { .. }) => { - #[allow(unused_mut)] - let mut builder = PartitionOutputOverride::default(); - loop { - match tokens.next().transpose()? { - Some(Token::EndObject { .. }) => break, - Some(Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "name" => { - builder.name = token_to_str(tokens.next())?; - } - "dnsSuffix" => { - builder.dns_suffix = token_to_str(tokens.next())?; - } - "dualStackDnsSuffix" => { - builder.dual_stack_dns_suffix = token_to_str(tokens.next())?; - } - "supportsFIPS" => { - builder.supports_fips = expect_bool_or_null(tokens.next())?; - } - "supportsDualStack" => { - builder.supports_dual_stack = expect_bool_or_null(tokens.next())?; - } - _ => skip_value(tokens)?, - }, - other => return Err(DeserializeError::custom(format!("expected object key or end object, found: {:?}", other))), - } - } - Ok(Some(builder)) - } - _ => Err(DeserializeError::custom("expected start object")), - } - } -} - -#[cfg(test)] -mod test { - use crate::endpoint_lib::diagnostic::DiagnosticCollector; - use crate::endpoint_lib::partition::{Partition, PartitionMetadata, PartitionOutput, PartitionOutputOverride, PartitionResolver}; - use regex_lite::Regex; - use std::collections::HashMap; - - fn resolve<'a>(resolver: &'a PartitionResolver, region: &str) -> Partition<'a> { - resolver - .resolve_partition(region, &mut DiagnosticCollector::new()) - .expect("could not resolve partition") - } - - #[test] - fn deserialize_partitions() { - let partitions = r#"{ - "version": "1.1", - "partitions": [ - { - "id": "aws", - "regionRegex": "^(us|eu|ap|sa|ca|me|af)-\\w+-\\d+$", - "regions": { - "af-south-1": {}, - "af-east-1": {}, - "ap-northeast-1": {}, - "ap-northeast-2": {}, - "ap-northeast-3": {}, - "ap-south-1": {}, - "ap-southeast-1": {}, - "ap-southeast-2": {}, - "ap-southeast-3": {}, - "ca-central-1": {}, - "eu-central-1": {}, - "eu-north-1": {}, - "eu-south-1": {}, - "eu-west-1": {}, - "eu-west-2": {}, - "eu-west-3": {}, - "me-south-1": {}, - "sa-east-1": {}, - "us-east-1": {}, - "us-east-2": {}, - "us-west-1": {}, - "us-west-2": {}, - "aws-global": {} - }, - "outputs": { - "name": "aws", - "dnsSuffix": "amazonaws.com", - "dualStackDnsSuffix": "api.aws", - "supportsFIPS": true, - "supportsDualStack": true - } - }, - { - "id": "aws-us-gov", - "regionRegex": "^us\\-gov\\-\\w+\\-\\d+$", - "regions": { - "us-gov-west-1": {}, - "us-gov-east-1": {}, - "aws-us-gov-global": {} - }, - "outputs": { - "name": "aws-us-gov", - "dnsSuffix": "amazonaws.com", - "dualStackDnsSuffix": "api.aws", - "supportsFIPS": true, - "supportsDualStack": true - } - }, - { - "id": "aws-cn", - "regionRegex": "^cn\\-\\w+\\-\\d+$", - "regions": { - "cn-north-1": {}, - "cn-northwest-1": {}, - "aws-cn-global": {} - }, - "outputs": { - "name": "aws-cn", - "dnsSuffix": "amazonaws.com.cn", - "dualStackDnsSuffix": "api.amazonwebservices.com.cn", - "supportsFIPS": true, - "supportsDualStack": true - } - }, - { - "id": "aws-iso", - "regionRegex": "^us\\-iso\\-\\w+\\-\\d+$", - "outputs": { - "name": "aws-iso", - "dnsSuffix": "c2s.ic.gov", - "supportsFIPS": true, - "supportsDualStack": false, - "dualStackDnsSuffix": "c2s.ic.gov" - }, - "regions": {} - }, - { - "id": "aws-iso-b", - "regionRegex": "^us\\-isob\\-\\w+\\-\\d+$", - "outputs": { - "name": "aws-iso-b", - "dnsSuffix": "sc2s.sgov.gov", - "supportsFIPS": true, - "supportsDualStack": false, - "dualStackDnsSuffix": "sc2s.sgov.gov" - }, - "regions": {} - } - ] -}"#; - let resolver = super::deser::deserialize_partitions(partitions.as_bytes()).expect("valid resolver"); - assert_eq!(resolve(&resolver, "cn-north-1").name, "aws-cn"); - assert_eq!(resolve(&resolver, "cn-north-1").dns_suffix, "amazonaws.com.cn"); - assert_eq!(resolver.partitions.len(), 5); - } - - #[test] - fn resolve_partitions() { - let mut resolver = PartitionResolver::empty(); - let new_suffix = PartitionOutputOverride { - dns_suffix: Some("mars.aws".into()), - ..Default::default() - }; - resolver.add_partition(PartitionMetadata { - id: "aws".into(), - region_regex: Regex::new("^(us|eu|ap|sa|ca|me|af)-\\w+-\\d+$").unwrap(), - regions: HashMap::from([("mars-east-2".into(), new_suffix)]), - outputs: PartitionOutput { - name: "aws".into(), - dns_suffix: "amazonaws.com".into(), - dual_stack_dns_suffix: "api.aws".into(), - supports_fips: true, - supports_dual_stack: true, - }, - }); - resolver.add_partition(PartitionMetadata { - id: "other".into(), - region_regex: Regex::new("^(other)-\\w+-\\d+$").unwrap(), - regions: Default::default(), - outputs: PartitionOutput { - name: "other".into(), - dns_suffix: "other.amazonaws.com".into(), - dual_stack_dns_suffix: "other.aws".into(), - supports_fips: false, - supports_dual_stack: true, - }, - }); - assert_eq!(resolve(&resolver, "us-east-1").name, "aws"); - assert_eq!(resolve(&resolver, "other-west-2").name, "other"); - // mars-east-1 hits aws through the default fallback - assert_eq!(resolve(&resolver, "mars-east-1").dns_suffix, "amazonaws.com"); - // mars-east-2 hits aws through the region override - assert_eq!(resolve(&resolver, "mars-east-2").dns_suffix, "mars.aws"); - } -} diff --git a/sdk/iotroborunner/src/error.rs b/sdk/iotroborunner/src/error.rs deleted file mode 100644 index 25b0dd73f8ca..000000000000 --- a/sdk/iotroborunner/src/error.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_smithy_runtime_api::box_error::BoxError; - -/// Error type returned by the client. -pub type SdkError = ::aws_smithy_runtime_api::client::result::SdkError; -pub use ::aws_smithy_runtime_api::client::result::ConnectorError; -pub use ::aws_smithy_types::error::operation::BuildError; - -pub use ::aws_smithy_types::error::display::DisplayErrorContext; -pub use ::aws_smithy_types::error::metadata::ErrorMetadata; -pub use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - -/// The given enum value failed to parse since it is not a known value. -#[derive(Debug)] -pub struct UnknownVariantError { - value: ::std::string::String, -} -impl UnknownVariantError { - pub(crate) fn new(value: impl ::std::convert::Into<::std::string::String>) -> Self { - Self { value: value.into() } - } -} -impl ::std::fmt::Display for UnknownVariantError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::result::Result<(), ::std::fmt::Error> { - write!(f, "unknown enum variant: '{}'", self.value) - } -} -impl ::std::error::Error for UnknownVariantError {} - -pub(crate) mod sealed_unhandled; diff --git a/sdk/iotroborunner/src/error/sealed_unhandled.rs b/sdk/iotroborunner/src/error/sealed_unhandled.rs deleted file mode 100644 index 357c3ccc4c9a..000000000000 --- a/sdk/iotroborunner/src/error/sealed_unhandled.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// This struct is not intended to be used. -/// -/// This struct holds information about an unhandled error, -/// but that information should be obtained by using the -/// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait -/// on the error type. -/// -/// This struct intentionally doesn't yield any useful information itself. -#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ -variable wildcard pattern and check `.code()`: - \ -   `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ -See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error.")] -#[derive(Debug)] -pub struct Unhandled { - pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, - pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, -} diff --git a/sdk/iotroborunner/src/error_meta.rs b/sdk/iotroborunner/src/error_meta.rs deleted file mode 100644 index 80aa4fdc9a97..000000000000 --- a/sdk/iotroborunner/src/error_meta.rs +++ /dev/null @@ -1,638 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// All possible error types for this service. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum Error { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed. - ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl ::std::fmt::Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Error::AccessDeniedException(inner) => inner.fmt(f), - Error::ConflictException(inner) => inner.fmt(f), - Error::InternalServerException(inner) => inner.fmt(f), - Error::ResourceNotFoundException(inner) => inner.fmt(f), - Error::ServiceQuotaExceededException(inner) => inner.fmt(f), - Error::ThrottlingException(inner) => inner.fmt(f), - Error::ValidationException(inner) => inner.fmt(f), - Error::Unhandled(_) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl From<::aws_smithy_types::error::operation::BuildError> for Error { - fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self { - Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: value.into(), - meta: ::std::default::Default::default(), - }) - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error { - fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata { - match self { - Self::AccessDeniedException(inner) => inner.meta(), - Self::ConflictException(inner) => inner.meta(), - Self::InternalServerException(inner) => inner.meta(), - Self::ResourceNotFoundException(inner) => inner.meta(), - Self::ServiceQuotaExceededException(inner) => inner.meta(), - Self::ThrottlingException(inner) => inner.meta(), - Self::ValidationException(inner) => inner.meta(), - Self::Unhandled(inner) => &inner.meta, - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::create_destination::CreateDestinationError) -> Self { - match err { - crate::operation::create_destination::CreateDestinationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::create_destination::CreateDestinationError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::create_destination::CreateDestinationError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::create_destination::CreateDestinationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::create_destination::CreateDestinationError::ServiceQuotaExceededException(inner) => { - Error::ServiceQuotaExceededException(inner) - } - crate::operation::create_destination::CreateDestinationError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::create_destination::CreateDestinationError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::create_destination::CreateDestinationError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::create_site::CreateSiteError) -> Self { - match err { - crate::operation::create_site::CreateSiteError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::create_site::CreateSiteError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::create_site::CreateSiteError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::create_site::CreateSiteError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner), - crate::operation::create_site::CreateSiteError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::create_site::CreateSiteError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::create_site::CreateSiteError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::create_worker::CreateWorkerError) -> Self { - match err { - crate::operation::create_worker::CreateWorkerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::create_worker::CreateWorkerError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::create_worker::CreateWorkerError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::create_worker::CreateWorkerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::create_worker::CreateWorkerError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner), - crate::operation::create_worker::CreateWorkerError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::create_worker::CreateWorkerError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::create_worker::CreateWorkerError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::create_worker_fleet::CreateWorkerFleetError) -> Self { - match err { - crate::operation::create_worker_fleet::CreateWorkerFleetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::create_worker_fleet::CreateWorkerFleetError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::create_worker_fleet::CreateWorkerFleetError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::create_worker_fleet::CreateWorkerFleetError::ResourceNotFoundException(inner) => { - Error::ResourceNotFoundException(inner) - } - crate::operation::create_worker_fleet::CreateWorkerFleetError::ServiceQuotaExceededException(inner) => { - Error::ServiceQuotaExceededException(inner) - } - crate::operation::create_worker_fleet::CreateWorkerFleetError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::create_worker_fleet::CreateWorkerFleetError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::create_worker_fleet::CreateWorkerFleetError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::delete_destination::DeleteDestinationError) -> Self { - match err { - crate::operation::delete_destination::DeleteDestinationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::delete_destination::DeleteDestinationError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::delete_destination::DeleteDestinationError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::delete_destination::DeleteDestinationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::delete_destination::DeleteDestinationError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::delete_destination::DeleteDestinationError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::delete_destination::DeleteDestinationError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::delete_site::DeleteSiteError) -> Self { - match err { - crate::operation::delete_site::DeleteSiteError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::delete_site::DeleteSiteError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::delete_site::DeleteSiteError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::delete_site::DeleteSiteError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::delete_site::DeleteSiteError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::delete_site::DeleteSiteError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::delete_site::DeleteSiteError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::delete_worker::DeleteWorkerError) -> Self { - match err { - crate::operation::delete_worker::DeleteWorkerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::delete_worker::DeleteWorkerError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::delete_worker::DeleteWorkerError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::delete_worker::DeleteWorkerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::delete_worker::DeleteWorkerError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::delete_worker::DeleteWorkerError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::delete_worker::DeleteWorkerError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::delete_worker_fleet::DeleteWorkerFleetError) -> Self { - match err { - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ConflictException(inner) => Error::ConflictException(inner), - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ResourceNotFoundException(inner) => { - Error::ResourceNotFoundException(inner) - } - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::delete_worker_fleet::DeleteWorkerFleetError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::get_destination::GetDestinationError) -> Self { - match err { - crate::operation::get_destination::GetDestinationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::get_destination::GetDestinationError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::get_destination::GetDestinationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::get_destination::GetDestinationError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::get_destination::GetDestinationError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::get_destination::GetDestinationError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::get_site::GetSiteError) -> Self { - match err { - crate::operation::get_site::GetSiteError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::get_site::GetSiteError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::get_site::GetSiteError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::get_site::GetSiteError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::get_site::GetSiteError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::get_site::GetSiteError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::get_worker::GetWorkerError) -> Self { - match err { - crate::operation::get_worker::GetWorkerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::get_worker::GetWorkerError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::get_worker::GetWorkerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::get_worker::GetWorkerError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::get_worker::GetWorkerError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::get_worker::GetWorkerError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::get_worker_fleet::GetWorkerFleetError) -> Self { - match err { - crate::operation::get_worker_fleet::GetWorkerFleetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::get_worker_fleet::GetWorkerFleetError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::get_worker_fleet::GetWorkerFleetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::get_worker_fleet::GetWorkerFleetError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::get_worker_fleet::GetWorkerFleetError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::get_worker_fleet::GetWorkerFleetError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::list_destinations::ListDestinationsError) -> Self { - match err { - crate::operation::list_destinations::ListDestinationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::list_destinations::ListDestinationsError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::list_destinations::ListDestinationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::list_destinations::ListDestinationsError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::list_destinations::ListDestinationsError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::list_destinations::ListDestinationsError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::list_sites::ListSitesError) -> Self { - match err { - crate::operation::list_sites::ListSitesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::list_sites::ListSitesError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::list_sites::ListSitesError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::list_sites::ListSitesError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::list_sites::ListSitesError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::list_worker_fleets::ListWorkerFleetsError) -> Self { - match err { - crate::operation::list_worker_fleets::ListWorkerFleetsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::list_worker_fleets::ListWorkerFleetsError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::list_worker_fleets::ListWorkerFleetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::list_worker_fleets::ListWorkerFleetsError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::list_worker_fleets::ListWorkerFleetsError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::list_worker_fleets::ListWorkerFleetsError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::list_workers::ListWorkersError) -> Self { - match err { - crate::operation::list_workers::ListWorkersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::list_workers::ListWorkersError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::list_workers::ListWorkersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::list_workers::ListWorkersError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::list_workers::ListWorkersError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::list_workers::ListWorkersError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::update_destination::UpdateDestinationError) -> Self { - match err { - crate::operation::update_destination::UpdateDestinationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::update_destination::UpdateDestinationError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::update_destination::UpdateDestinationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::update_destination::UpdateDestinationError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::update_destination::UpdateDestinationError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::update_destination::UpdateDestinationError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::update_site::UpdateSiteError) -> Self { - match err { - crate::operation::update_site::UpdateSiteError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::update_site::UpdateSiteError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::update_site::UpdateSiteError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::update_site::UpdateSiteError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::update_site::UpdateSiteError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::update_site::UpdateSiteError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::update_worker::UpdateWorkerError) -> Self { - match err { - crate::operation::update_worker::UpdateWorkerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::update_worker::UpdateWorkerError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::update_worker::UpdateWorkerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner), - crate::operation::update_worker::UpdateWorkerError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::update_worker::UpdateWorkerError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::update_worker::UpdateWorkerError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error -where - R: Send + Sync + std::fmt::Debug + 'static, -{ - fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { - match err { - ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), - _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { - meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), - source: err.into(), - }), - } - } -} -impl From for Error { - fn from(err: crate::operation::update_worker_fleet::UpdateWorkerFleetError) -> Self { - match err { - crate::operation::update_worker_fleet::UpdateWorkerFleetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner), - crate::operation::update_worker_fleet::UpdateWorkerFleetError::InternalServerException(inner) => Error::InternalServerException(inner), - crate::operation::update_worker_fleet::UpdateWorkerFleetError::ResourceNotFoundException(inner) => { - Error::ResourceNotFoundException(inner) - } - crate::operation::update_worker_fleet::UpdateWorkerFleetError::ThrottlingException(inner) => Error::ThrottlingException(inner), - crate::operation::update_worker_fleet::UpdateWorkerFleetError::ValidationException(inner) => Error::ValidationException(inner), - crate::operation::update_worker_fleet::UpdateWorkerFleetError::Unhandled(inner) => Error::Unhandled(inner), - } - } -} -impl ::std::error::Error for Error { - fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Error::AccessDeniedException(inner) => inner.source(), - Error::ConflictException(inner) => inner.source(), - Error::InternalServerException(inner) => inner.source(), - Error::ResourceNotFoundException(inner) => inner.source(), - Error::ServiceQuotaExceededException(inner) => inner.source(), - Error::ThrottlingException(inner) => inner.source(), - Error::ValidationException(inner) => inner.source(), - Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source), - } - } -} -impl ::aws_types::request_id::RequestId for Error { - fn request_id(&self) -> Option<&str> { - match self { - Self::AccessDeniedException(e) => e.request_id(), - Self::ConflictException(e) => e.request_id(), - Self::InternalServerException(e) => e.request_id(), - Self::ResourceNotFoundException(e) => e.request_id(), - Self::ServiceQuotaExceededException(e) => e.request_id(), - Self::ThrottlingException(e) => e.request_id(), - Self::ValidationException(e) => e.request_id(), - Self::Unhandled(e) => e.meta.request_id(), - } - } -} diff --git a/sdk/iotroborunner/src/idempotency_token.rs b/sdk/iotroborunner/src/idempotency_token.rs deleted file mode 100644 index ea19dae3f738..000000000000 --- a/sdk/iotroborunner/src/idempotency_token.rs +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use aws_smithy_types::config_bag::{Storable, StoreReplace}; -use std::sync::Mutex; - -pub(crate) fn uuid_v4(input: u128) -> String { - let mut out = String::with_capacity(36); - // u4-aligned index into [input] - let mut rnd_idx: u8 = 0; - const HEX_CHARS: &[u8; 16] = b"0123456789abcdef"; - - for str_idx in 0..36 { - if str_idx == 8 || str_idx == 13 || str_idx == 18 || str_idx == 23 { - out.push('-'); - // UUID version character - } else if str_idx == 14 { - out.push('4'); - } else { - let mut dat: u8 = ((input >> (rnd_idx * 4)) & 0x0F) as u8; - // UUID variant bits - if str_idx == 19 { - dat |= 0b00001000; - } - rnd_idx += 1; - out.push(HEX_CHARS[dat as usize] as char); - } - } - out -} - -/// IdempotencyTokenProvider generates idempotency tokens for idempotent API requests -/// -/// Generally, customers will not need to interact with this at all. A sensible default will be -/// provided automatically during config construction. However, if you need deterministic behavior -/// for testing, two options are available: -/// 1. Utilize the From<&'static str>` implementation to hard code an idempotency token -/// 2. Seed the token provider with [`IdempotencyTokenProvider::with_seed`](IdempotencyTokenProvider::with_seed) -#[derive(Debug)] -pub struct IdempotencyTokenProvider { - inner: Inner, -} - -#[derive(Debug)] -enum Inner { - Static(&'static str), - Random(Mutex), -} - -pub fn default_provider() -> IdempotencyTokenProvider { - IdempotencyTokenProvider::random() -} - -impl From<&'static str> for IdempotencyTokenProvider { - fn from(token: &'static str) -> Self { - Self::fixed(token) - } -} - -impl Storable for IdempotencyTokenProvider { - type Storer = StoreReplace; -} - -impl IdempotencyTokenProvider { - pub fn make_idempotency_token(&self) -> String { - match &self.inner { - Inner::Static(token) => token.to_string(), - Inner::Random(rng) => { - let input: u128 = rng.lock().unwrap().u128(..); - uuid_v4(input) - } - } - } - - pub fn with_seed(seed: u64) -> Self { - Self { - inner: Inner::Random(Mutex::new(fastrand::Rng::with_seed(seed))), - } - } - - pub fn random() -> Self { - Self { - inner: Inner::Random(Mutex::new(fastrand::Rng::new())), - } - } - - pub fn fixed(token: &'static str) -> Self { - Self { inner: Inner::Static(token) } - } -} - -impl Clone for IdempotencyTokenProvider { - fn clone(&self) -> Self { - match &self.inner { - Inner::Static(token) => IdempotencyTokenProvider::fixed(token), - Inner::Random(_) => IdempotencyTokenProvider::random(), - } - } -} diff --git a/sdk/iotroborunner/src/json_errors.rs b/sdk/iotroborunner/src/json_errors.rs deleted file mode 100644 index 4ff5b0fa4f3d..000000000000 --- a/sdk/iotroborunner/src/json_errors.rs +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -use aws_smithy_json::deserialize::token::skip_value; -use aws_smithy_json::deserialize::{error::DeserializeError, json_token_iter, Token}; -use aws_smithy_runtime_api::http::Headers; -use aws_smithy_types::error::metadata::{Builder as ErrorMetadataBuilder, ErrorMetadata}; -use std::borrow::Cow; - -// currently only used by AwsJson -#[allow(unused)] -pub fn is_error(response: &http::Response) -> bool { - !response.status().is_success() -} - -fn sanitize_error_code(error_code: &str) -> &str { - // Trim a trailing URL from the error code, beginning with a `:` - let error_code = match error_code.find(':') { - Some(idx) => &error_code[..idx], - None => error_code, - }; - - // Trim a prefixing namespace from the error code, beginning with a `#` - match error_code.find('#') { - Some(idx) => &error_code[idx + 1..], - None => error_code, - } -} - -struct ErrorBody<'a> { - code: Option>, - message: Option>, -} - -fn parse_error_body(bytes: &[u8]) -> Result { - let mut tokens = json_token_iter(bytes).peekable(); - let (mut typ, mut code, mut message) = (None, None, None); - if let Some(Token::StartObject { .. }) = tokens.next().transpose()? { - loop { - match tokens.next().transpose()? { - Some(Token::EndObject { .. }) => break, - Some(Token::ObjectKey { key, .. }) => { - if let Some(Ok(Token::ValueString { value, .. })) = tokens.peek() { - match key.as_escaped_str() { - "code" => code = Some(value.to_unescaped()?), - "__type" => typ = Some(value.to_unescaped()?), - "message" | "Message" | "errorMessage" => message = Some(value.to_unescaped()?), - _ => {} - } - } - skip_value(&mut tokens)?; - } - _ => return Err(DeserializeError::custom("expected object key or end object")), - } - } - if tokens.next().is_some() { - return Err(DeserializeError::custom("found more JSON tokens after completing parsing")); - } - } - Ok(ErrorBody { code: code.or(typ), message }) -} - -pub fn parse_error_metadata(payload: &[u8], headers: &Headers) -> Result { - let ErrorBody { code, message } = parse_error_body(payload)?; - - let mut err_builder = ErrorMetadata::builder(); - if let Some(code) = headers.get("x-amzn-errortype").or(code.as_deref()).map(sanitize_error_code) { - err_builder = err_builder.code(code); - } - if let Some(message) = message { - err_builder = err_builder.message(message); - } - Ok(err_builder) -} - -#[cfg(test)] -mod test { - use crate::json_errors::{parse_error_body, parse_error_metadata, sanitize_error_code}; - use aws_smithy_runtime_api::client::orchestrator::HttpResponse; - use aws_smithy_types::{body::SdkBody, error::ErrorMetadata}; - use std::borrow::Cow; - - #[test] - fn error_metadata() { - let response = HttpResponse::try_from( - http::Response::builder() - .body(SdkBody::from(r#"{ "__type": "FooError", "message": "Go to foo" }"#)) - .unwrap(), - ) - .unwrap(); - assert_eq!( - parse_error_metadata(response.body().bytes().unwrap(), response.headers()) - .unwrap() - .build(), - ErrorMetadata::builder().code("FooError").message("Go to foo").build() - ) - } - - #[test] - fn error_type() { - assert_eq!( - Some(Cow::Borrowed("FooError")), - parse_error_body(br#"{ "__type": "FooError" }"#).unwrap().code - ); - } - - #[test] - fn code_takes_priority() { - assert_eq!( - Some(Cow::Borrowed("BarError")), - parse_error_body(br#"{ "code": "BarError", "__type": "FooError" }"#).unwrap().code - ); - } - - #[test] - fn ignore_unrecognized_fields() { - assert_eq!( - Some(Cow::Borrowed("FooError")), - parse_error_body(br#"{ "__type": "FooError", "asdf": 5, "fdsa": {}, "foo": "1" }"#) - .unwrap() - .code - ); - } - - #[test] - fn sanitize_namespace_and_url() { - assert_eq!( - sanitize_error_code("aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"), - "FooError" - ); - } - - #[test] - fn sanitize_noop() { - assert_eq!(sanitize_error_code("FooError"), "FooError"); - } - - #[test] - fn sanitize_url() { - assert_eq!( - sanitize_error_code("FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/"), - "FooError" - ); - } - - #[test] - fn sanitize_namespace() { - assert_eq!(sanitize_error_code("aws.protocoltests.restjson#FooError"), "FooError"); - } - - // services like lambda use an alternate `Message` instead of `message` - #[test] - fn alternative_error_message_names() { - let response = HttpResponse::try_from( - http::Response::builder() - .header("x-amzn-errortype", "ResourceNotFoundException") - .body(SdkBody::from( - r#"{ - "Type": "User", - "Message": "Functions from 'us-west-2' are not reachable from us-east-1" - }"#, - )) - .unwrap(), - ) - .unwrap(); - assert_eq!( - parse_error_metadata(response.body().bytes().unwrap(), response.headers()) - .unwrap() - .build(), - ErrorMetadata::builder() - .code("ResourceNotFoundException") - .message("Functions from 'us-west-2' are not reachable from us-east-1") - .build() - ); - } -} diff --git a/sdk/iotroborunner/src/lens.rs b/sdk/iotroborunner/src/lens.rs deleted file mode 100644 index 04e169f29797..000000000000 --- a/sdk/iotroborunner/src/lens.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn reflens_list_destinations_output_output_next_token( - input: &crate::operation::list_destinations::ListDestinationsOutput, -) -> ::std::option::Option<&::std::string::String> { - let input = match &input.next_token { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn reflens_list_sites_output_output_next_token( - input: &crate::operation::list_sites::ListSitesOutput, -) -> ::std::option::Option<&::std::string::String> { - let input = match &input.next_token { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn reflens_list_worker_fleets_output_output_next_token( - input: &crate::operation::list_worker_fleets::ListWorkerFleetsOutput, -) -> ::std::option::Option<&::std::string::String> { - let input = match &input.next_token { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn reflens_list_workers_output_output_next_token( - input: &crate::operation::list_workers::ListWorkersOutput, -) -> ::std::option::Option<&::std::string::String> { - let input = match &input.next_token { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn lens_list_destinations_output_output_destinations( - input: crate::operation::list_destinations::ListDestinationsOutput, -) -> ::std::option::Option<::std::vec::Vec> { - let input = match input.destinations { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn lens_list_sites_output_output_sites( - input: crate::operation::list_sites::ListSitesOutput, -) -> ::std::option::Option<::std::vec::Vec> { - let input = match input.sites { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn lens_list_worker_fleets_output_output_worker_fleets( - input: crate::operation::list_worker_fleets::ListWorkerFleetsOutput, -) -> ::std::option::Option<::std::vec::Vec> { - let input = match input.worker_fleets { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} - -pub(crate) fn lens_list_workers_output_output_workers( - input: crate::operation::list_workers::ListWorkersOutput, -) -> ::std::option::Option<::std::vec::Vec> { - let input = match input.workers { - ::std::option::Option::None => return ::std::option::Option::None, - ::std::option::Option::Some(t) => t, - }; - ::std::option::Option::Some(input) -} diff --git a/sdk/iotroborunner/src/lib.rs b/sdk/iotroborunner/src/lib.rs deleted file mode 100644 index a87a9769bdf8..000000000000 --- a/sdk/iotroborunner/src/lib.rs +++ /dev/null @@ -1,206 +0,0 @@ -#![allow(deprecated)] -#![allow(unknown_lints)] -#![allow(clippy::module_inception)] -#![allow(clippy::upper_case_acronyms)] -#![allow(clippy::large_enum_variant)] -#![allow(clippy::wrong_self_convention)] -#![allow(clippy::should_implement_trait)] -#![allow(clippy::disallowed_names)] -#![allow(clippy::vec_init_then_push)] -#![allow(clippy::type_complexity)] -#![allow(clippy::needless_return)] -#![allow(clippy::derive_partial_eq_without_eq)] -#![allow(clippy::result_large_err)] -#![allow(clippy::unnecessary_map_on_constructor)] -#![allow(rustdoc::bare_urls)] -#![allow(rustdoc::redundant_explicit_links)] -#![warn(missing_docs)] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] -//! An example service, deployed with the Octane Service creator, which will echo the string -//! -//! ## Getting Started -//! -//! > Examples are available for many services and operations, check out the -//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples). -//! -//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio) -//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-iotroborunner` to -//! your project, add the following to your **Cargo.toml** file: -//! -//! ```toml -//! [dependencies] -//! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-iotroborunner = "1.17.0" -//! tokio = { version = "1", features = ["full"] } -//! ``` -//! -//! Then in code, a client can be created with the following: -//! -//! ```rust,no_run -//! use aws_sdk_iotroborunner as iotroborunner; -//! -//! #[::tokio::main] -//! async fn main() -> Result<(), iotroborunner::Error> { -//! let config = aws_config::load_from_env().await; -//! let client = aws_sdk_iotroborunner::Client::new(&config); -//! -//! // ... make some calls with the client -//! -//! Ok(()) -//! } -//! ``` -//! -//! See the [client documentation](https://docs.rs/aws-sdk-iotroborunner/latest/aws_sdk_iotroborunner/client/struct.Client.html) -//! for information on what calls can be made, and the inputs and outputs for each of those calls. -//! -//! ## Using the SDK -//! -//! Until the SDK is released, we will be adding information about using the SDK to the -//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest -//! additional sections for the guide by opening an issue and describing what you are trying to do. -//! -//! ## Getting Help -//! -//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions -//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests -//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/) -//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples) -//! -//! -//! # Crate Organization -//! -//! The entry point for most customers will be [`Client`], which exposes one method for each API -//! offered by AWS IoT RoboRunner. The return value of each of these methods is a "fluent builder", -//! where the different inputs for that API are added by builder-style function call chaining, -//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in -//! either a successful output or a [`SdkError`](crate::error::SdkError). -//! -//! Some of these API inputs may be structs or enums to provide more complex structured information. -//! These structs and enums live in [`types`](crate::types). There are some simpler types for -//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives). -//! -//! All types required to configure a client via the [`Config`](crate::Config) struct live -//! in [`config`](crate::config). -//! -//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule -//! is the input, output, and error type for that API, as well as builders to construct each of those. -//! -//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the -//! client can return. Any other error type can be converted to this `Error` type via the -//! [`From`](std::convert::From) trait. -//! -//! The other modules within this crate are not required for normal usage. - -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use error_meta::Error; - -#[doc(inline)] -pub use config::Config; - -/// Client for calling AWS IoT RoboRunner. -/// ## Constructing a `Client` -/// -/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`] -/// crate should be used to automatically resolve this config using -/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared -/// across multiple different AWS SDK clients. This config resolution process can be customized -/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses -/// the [builder pattern] to customize the default config. -/// -/// In the simplest case, creating a client looks as follows: -/// ```rust,no_run -/// # async fn wrapper() { -/// let config = aws_config::load_from_env().await; -/// let client = aws_sdk_iotroborunner::Client::new(&config); -/// # } -/// ``` -/// -/// Occasionally, SDKs may have additional service-specific values that can be set on the [`Config`] that -/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired. -/// The [`Config`] struct implements `From<&SdkConfig>`, so setting these specific settings can be -/// done as follows: -/// -/// ```rust,no_run -/// # async fn wrapper() { -/// let sdk_config = ::aws_config::load_from_env().await; -/// let config = aws_sdk_iotroborunner::config::Builder::from(&sdk_config) -/// # /* -/// .some_service_specific_setting("value") -/// # */ -/// .build(); -/// # } -/// ``` -/// -/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration. -/// -/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should -/// be done once at application start-up. -/// -/// [`Config`]: crate::Config -/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html -/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html -/// [`aws-config` docs]: https://docs.rs/aws-config/* -/// [`aws-config`]: https://crates.io/crates/aws-config -/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html -/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html -/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder -/// # Using the `Client` -/// -/// A client has a function for every operation that can be performed by the service. -/// For example, the [`CreateWorker`](crate::operation::create_worker) operation has -/// a [`Client::create_worker`], function which returns a builder for that operation. -/// The fluent builder ultimately has a `send()` function that returns an async future that -/// returns a result, as illustrated below: -/// -/// ```rust,ignore -/// let result = client.create_worker() -/// .client_token("example") -/// .send() -/// .await; -/// ``` -/// -/// The underlying HTTP requests that get made by this can be modified with the `customize_operation` -/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more -/// information. -pub mod client; - -/// Configuration for AWS IoT RoboRunner. -pub mod config; - -/// Common errors and error handling utilities. -pub mod error; - -mod error_meta; - -/// Information about this crate. -pub mod meta; - -/// All operations that this crate can perform. -pub mod operation; - -/// Primitives such as `Blob` or `DateTime` used by other types. -pub mod primitives; - -/// Data structures used by operation inputs/outputs. -pub mod types; - -mod auth_plugin; - -pub(crate) mod client_idempotency_token; - -mod idempotency_token; - -pub(crate) mod protocol_serde; - -mod serialization_settings; - -mod endpoint_lib; - -mod lens; - -mod serde_util; - -mod json_errors; - -#[doc(inline)] -pub use client::Client; diff --git a/sdk/iotroborunner/src/meta.rs b/sdk/iotroborunner/src/meta.rs deleted file mode 100644 index 2d6a3f7d3d4c..000000000000 --- a/sdk/iotroborunner/src/meta.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = - ::aws_runtime::user_agent::ApiMetadata::new("iotroborunner", crate::meta::PKG_VERSION); - -/// Crate version number. -pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/sdk/iotroborunner/src/operation.rs b/sdk/iotroborunner/src/operation.rs deleted file mode 100644 index 7a86e8e0de2a..000000000000 --- a/sdk/iotroborunner/src/operation.rs +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_types::request_id::RequestId; - -/// Types for the `CreateDestination` operation. -pub mod create_destination; - -/// Types for the `CreateSite` operation. -pub mod create_site; - -/// Types for the `CreateWorker` operation. -pub mod create_worker; - -/// Types for the `CreateWorkerFleet` operation. -pub mod create_worker_fleet; - -/// Types for the `DeleteDestination` operation. -pub mod delete_destination; - -/// Types for the `DeleteSite` operation. -pub mod delete_site; - -/// Types for the `DeleteWorker` operation. -pub mod delete_worker; - -/// Types for the `DeleteWorkerFleet` operation. -pub mod delete_worker_fleet; - -/// Types for the `GetDestination` operation. -pub mod get_destination; - -/// Types for the `GetSite` operation. -pub mod get_site; - -/// Types for the `GetWorker` operation. -pub mod get_worker; - -/// Types for the `GetWorkerFleet` operation. -pub mod get_worker_fleet; - -/// Types for the `ListDestinations` operation. -pub mod list_destinations; - -/// Types for the `ListSites` operation. -pub mod list_sites; - -/// Types for the `ListWorkerFleets` operation. -pub mod list_worker_fleets; - -/// Types for the `ListWorkers` operation. -pub mod list_workers; - -/// Types for the `UpdateDestination` operation. -pub mod update_destination; - -/// Types for the `UpdateSite` operation. -pub mod update_site; - -/// Types for the `UpdateWorker` operation. -pub mod update_worker; - -/// Types for the `UpdateWorkerFleet` operation. -pub mod update_worker_fleet; diff --git a/sdk/iotroborunner/src/operation/create_destination.rs b/sdk/iotroborunner/src/operation/create_destination.rs deleted file mode 100644 index b05eaa5b891c..000000000000 --- a/sdk/iotroborunner/src/operation/create_destination.rs +++ /dev/null @@ -1,429 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `CreateDestination`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct CreateDestination; -impl CreateDestination { - /// Creates a new `CreateDestination` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_destination::CreateDestinationInput, - ) -> ::std::result::Result< - crate::operation::create_destination::CreateDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_destination::CreateDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_destination::CreateDestinationInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "CreateDestination", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins - .with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new( - |token_provider, input| { - let input: &mut crate::operation::create_destination::CreateDestinationInput = input.downcast_mut().expect("correct type"); - if input.client_token.is_none() { - input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token()); - } - }, - )) - .with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateDestination { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateDestination"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - CreateDestinationRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - CreateDestinationResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "CreateDestination", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateDestination") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(CreateDestinationEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::create_destination::CreateDestinationError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::create_destination::CreateDestinationError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::create_destination::CreateDestinationError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct CreateDestinationResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDestinationResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_create_destination::de_create_destination_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_create_destination::de_create_destination_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct CreateDestinationRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDestinationRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::create_destination::CreateDestinationInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/createDestination").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::create_destination::CreateDestinationInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_destination::ser_create_destination_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct CreateDestinationEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDestinationEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "CreateDestinationEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to CreateDestinationInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `CreateDestinationError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum CreateDestinationError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed. - ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateDestinationError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl CreateDestinationError { - /// Creates the `CreateDestinationError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `CreateDestinationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `CreateDestinationError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `CreateDestinationError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `CreateDestinationError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `CreateDestinationError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `CreateDestinationError::ServiceQuotaExceededException`. - pub fn is_service_quota_exceeded_exception(&self) -> bool { - matches!(self, Self::ServiceQuotaExceededException(_)) - } - /// Returns `true` if the error kind is `CreateDestinationError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `CreateDestinationError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for CreateDestinationError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for CreateDestinationError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for CreateDestinationError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ServiceQuotaExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateDestinationError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateDestinationError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::create_destination::CreateDestinationError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::create_destination::_create_destination_output::CreateDestinationOutput; - -pub use crate::operation::create_destination::_create_destination_input::CreateDestinationInput; - -mod _create_destination_input; - -mod _create_destination_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/create_destination/_create_destination_input.rs b/sdk/iotroborunner/src/operation/create_destination/_create_destination_input.rs deleted file mode 100644 index 73de88a599b3..000000000000 --- a/sdk/iotroborunner/src/operation/create_destination/_create_destination_input.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateDestinationInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub client_token: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// Site ARN. - pub site: ::std::option::Option<::std::string::String>, - /// The state of the destination. Default used if not specified. - pub state: ::std::option::Option, - /// JSON document containing additional fixed properties regarding the destination - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl CreateDestinationInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(&self) -> ::std::option::Option<&str> { - self.client_token.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// Site ARN. - pub fn site(&self) -> ::std::option::Option<&str> { - self.site.as_deref() - } - /// The state of the destination. Default used if not specified. - pub fn state(&self) -> ::std::option::Option<&crate::types::DestinationState> { - self.state.as_ref() - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl CreateDestinationInput { - /// Creates a new builder-style object to manufacture [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput). - pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationInputBuilder { - crate::operation::create_destination::builders::CreateDestinationInputBuilder::default() - } -} - -/// A builder for [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateDestinationInputBuilder { - pub(crate) client_token: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) state: ::std::option::Option, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl CreateDestinationInputBuilder { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.client_token = ::std::option::Option::Some(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.client_token = input; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - &self.client_token - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// The state of the destination. Default used if not specified. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// The state of the destination. Default used if not specified. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// The state of the destination. Default used if not specified. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Consumes the builder and constructs a [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_destination::CreateDestinationInput { - client_token: self.client_token, - name: self.name, - site: self.site, - state: self.state, - additional_fixed_properties: self.additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_destination/_create_destination_output.rs b/sdk/iotroborunner/src/operation/create_destination/_create_destination_output.rs deleted file mode 100644 index 310428c58e9a..000000000000 --- a/sdk/iotroborunner/src/operation/create_destination/_create_destination_output.rs +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateDestinationOutput { - /// Destination ARN. - pub arn: ::std::string::String, - /// Filters access by the destination's identifier - pub id: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// State of the destination. - pub state: crate::types::DestinationState, - _request_id: Option, -} -impl CreateDestinationOutput { - /// Destination ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the destination's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// State of the destination. - pub fn state(&self) -> &crate::types::DestinationState { - &self.state - } -} -impl ::aws_types::request_id::RequestId for CreateDestinationOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl CreateDestinationOutput { - /// Creates a new builder-style object to manufacture [`CreateDestinationOutput`](crate::operation::create_destination::CreateDestinationOutput). - pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationOutputBuilder { - crate::operation::create_destination::builders::CreateDestinationOutputBuilder::default() - } -} - -/// A builder for [`CreateDestinationOutput`](crate::operation::create_destination::CreateDestinationOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateDestinationOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) state: ::std::option::Option, - _request_id: Option, -} -impl CreateDestinationOutputBuilder { - /// Destination ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Destination ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the destination's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the destination's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the destination's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// State of the destination. - /// This field is required. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`CreateDestinationOutput`](crate::operation::create_destination::CreateDestinationOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::create_destination::builders::CreateDestinationOutputBuilder::arn) - /// - [`id`](crate::operation::create_destination::builders::CreateDestinationOutputBuilder::id) - /// - [`created_at`](crate::operation::create_destination::builders::CreateDestinationOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::create_destination::builders::CreateDestinationOutputBuilder::updated_at) - /// - [`state`](crate::operation::create_destination::builders::CreateDestinationOutputBuilder::state) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_destination::CreateDestinationOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building CreateDestinationOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building CreateDestinationOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building CreateDestinationOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building CreateDestinationOutput", - ) - })?, - state: self.state.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "state", - "state was not specified but it is required when building CreateDestinationOutput", - ) - })?, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_destination/builders.rs b/sdk/iotroborunner/src/operation/create_destination/builders.rs deleted file mode 100644 index bfc2a9e8c9b8..000000000000 --- a/sdk/iotroborunner/src/operation/create_destination/builders.rs +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::create_destination::_create_destination_output::CreateDestinationOutputBuilder; - -pub use crate::operation::create_destination::_create_destination_input::CreateDestinationInputBuilder; - -impl CreateDestinationInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::create_destination::CreateDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_destination::CreateDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.create_destination(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `CreateDestination`. -/// -/// Grants permission to create a destination -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct CreateDestinationFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::create_destination::builders::CreateDestinationInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::create_destination::CreateDestinationOutput, - crate::operation::create_destination::CreateDestinationError, - > for CreateDestinationFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::create_destination::CreateDestinationOutput, - crate::operation::create_destination::CreateDestinationError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl CreateDestinationFluentBuilder { - /// Creates a new `CreateDestination`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the CreateDestination as a reference. - pub fn as_input(&self) -> &crate::operation::create_destination::builders::CreateDestinationInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::create_destination::CreateDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_destination::CreateDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::create_destination::CreateDestination::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::create_destination::CreateDestination::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::create_destination::CreateDestinationOutput, - crate::operation::create_destination::CreateDestinationError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.client_token(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_client_token(input); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_client_token() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// Site ARN. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.site(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_site(input); - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_site() - } - /// The state of the destination. Default used if not specified. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.inner = self.inner.state(input); - self - } - /// The state of the destination. Default used if not specified. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_state(input); - self - } - /// The state of the destination. Default used if not specified. - pub fn get_state(&self) -> &::std::option::Option { - self.inner.get_state() - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_fixed_properties(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_fixed_properties(input); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_fixed_properties() - } -} diff --git a/sdk/iotroborunner/src/operation/create_site.rs b/sdk/iotroborunner/src/operation/create_site.rs deleted file mode 100644 index d37c6a627088..000000000000 --- a/sdk/iotroborunner/src/operation/create_site.rs +++ /dev/null @@ -1,416 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `CreateSite`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct CreateSite; -impl CreateSite { - /// Creates a new `CreateSite` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_site::CreateSiteInput, - ) -> ::std::result::Result< - crate::operation::create_site::CreateSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_site::CreateSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_site::CreateSiteInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "CreateSite", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins - .with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new( - |token_provider, input| { - let input: &mut crate::operation::create_site::CreateSiteInput = input.downcast_mut().expect("correct type"); - if input.client_token.is_none() { - input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token()); - } - }, - )) - .with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateSite { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateSite"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - CreateSiteRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - CreateSiteResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "CreateSite", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateSite") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(CreateSiteEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::create_site::CreateSiteError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::create_site::CreateSiteError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::create_site::CreateSiteError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct CreateSiteResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateSiteResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_create_site::de_create_site_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_create_site::de_create_site_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct CreateSiteRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateSiteRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input.downcast::().expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::create_site::CreateSiteInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/createSite").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::create_site::CreateSiteInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_site::ser_create_site_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct CreateSiteEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateSiteEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "CreateSiteEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to CreateSiteInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `CreateSiteError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum CreateSiteError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed. - ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateSiteError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl CreateSiteError { - /// Creates the `CreateSiteError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `CreateSiteError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `CreateSiteError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `CreateSiteError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `CreateSiteError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `CreateSiteError::ServiceQuotaExceededException`. - pub fn is_service_quota_exceeded_exception(&self) -> bool { - matches!(self, Self::ServiceQuotaExceededException(_)) - } - /// Returns `true` if the error kind is `CreateSiteError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `CreateSiteError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for CreateSiteError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for CreateSiteError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for CreateSiteError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ServiceQuotaExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateSiteError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateSiteError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::create_site::CreateSiteError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::create_site::_create_site_output::CreateSiteOutput; - -pub use crate::operation::create_site::_create_site_input::CreateSiteInput; - -mod _create_site_input; - -mod _create_site_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/create_site/_create_site_input.rs b/sdk/iotroborunner/src/operation/create_site/_create_site_input.rs deleted file mode 100644 index 82b7693737dd..000000000000 --- a/sdk/iotroborunner/src/operation/create_site/_create_site_input.rs +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateSiteInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub client_token: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub country_code: ::std::option::Option<::std::string::String>, - /// A high-level description of the site. - pub description: ::std::option::Option<::std::string::String>, -} -impl CreateSiteInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(&self) -> ::std::option::Option<&str> { - self.client_token.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(&self) -> ::std::option::Option<&str> { - self.country_code.as_deref() - } - /// A high-level description of the site. - pub fn description(&self) -> ::std::option::Option<&str> { - self.description.as_deref() - } -} -impl CreateSiteInput { - /// Creates a new builder-style object to manufacture [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput). - pub fn builder() -> crate::operation::create_site::builders::CreateSiteInputBuilder { - crate::operation::create_site::builders::CreateSiteInputBuilder::default() - } -} - -/// A builder for [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateSiteInputBuilder { - pub(crate) client_token: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) country_code: ::std::option::Option<::std::string::String>, - pub(crate) description: ::std::option::Option<::std::string::String>, -} -impl CreateSiteInputBuilder { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.client_token = ::std::option::Option::Some(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.client_token = input; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - &self.client_token - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - /// This field is required. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.country_code = ::std::option::Option::Some(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.country_code = input; - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - &self.country_code - } - /// A high-level description of the site. - pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.description = ::std::option::Option::Some(input.into()); - self - } - /// A high-level description of the site. - pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.description = input; - self - } - /// A high-level description of the site. - pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { - &self.description - } - /// Consumes the builder and constructs a [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_site::CreateSiteInput { - client_token: self.client_token, - name: self.name, - country_code: self.country_code, - description: self.description, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_site/_create_site_output.rs b/sdk/iotroborunner/src/operation/create_site/_create_site_output.rs deleted file mode 100644 index adada821a4d9..000000000000 --- a/sdk/iotroborunner/src/operation/create_site/_create_site_output.rs +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateSiteOutput { - /// Site ARN. - pub arn: ::std::string::String, - /// Filters access by the site's identifier - pub id: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - _request_id: Option, -} -impl CreateSiteOutput { - /// Site ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the site's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } -} -impl ::aws_types::request_id::RequestId for CreateSiteOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl CreateSiteOutput { - /// Creates a new builder-style object to manufacture [`CreateSiteOutput`](crate::operation::create_site::CreateSiteOutput). - pub fn builder() -> crate::operation::create_site::builders::CreateSiteOutputBuilder { - crate::operation::create_site::builders::CreateSiteOutputBuilder::default() - } -} - -/// A builder for [`CreateSiteOutput`](crate::operation::create_site::CreateSiteOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateSiteOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - _request_id: Option, -} -impl CreateSiteOutputBuilder { - /// Site ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Site ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the site's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the site's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the site's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`CreateSiteOutput`](crate::operation::create_site::CreateSiteOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::create_site::builders::CreateSiteOutputBuilder::arn) - /// - [`id`](crate::operation::create_site::builders::CreateSiteOutputBuilder::id) - /// - [`created_at`](crate::operation::create_site::builders::CreateSiteOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::create_site::builders::CreateSiteOutputBuilder::updated_at) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_site::CreateSiteOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building CreateSiteOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building CreateSiteOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building CreateSiteOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building CreateSiteOutput", - ) - })?, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_site/builders.rs b/sdk/iotroborunner/src/operation/create_site/builders.rs deleted file mode 100644 index 0bbb632f9b36..000000000000 --- a/sdk/iotroborunner/src/operation/create_site/builders.rs +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::create_site::_create_site_output::CreateSiteOutputBuilder; - -pub use crate::operation::create_site::_create_site_input::CreateSiteInputBuilder; - -impl CreateSiteInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::create_site::CreateSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_site::CreateSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.create_site(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `CreateSite`. -/// -/// Grants permission to create a site -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct CreateSiteFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::create_site::builders::CreateSiteInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::create_site::CreateSiteOutput, - crate::operation::create_site::CreateSiteError, - > for CreateSiteFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::create_site::CreateSiteOutput, - crate::operation::create_site::CreateSiteError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl CreateSiteFluentBuilder { - /// Creates a new `CreateSite`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the CreateSite as a reference. - pub fn as_input(&self) -> &crate::operation::create_site::builders::CreateSiteInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::create_site::CreateSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_site::CreateSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::create_site::CreateSite::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::create_site::CreateSite::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::create_site::CreateSiteOutput, - crate::operation::create_site::CreateSiteError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.client_token(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_client_token(input); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_client_token() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.country_code(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_country_code(input); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_country_code() - } - /// A high-level description of the site. - pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.description(input.into()); - self - } - /// A high-level description of the site. - pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_description(input); - self - } - /// A high-level description of the site. - pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_description() - } -} diff --git a/sdk/iotroborunner/src/operation/create_worker.rs b/sdk/iotroborunner/src/operation/create_worker.rs deleted file mode 100644 index e6f16f95d0af..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker.rs +++ /dev/null @@ -1,428 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `CreateWorker`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct CreateWorker; -impl CreateWorker { - /// Creates a new `CreateWorker` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_worker::CreateWorkerInput, - ) -> ::std::result::Result< - crate::operation::create_worker::CreateWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_worker::CreateWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_worker::CreateWorkerInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "CreateWorker", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins - .with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new( - |token_provider, input| { - let input: &mut crate::operation::create_worker::CreateWorkerInput = input.downcast_mut().expect("correct type"); - if input.client_token.is_none() { - input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token()); - } - }, - )) - .with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateWorker { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateWorker"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - CreateWorkerRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - CreateWorkerResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "CreateWorker", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateWorker") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(CreateWorkerEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::create_worker::CreateWorkerError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::create_worker::CreateWorkerError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::create_worker::CreateWorkerError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct CreateWorkerResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateWorkerResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_create_worker::de_create_worker_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_create_worker::de_create_worker_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct CreateWorkerRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateWorkerRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::create_worker::CreateWorkerInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/createWorker").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::create_worker::CreateWorkerInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_worker::ser_create_worker_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct CreateWorkerEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateWorkerEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "CreateWorkerEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to CreateWorkerInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `CreateWorkerError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum CreateWorkerError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed. - ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateWorkerError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl CreateWorkerError { - /// Creates the `CreateWorkerError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `CreateWorkerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `CreateWorkerError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerError::ServiceQuotaExceededException`. - pub fn is_service_quota_exceeded_exception(&self) -> bool { - matches!(self, Self::ServiceQuotaExceededException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for CreateWorkerError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for CreateWorkerError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for CreateWorkerError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ServiceQuotaExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateWorkerError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateWorkerError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::create_worker::CreateWorkerError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::create_worker::_create_worker_output::CreateWorkerOutput; - -pub use crate::operation::create_worker::_create_worker_input::CreateWorkerInput; - -mod _create_worker_input; - -mod _create_worker_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/create_worker/_create_worker_input.rs b/sdk/iotroborunner/src/operation/create_worker/_create_worker_input.rs deleted file mode 100644 index 4ed7d5a8068c..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker/_create_worker_input.rs +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateWorkerInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub client_token: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// Full ARN of the worker fleet. - pub fleet: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub additional_transient_properties: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - /// Properties of the worker that are provided by the vendor FMS. - pub vendor_properties: ::std::option::Option, - /// Supported coordinates for worker position. - pub position: ::std::option::Option, - /// Worker orientation measured in units clockwise from north. - pub orientation: ::std::option::Option, -} -impl CreateWorkerInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(&self) -> ::std::option::Option<&str> { - self.client_token.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// Full ARN of the worker fleet. - pub fn fleet(&self) -> ::std::option::Option<&str> { - self.fleet.as_deref() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(&self) -> ::std::option::Option<&str> { - self.additional_transient_properties.as_deref() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(&self) -> ::std::option::Option<&crate::types::VendorProperties> { - self.vendor_properties.as_ref() - } - /// Supported coordinates for worker position. - pub fn position(&self) -> ::std::option::Option<&crate::types::PositionCoordinates> { - self.position.as_ref() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(&self) -> ::std::option::Option<&crate::types::Orientation> { - self.orientation.as_ref() - } -} -impl CreateWorkerInput { - /// Creates a new builder-style object to manufacture [`CreateWorkerInput`](crate::operation::create_worker::CreateWorkerInput). - pub fn builder() -> crate::operation::create_worker::builders::CreateWorkerInputBuilder { - crate::operation::create_worker::builders::CreateWorkerInputBuilder::default() - } -} - -/// A builder for [`CreateWorkerInput`](crate::operation::create_worker::CreateWorkerInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateWorkerInputBuilder { - pub(crate) client_token: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) fleet: ::std::option::Option<::std::string::String>, - pub(crate) additional_transient_properties: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - pub(crate) vendor_properties: ::std::option::Option, - pub(crate) position: ::std::option::Option, - pub(crate) orientation: ::std::option::Option, -} -impl CreateWorkerInputBuilder { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.client_token = ::std::option::Option::Some(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.client_token = input; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - &self.client_token - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Full ARN of the worker fleet. - /// This field is required. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.fleet = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.fleet = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - &self.fleet - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_transient_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_transient_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_transient_properties - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.vendor_properties = ::std::option::Option::Some(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.vendor_properties = input; - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - &self.vendor_properties - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.position = ::std::option::Option::Some(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.position = input; - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - &self.position - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.orientation = ::std::option::Option::Some(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.orientation = input; - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - &self.orientation - } - /// Consumes the builder and constructs a [`CreateWorkerInput`](crate::operation::create_worker::CreateWorkerInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_worker::CreateWorkerInput { - client_token: self.client_token, - name: self.name, - fleet: self.fleet, - additional_transient_properties: self.additional_transient_properties, - additional_fixed_properties: self.additional_fixed_properties, - vendor_properties: self.vendor_properties, - position: self.position, - orientation: self.orientation, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_worker/_create_worker_output.rs b/sdk/iotroborunner/src/operation/create_worker/_create_worker_output.rs deleted file mode 100644 index a7d99e7a2d00..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker/_create_worker_output.rs +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateWorkerOutput { - /// Full ARN of the worker. - pub arn: ::std::string::String, - /// Filters access by the workers identifier - pub id: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// Site ARN. - pub site: ::std::string::String, - _request_id: Option, -} -impl CreateWorkerOutput { - /// Full ARN of the worker. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the workers identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } -} -impl ::aws_types::request_id::RequestId for CreateWorkerOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl CreateWorkerOutput { - /// Creates a new builder-style object to manufacture [`CreateWorkerOutput`](crate::operation::create_worker::CreateWorkerOutput). - pub fn builder() -> crate::operation::create_worker::builders::CreateWorkerOutputBuilder { - crate::operation::create_worker::builders::CreateWorkerOutputBuilder::default() - } -} - -/// A builder for [`CreateWorkerOutput`](crate::operation::create_worker::CreateWorkerOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateWorkerOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) site: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl CreateWorkerOutputBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the workers identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the workers identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the workers identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`CreateWorkerOutput`](crate::operation::create_worker::CreateWorkerOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::create_worker::builders::CreateWorkerOutputBuilder::arn) - /// - [`id`](crate::operation::create_worker::builders::CreateWorkerOutputBuilder::id) - /// - [`created_at`](crate::operation::create_worker::builders::CreateWorkerOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::create_worker::builders::CreateWorkerOutputBuilder::updated_at) - /// - [`site`](crate::operation::create_worker::builders::CreateWorkerOutputBuilder::site) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_worker::CreateWorkerOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building CreateWorkerOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building CreateWorkerOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building CreateWorkerOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building CreateWorkerOutput", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building CreateWorkerOutput", - ) - })?, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_worker/builders.rs b/sdk/iotroborunner/src/operation/create_worker/builders.rs deleted file mode 100644 index 6a62ef9666fc..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker/builders.rs +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::create_worker::_create_worker_output::CreateWorkerOutputBuilder; - -pub use crate::operation::create_worker::_create_worker_input::CreateWorkerInputBuilder; - -impl CreateWorkerInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::create_worker::CreateWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_worker::CreateWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.create_worker(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `CreateWorker`. -/// -/// Grants permission to create a worker -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct CreateWorkerFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::create_worker::builders::CreateWorkerInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::create_worker::CreateWorkerOutput, - crate::operation::create_worker::CreateWorkerError, - > for CreateWorkerFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::create_worker::CreateWorkerOutput, - crate::operation::create_worker::CreateWorkerError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl CreateWorkerFluentBuilder { - /// Creates a new `CreateWorker`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the CreateWorker as a reference. - pub fn as_input(&self) -> &crate::operation::create_worker::builders::CreateWorkerInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::create_worker::CreateWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_worker::CreateWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::create_worker::CreateWorker::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::create_worker::CreateWorker::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::create_worker::CreateWorkerOutput, - crate::operation::create_worker::CreateWorkerError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.client_token(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_client_token(input); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_client_token() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// Full ARN of the worker fleet. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.fleet(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_fleet(input); - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_fleet() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_transient_properties(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_transient_properties(input); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_transient_properties() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_fixed_properties(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_fixed_properties(input); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_fixed_properties() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.inner = self.inner.vendor_properties(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_vendor_properties(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - self.inner.get_vendor_properties() - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.inner = self.inner.position(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_position(input); - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - self.inner.get_position() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.inner = self.inner.orientation(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_orientation(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - self.inner.get_orientation() - } -} diff --git a/sdk/iotroborunner/src/operation/create_worker_fleet.rs b/sdk/iotroborunner/src/operation/create_worker_fleet.rs deleted file mode 100644 index c57182cdabcc..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker_fleet.rs +++ /dev/null @@ -1,429 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `CreateWorkerFleet`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct CreateWorkerFleet; -impl CreateWorkerFleet { - /// Creates a new `CreateWorkerFleet` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_worker_fleet::CreateWorkerFleetInput, - ) -> ::std::result::Result< - crate::operation::create_worker_fleet::CreateWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_worker_fleet::CreateWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::create_worker_fleet::CreateWorkerFleetInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "CreateWorkerFleet", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins - .with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new( - |token_provider, input| { - let input: &mut crate::operation::create_worker_fleet::CreateWorkerFleetInput = input.downcast_mut().expect("correct type"); - if input.client_token.is_none() { - input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token()); - } - }, - )) - .with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateWorkerFleet { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateWorkerFleet"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - CreateWorkerFleetRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - CreateWorkerFleetResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "CreateWorkerFleet", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateWorkerFleet") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(CreateWorkerFleetEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::create_worker_fleet::CreateWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::create_worker_fleet::CreateWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::create_worker_fleet::CreateWorkerFleetError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct CreateWorkerFleetResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateWorkerFleetResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_create_worker_fleet::de_create_worker_fleet_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_create_worker_fleet::de_create_worker_fleet_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct CreateWorkerFleetRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateWorkerFleetRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::create_worker_fleet::CreateWorkerFleetInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/createWorkerFleet").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::create_worker_fleet::CreateWorkerFleetInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_worker_fleet::ser_create_worker_fleet_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct CreateWorkerFleetEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateWorkerFleetEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "CreateWorkerFleetEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to CreateWorkerFleetInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `CreateWorkerFleetError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum CreateWorkerFleetError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed. - ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateWorkerFleetError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl CreateWorkerFleetError { - /// Creates the `CreateWorkerFleetError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `CreateWorkerFleetError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::ServiceQuotaExceededException`. - pub fn is_service_quota_exceeded_exception(&self) -> bool { - matches!(self, Self::ServiceQuotaExceededException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `CreateWorkerFleetError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for CreateWorkerFleetError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for CreateWorkerFleetError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for CreateWorkerFleetError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ServiceQuotaExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateWorkerFleetError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateWorkerFleetError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::create_worker_fleet::CreateWorkerFleetError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::create_worker_fleet::_create_worker_fleet_output::CreateWorkerFleetOutput; - -pub use crate::operation::create_worker_fleet::_create_worker_fleet_input::CreateWorkerFleetInput; - -mod _create_worker_fleet_input; - -mod _create_worker_fleet_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_input.rs b/sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_input.rs deleted file mode 100644 index 1d51520e68c3..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_input.rs +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateWorkerFleetInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub client_token: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// Site ARN. - pub site: ::std::option::Option<::std::string::String>, - /// JSON blob containing additional fixed properties regarding the worker fleet - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl CreateWorkerFleetInput { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(&self) -> ::std::option::Option<&str> { - self.client_token.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// Site ARN. - pub fn site(&self) -> ::std::option::Option<&str> { - self.site.as_deref() - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl CreateWorkerFleetInput { - /// Creates a new builder-style object to manufacture [`CreateWorkerFleetInput`](crate::operation::create_worker_fleet::CreateWorkerFleetInput). - pub fn builder() -> crate::operation::create_worker_fleet::builders::CreateWorkerFleetInputBuilder { - crate::operation::create_worker_fleet::builders::CreateWorkerFleetInputBuilder::default() - } -} - -/// A builder for [`CreateWorkerFleetInput`](crate::operation::create_worker_fleet::CreateWorkerFleetInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateWorkerFleetInputBuilder { - pub(crate) client_token: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl CreateWorkerFleetInputBuilder { - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.client_token = ::std::option::Option::Some(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.client_token = input; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - &self.client_token - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Consumes the builder and constructs a [`CreateWorkerFleetInput`](crate::operation::create_worker_fleet::CreateWorkerFleetInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_worker_fleet::CreateWorkerFleetInput { - client_token: self.client_token, - name: self.name, - site: self.site, - additional_fixed_properties: self.additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_output.rs b/sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_output.rs deleted file mode 100644 index e96e6af67db4..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker_fleet/_create_worker_fleet_output.rs +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CreateWorkerFleetOutput { - /// Full ARN of the worker fleet. - pub arn: ::std::string::String, - /// Filters access by the worker fleet's identifier - pub id: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - _request_id: Option, -} -impl CreateWorkerFleetOutput { - /// Full ARN of the worker fleet. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the worker fleet's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } -} -impl ::aws_types::request_id::RequestId for CreateWorkerFleetOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl CreateWorkerFleetOutput { - /// Creates a new builder-style object to manufacture [`CreateWorkerFleetOutput`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput). - pub fn builder() -> crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder { - crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder::default() - } -} - -/// A builder for [`CreateWorkerFleetOutput`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CreateWorkerFleetOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - _request_id: Option, -} -impl CreateWorkerFleetOutputBuilder { - /// Full ARN of the worker fleet. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the worker fleet's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the worker fleet's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the worker fleet's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`CreateWorkerFleetOutput`](crate::operation::create_worker_fleet::CreateWorkerFleetOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder::arn) - /// - [`id`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder::id) - /// - [`created_at`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder::updated_at) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::create_worker_fleet::CreateWorkerFleetOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building CreateWorkerFleetOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building CreateWorkerFleetOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building CreateWorkerFleetOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building CreateWorkerFleetOutput", - ) - })?, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/create_worker_fleet/builders.rs b/sdk/iotroborunner/src/operation/create_worker_fleet/builders.rs deleted file mode 100644 index 165485470117..000000000000 --- a/sdk/iotroborunner/src/operation/create_worker_fleet/builders.rs +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::create_worker_fleet::_create_worker_fleet_output::CreateWorkerFleetOutputBuilder; - -pub use crate::operation::create_worker_fleet::_create_worker_fleet_input::CreateWorkerFleetInputBuilder; - -impl CreateWorkerFleetInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::create_worker_fleet::CreateWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_worker_fleet::CreateWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.create_worker_fleet(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `CreateWorkerFleet`. -/// -/// Grants permission to create a worker fleet -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct CreateWorkerFleetFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::create_worker_fleet::builders::CreateWorkerFleetInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::create_worker_fleet::CreateWorkerFleetOutput, - crate::operation::create_worker_fleet::CreateWorkerFleetError, - > for CreateWorkerFleetFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::create_worker_fleet::CreateWorkerFleetOutput, - crate::operation::create_worker_fleet::CreateWorkerFleetError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl CreateWorkerFleetFluentBuilder { - /// Creates a new `CreateWorkerFleet`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the CreateWorkerFleet as a reference. - pub fn as_input(&self) -> &crate::operation::create_worker_fleet::builders::CreateWorkerFleetInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::create_worker_fleet::CreateWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::create_worker_fleet::CreateWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::create_worker_fleet::CreateWorkerFleet::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::create_worker_fleet::CreateWorkerFleet::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::create_worker_fleet::CreateWorkerFleetOutput, - crate::operation::create_worker_fleet::CreateWorkerFleetError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.client_token(input.into()); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_client_token(input); - self - } - /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times. - pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_client_token() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// Site ARN. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.site(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_site(input); - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_site() - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_fixed_properties(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_fixed_properties(input); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_fixed_properties() - } -} diff --git a/sdk/iotroborunner/src/operation/delete_destination.rs b/sdk/iotroborunner/src/operation/delete_destination.rs deleted file mode 100644 index 0587511b9e49..000000000000 --- a/sdk/iotroborunner/src/operation/delete_destination.rs +++ /dev/null @@ -1,409 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `DeleteDestination`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct DeleteDestination; -impl DeleteDestination { - /// Creates a new `DeleteDestination` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_destination::DeleteDestinationInput, - ) -> ::std::result::Result< - crate::operation::delete_destination::DeleteDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_destination::DeleteDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_destination::DeleteDestinationInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "DeleteDestination", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DeleteDestination { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteDestination"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - DeleteDestinationRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - DeleteDestinationResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "DeleteDestination", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DeleteDestination") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(DeleteDestinationEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::delete_destination::DeleteDestinationError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::delete_destination::DeleteDestinationError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::delete_destination::DeleteDestinationError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct DeleteDestinationResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteDestinationResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_delete_destination::de_delete_destination_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_delete_destination::de_delete_destination_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct DeleteDestinationRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteDestinationRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::delete_destination::DeleteDestinationInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/deleteDestination").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::delete_destination::DeleteDestinationInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_destination::ser_delete_destination_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct DeleteDestinationEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteDestinationEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "DeleteDestinationEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to DeleteDestinationInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `DeleteDestinationError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum DeleteDestinationError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteDestinationError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl DeleteDestinationError { - /// Creates the `DeleteDestinationError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `DeleteDestinationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `DeleteDestinationError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `DeleteDestinationError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `DeleteDestinationError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `DeleteDestinationError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `DeleteDestinationError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `DeleteDestinationError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for DeleteDestinationError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for DeleteDestinationError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteDestinationError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteDestinationError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteDestinationError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::delete_destination::DeleteDestinationError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::delete_destination::_delete_destination_output::DeleteDestinationOutput; - -pub use crate::operation::delete_destination::_delete_destination_input::DeleteDestinationInput; - -mod _delete_destination_input; - -mod _delete_destination_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/delete_destination/_delete_destination_input.rs b/sdk/iotroborunner/src/operation/delete_destination/_delete_destination_input.rs deleted file mode 100644 index ab29f74d0675..000000000000 --- a/sdk/iotroborunner/src/operation/delete_destination/_delete_destination_input.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteDestinationInput { - /// Destination ARN. - pub id: ::std::option::Option<::std::string::String>, -} -impl DeleteDestinationInput { - /// Destination ARN. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl DeleteDestinationInput { - /// Creates a new builder-style object to manufacture [`DeleteDestinationInput`](crate::operation::delete_destination::DeleteDestinationInput). - pub fn builder() -> crate::operation::delete_destination::builders::DeleteDestinationInputBuilder { - crate::operation::delete_destination::builders::DeleteDestinationInputBuilder::default() - } -} - -/// A builder for [`DeleteDestinationInput`](crate::operation::delete_destination::DeleteDestinationInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteDestinationInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl DeleteDestinationInputBuilder { - /// Destination ARN. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Destination ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`DeleteDestinationInput`](crate::operation::delete_destination::DeleteDestinationInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::delete_destination::DeleteDestinationInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/delete_destination/_delete_destination_output.rs b/sdk/iotroborunner/src/operation/delete_destination/_delete_destination_output.rs deleted file mode 100644 index c443a8865d26..000000000000 --- a/sdk/iotroborunner/src/operation/delete_destination/_delete_destination_output.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteDestinationOutput { - _request_id: Option, -} -impl ::aws_types::request_id::RequestId for DeleteDestinationOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl DeleteDestinationOutput { - /// Creates a new builder-style object to manufacture [`DeleteDestinationOutput`](crate::operation::delete_destination::DeleteDestinationOutput). - pub fn builder() -> crate::operation::delete_destination::builders::DeleteDestinationOutputBuilder { - crate::operation::delete_destination::builders::DeleteDestinationOutputBuilder::default() - } -} - -/// A builder for [`DeleteDestinationOutput`](crate::operation::delete_destination::DeleteDestinationOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteDestinationOutputBuilder { - _request_id: Option, -} -impl DeleteDestinationOutputBuilder { - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`DeleteDestinationOutput`](crate::operation::delete_destination::DeleteDestinationOutput). - pub fn build(self) -> crate::operation::delete_destination::DeleteDestinationOutput { - crate::operation::delete_destination::DeleteDestinationOutput { - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/delete_destination/builders.rs b/sdk/iotroborunner/src/operation/delete_destination/builders.rs deleted file mode 100644 index 706209d311b0..000000000000 --- a/sdk/iotroborunner/src/operation/delete_destination/builders.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::delete_destination::_delete_destination_output::DeleteDestinationOutputBuilder; - -pub use crate::operation::delete_destination::_delete_destination_input::DeleteDestinationInputBuilder; - -impl DeleteDestinationInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::delete_destination::DeleteDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_destination::DeleteDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.delete_destination(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `DeleteDestination`. -/// -/// Grants permission to delete a destination -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct DeleteDestinationFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::delete_destination::builders::DeleteDestinationInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::delete_destination::DeleteDestinationOutput, - crate::operation::delete_destination::DeleteDestinationError, - > for DeleteDestinationFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::delete_destination::DeleteDestinationOutput, - crate::operation::delete_destination::DeleteDestinationError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl DeleteDestinationFluentBuilder { - /// Creates a new `DeleteDestination`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the DeleteDestination as a reference. - pub fn as_input(&self) -> &crate::operation::delete_destination::builders::DeleteDestinationInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::delete_destination::DeleteDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_destination::DeleteDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::delete_destination::DeleteDestination::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::delete_destination::DeleteDestination::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::delete_destination::DeleteDestinationOutput, - crate::operation::delete_destination::DeleteDestinationError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Destination ARN. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Destination ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Destination ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/delete_site.rs b/sdk/iotroborunner/src/operation/delete_site.rs deleted file mode 100644 index b4d87057612d..000000000000 --- a/sdk/iotroborunner/src/operation/delete_site.rs +++ /dev/null @@ -1,406 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `DeleteSite`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct DeleteSite; -impl DeleteSite { - /// Creates a new `DeleteSite` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_site::DeleteSiteInput, - ) -> ::std::result::Result< - crate::operation::delete_site::DeleteSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_site::DeleteSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_site::DeleteSiteInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "DeleteSite", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DeleteSite { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteSite"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - DeleteSiteRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - DeleteSiteResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "DeleteSite", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DeleteSite") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(DeleteSiteEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::delete_site::DeleteSiteError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::delete_site::DeleteSiteError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::delete_site::DeleteSiteError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct DeleteSiteResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteSiteResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_delete_site::de_delete_site_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_delete_site::de_delete_site_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct DeleteSiteRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteSiteRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input.downcast::().expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::delete_site::DeleteSiteInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/deleteSite").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::delete_site::DeleteSiteInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_site::ser_delete_site_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct DeleteSiteEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteSiteEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "DeleteSiteEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to DeleteSiteInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `DeleteSiteError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum DeleteSiteError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteSiteError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl DeleteSiteError { - /// Creates the `DeleteSiteError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `DeleteSiteError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `DeleteSiteError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `DeleteSiteError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `DeleteSiteError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `DeleteSiteError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `DeleteSiteError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `DeleteSiteError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for DeleteSiteError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for DeleteSiteError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteSiteError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteSiteError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteSiteError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::delete_site::DeleteSiteError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::delete_site::_delete_site_output::DeleteSiteOutput; - -pub use crate::operation::delete_site::_delete_site_input::DeleteSiteInput; - -mod _delete_site_input; - -mod _delete_site_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/delete_site/_delete_site_input.rs b/sdk/iotroborunner/src/operation/delete_site/_delete_site_input.rs deleted file mode 100644 index 90fab99ef4f2..000000000000 --- a/sdk/iotroborunner/src/operation/delete_site/_delete_site_input.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteSiteInput { - /// Site ARN. - pub id: ::std::option::Option<::std::string::String>, -} -impl DeleteSiteInput { - /// Site ARN. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl DeleteSiteInput { - /// Creates a new builder-style object to manufacture [`DeleteSiteInput`](crate::operation::delete_site::DeleteSiteInput). - pub fn builder() -> crate::operation::delete_site::builders::DeleteSiteInputBuilder { - crate::operation::delete_site::builders::DeleteSiteInputBuilder::default() - } -} - -/// A builder for [`DeleteSiteInput`](crate::operation::delete_site::DeleteSiteInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteSiteInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl DeleteSiteInputBuilder { - /// Site ARN. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Site ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`DeleteSiteInput`](crate::operation::delete_site::DeleteSiteInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::delete_site::DeleteSiteInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/delete_site/_delete_site_output.rs b/sdk/iotroborunner/src/operation/delete_site/_delete_site_output.rs deleted file mode 100644 index a95c07af8689..000000000000 --- a/sdk/iotroborunner/src/operation/delete_site/_delete_site_output.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteSiteOutput { - _request_id: Option, -} -impl ::aws_types::request_id::RequestId for DeleteSiteOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl DeleteSiteOutput { - /// Creates a new builder-style object to manufacture [`DeleteSiteOutput`](crate::operation::delete_site::DeleteSiteOutput). - pub fn builder() -> crate::operation::delete_site::builders::DeleteSiteOutputBuilder { - crate::operation::delete_site::builders::DeleteSiteOutputBuilder::default() - } -} - -/// A builder for [`DeleteSiteOutput`](crate::operation::delete_site::DeleteSiteOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteSiteOutputBuilder { - _request_id: Option, -} -impl DeleteSiteOutputBuilder { - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`DeleteSiteOutput`](crate::operation::delete_site::DeleteSiteOutput). - pub fn build(self) -> crate::operation::delete_site::DeleteSiteOutput { - crate::operation::delete_site::DeleteSiteOutput { - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/delete_site/builders.rs b/sdk/iotroborunner/src/operation/delete_site/builders.rs deleted file mode 100644 index 5665a12bcc2a..000000000000 --- a/sdk/iotroborunner/src/operation/delete_site/builders.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::delete_site::_delete_site_output::DeleteSiteOutputBuilder; - -pub use crate::operation::delete_site::_delete_site_input::DeleteSiteInputBuilder; - -impl DeleteSiteInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::delete_site::DeleteSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_site::DeleteSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.delete_site(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `DeleteSite`. -/// -/// Grants permission to delete a site -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct DeleteSiteFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::delete_site::builders::DeleteSiteInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::delete_site::DeleteSiteOutput, - crate::operation::delete_site::DeleteSiteError, - > for DeleteSiteFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::delete_site::DeleteSiteOutput, - crate::operation::delete_site::DeleteSiteError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl DeleteSiteFluentBuilder { - /// Creates a new `DeleteSite`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the DeleteSite as a reference. - pub fn as_input(&self) -> &crate::operation::delete_site::builders::DeleteSiteInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::delete_site::DeleteSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_site::DeleteSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::delete_site::DeleteSite::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::delete_site::DeleteSite::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::delete_site::DeleteSiteOutput, - crate::operation::delete_site::DeleteSiteError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Site ARN. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Site ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Site ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/delete_worker.rs b/sdk/iotroborunner/src/operation/delete_worker.rs deleted file mode 100644 index a9bdfd315718..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker.rs +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `DeleteWorker`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct DeleteWorker; -impl DeleteWorker { - /// Creates a new `DeleteWorker` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_worker::DeleteWorkerInput, - ) -> ::std::result::Result< - crate::operation::delete_worker::DeleteWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_worker::DeleteWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_worker::DeleteWorkerInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "DeleteWorker", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DeleteWorker { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteWorker"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - DeleteWorkerRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - DeleteWorkerResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "DeleteWorker", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DeleteWorker") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(DeleteWorkerEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::delete_worker::DeleteWorkerError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::delete_worker::DeleteWorkerError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::delete_worker::DeleteWorkerError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct DeleteWorkerResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteWorkerResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_delete_worker::de_delete_worker_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_delete_worker::de_delete_worker_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct DeleteWorkerRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteWorkerRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::delete_worker::DeleteWorkerInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/deleteWorker").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::delete_worker::DeleteWorkerInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_worker::ser_delete_worker_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct DeleteWorkerEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteWorkerEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "DeleteWorkerEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to DeleteWorkerInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `DeleteWorkerError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum DeleteWorkerError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteWorkerError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl DeleteWorkerError { - /// Creates the `DeleteWorkerError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `DeleteWorkerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `DeleteWorkerError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for DeleteWorkerError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for DeleteWorkerError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteWorkerError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteWorkerError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteWorkerError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::delete_worker::DeleteWorkerError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::delete_worker::_delete_worker_output::DeleteWorkerOutput; - -pub use crate::operation::delete_worker::_delete_worker_input::DeleteWorkerInput; - -mod _delete_worker_input; - -mod _delete_worker_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/delete_worker/_delete_worker_input.rs b/sdk/iotroborunner/src/operation/delete_worker/_delete_worker_input.rs deleted file mode 100644 index db4b3e807046..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker/_delete_worker_input.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteWorkerInput { - /// Full ARN of the worker. - pub id: ::std::option::Option<::std::string::String>, -} -impl DeleteWorkerInput { - /// Full ARN of the worker. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl DeleteWorkerInput { - /// Creates a new builder-style object to manufacture [`DeleteWorkerInput`](crate::operation::delete_worker::DeleteWorkerInput). - pub fn builder() -> crate::operation::delete_worker::builders::DeleteWorkerInputBuilder { - crate::operation::delete_worker::builders::DeleteWorkerInputBuilder::default() - } -} - -/// A builder for [`DeleteWorkerInput`](crate::operation::delete_worker::DeleteWorkerInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteWorkerInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl DeleteWorkerInputBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Full ARN of the worker. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`DeleteWorkerInput`](crate::operation::delete_worker::DeleteWorkerInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::delete_worker::DeleteWorkerInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/delete_worker/_delete_worker_output.rs b/sdk/iotroborunner/src/operation/delete_worker/_delete_worker_output.rs deleted file mode 100644 index db5ff059593c..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker/_delete_worker_output.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteWorkerOutput { - _request_id: Option, -} -impl ::aws_types::request_id::RequestId for DeleteWorkerOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl DeleteWorkerOutput { - /// Creates a new builder-style object to manufacture [`DeleteWorkerOutput`](crate::operation::delete_worker::DeleteWorkerOutput). - pub fn builder() -> crate::operation::delete_worker::builders::DeleteWorkerOutputBuilder { - crate::operation::delete_worker::builders::DeleteWorkerOutputBuilder::default() - } -} - -/// A builder for [`DeleteWorkerOutput`](crate::operation::delete_worker::DeleteWorkerOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteWorkerOutputBuilder { - _request_id: Option, -} -impl DeleteWorkerOutputBuilder { - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`DeleteWorkerOutput`](crate::operation::delete_worker::DeleteWorkerOutput). - pub fn build(self) -> crate::operation::delete_worker::DeleteWorkerOutput { - crate::operation::delete_worker::DeleteWorkerOutput { - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/delete_worker/builders.rs b/sdk/iotroborunner/src/operation/delete_worker/builders.rs deleted file mode 100644 index 8c99d58c2201..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker/builders.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::delete_worker::_delete_worker_output::DeleteWorkerOutputBuilder; - -pub use crate::operation::delete_worker::_delete_worker_input::DeleteWorkerInputBuilder; - -impl DeleteWorkerInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::delete_worker::DeleteWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_worker::DeleteWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.delete_worker(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `DeleteWorker`. -/// -/// Grants permission to delete a worker -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct DeleteWorkerFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::delete_worker::builders::DeleteWorkerInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::delete_worker::DeleteWorkerOutput, - crate::operation::delete_worker::DeleteWorkerError, - > for DeleteWorkerFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::delete_worker::DeleteWorkerOutput, - crate::operation::delete_worker::DeleteWorkerError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl DeleteWorkerFluentBuilder { - /// Creates a new `DeleteWorker`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the DeleteWorker as a reference. - pub fn as_input(&self) -> &crate::operation::delete_worker::builders::DeleteWorkerInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::delete_worker::DeleteWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_worker::DeleteWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::delete_worker::DeleteWorker::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::delete_worker::DeleteWorker::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::delete_worker::DeleteWorkerOutput, - crate::operation::delete_worker::DeleteWorkerError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Full ARN of the worker. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Full ARN of the worker. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/delete_worker_fleet.rs b/sdk/iotroborunner/src/operation/delete_worker_fleet.rs deleted file mode 100644 index e893815c37cf..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker_fleet.rs +++ /dev/null @@ -1,409 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `DeleteWorkerFleet`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct DeleteWorkerFleet; -impl DeleteWorkerFleet { - /// Creates a new `DeleteWorkerFleet` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_worker_fleet::DeleteWorkerFleetInput, - ) -> ::std::result::Result< - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::delete_worker_fleet::DeleteWorkerFleetInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "DeleteWorkerFleet", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DeleteWorkerFleet { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteWorkerFleet"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - DeleteWorkerFleetRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - DeleteWorkerFleetResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "DeleteWorkerFleet", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DeleteWorkerFleet") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(DeleteWorkerFleetEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct DeleteWorkerFleetResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteWorkerFleetResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_delete_worker_fleet::de_delete_worker_fleet_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_delete_worker_fleet::de_delete_worker_fleet_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct DeleteWorkerFleetRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteWorkerFleetRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::delete_worker_fleet::DeleteWorkerFleetInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/deleteWorkerFleet").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::delete_worker_fleet::DeleteWorkerFleetInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_worker_fleet::ser_delete_worker_fleet_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct DeleteWorkerFleetEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteWorkerFleetEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "DeleteWorkerFleetEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to DeleteWorkerFleetInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `DeleteWorkerFleetError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum DeleteWorkerFleetError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if a resource in a create request already exists. - ConflictException(crate::types::error::ConflictException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteWorkerFleetError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl DeleteWorkerFleetError { - /// Creates the `DeleteWorkerFleetError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `DeleteWorkerFleetError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `DeleteWorkerFleetError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerFleetError::ConflictException`. - pub fn is_conflict_exception(&self) -> bool { - matches!(self, Self::ConflictException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerFleetError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerFleetError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerFleetError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `DeleteWorkerFleetError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for DeleteWorkerFleetError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::ConflictException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for DeleteWorkerFleetError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::ConflictException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteWorkerFleetError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteWorkerFleetError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteWorkerFleetError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::delete_worker_fleet::DeleteWorkerFleetError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::delete_worker_fleet::_delete_worker_fleet_output::DeleteWorkerFleetOutput; - -pub use crate::operation::delete_worker_fleet::_delete_worker_fleet_input::DeleteWorkerFleetInput; - -mod _delete_worker_fleet_input; - -mod _delete_worker_fleet_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_input.rs b/sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_input.rs deleted file mode 100644 index d17483d8c2e2..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_input.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteWorkerFleetInput { - /// Full ARN of the worker fleet. - pub id: ::std::option::Option<::std::string::String>, -} -impl DeleteWorkerFleetInput { - /// Full ARN of the worker fleet. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl DeleteWorkerFleetInput { - /// Creates a new builder-style object to manufacture [`DeleteWorkerFleetInput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetInput). - pub fn builder() -> crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetInputBuilder { - crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetInputBuilder::default() - } -} - -/// A builder for [`DeleteWorkerFleetInput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteWorkerFleetInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl DeleteWorkerFleetInputBuilder { - /// Full ARN of the worker fleet. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`DeleteWorkerFleetInput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::delete_worker_fleet::DeleteWorkerFleetInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_output.rs b/sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_output.rs deleted file mode 100644 index 53365b5d733f..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker_fleet/_delete_worker_fleet_output.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct DeleteWorkerFleetOutput { - _request_id: Option, -} -impl ::aws_types::request_id::RequestId for DeleteWorkerFleetOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl DeleteWorkerFleetOutput { - /// Creates a new builder-style object to manufacture [`DeleteWorkerFleetOutput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput). - pub fn builder() -> crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetOutputBuilder { - crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetOutputBuilder::default() - } -} - -/// A builder for [`DeleteWorkerFleetOutput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DeleteWorkerFleetOutputBuilder { - _request_id: Option, -} -impl DeleteWorkerFleetOutputBuilder { - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`DeleteWorkerFleetOutput`](crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput). - pub fn build(self) -> crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput { - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput { - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/delete_worker_fleet/builders.rs b/sdk/iotroborunner/src/operation/delete_worker_fleet/builders.rs deleted file mode 100644 index 67453a14affc..000000000000 --- a/sdk/iotroborunner/src/operation/delete_worker_fleet/builders.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::delete_worker_fleet::_delete_worker_fleet_output::DeleteWorkerFleetOutputBuilder; - -pub use crate::operation::delete_worker_fleet::_delete_worker_fleet_input::DeleteWorkerFleetInputBuilder; - -impl DeleteWorkerFleetInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.delete_worker_fleet(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `DeleteWorkerFleet`. -/// -/// Grants permission to delete a worker fleet -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct DeleteWorkerFleetFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput, - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - > for DeleteWorkerFleetFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput, - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl DeleteWorkerFleetFluentBuilder { - /// Creates a new `DeleteWorkerFleet`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the DeleteWorkerFleet as a reference. - pub fn as_input(&self) -> &crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::delete_worker_fleet::DeleteWorkerFleet::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::delete_worker_fleet::DeleteWorkerFleet::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::delete_worker_fleet::DeleteWorkerFleetOutput, - crate::operation::delete_worker_fleet::DeleteWorkerFleetError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Full ARN of the worker fleet. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Full ARN of the worker fleet. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/get_destination.rs b/sdk/iotroborunner/src/operation/get_destination.rs deleted file mode 100644 index 74b4a704094f..000000000000 --- a/sdk/iotroborunner/src/operation/get_destination.rs +++ /dev/null @@ -1,414 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `GetDestination`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct GetDestination; -impl GetDestination { - /// Creates a new `GetDestination` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_destination::GetDestinationInput, - ) -> ::std::result::Result< - crate::operation::get_destination::GetDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_destination::GetDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_destination::GetDestinationInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "GetDestination", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetDestination { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetDestination"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - GetDestinationRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - GetDestinationResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "GetDestination", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetDestination") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(GetDestinationEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::get_destination::GetDestinationError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::get_destination::GetDestinationError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::get_destination::GetDestinationError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct GetDestinationResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetDestinationResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_get_destination::de_get_destination_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_get_destination::de_get_destination_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct GetDestinationRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetDestinationRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::get_destination::GetDestinationInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/getDestination").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::get_destination::GetDestinationInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.id; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("id", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "cannot be empty or unset", - )); - } - query.push_kv("id", &::aws_smithy_http::query::fmt_string(inner_1)); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::get_destination::GetDestinationInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct GetDestinationEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetDestinationEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "GetDestinationEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to GetDestinationInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `GetDestinationError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum GetDestinationError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetDestinationError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl GetDestinationError { - /// Creates the `GetDestinationError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `GetDestinationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `GetDestinationError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `GetDestinationError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `GetDestinationError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `GetDestinationError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `GetDestinationError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for GetDestinationError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for GetDestinationError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for GetDestinationError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetDestinationError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetDestinationError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::get_destination::GetDestinationError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::get_destination::_get_destination_output::GetDestinationOutput; - -pub use crate::operation::get_destination::_get_destination_input::GetDestinationInput; - -mod _get_destination_input; - -mod _get_destination_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/get_destination/_get_destination_input.rs b/sdk/iotroborunner/src/operation/get_destination/_get_destination_input.rs deleted file mode 100644 index cf7244bae4ee..000000000000 --- a/sdk/iotroborunner/src/operation/get_destination/_get_destination_input.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetDestinationInput { - /// Destination ARN. - pub id: ::std::option::Option<::std::string::String>, -} -impl GetDestinationInput { - /// Destination ARN. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl GetDestinationInput { - /// Creates a new builder-style object to manufacture [`GetDestinationInput`](crate::operation::get_destination::GetDestinationInput). - pub fn builder() -> crate::operation::get_destination::builders::GetDestinationInputBuilder { - crate::operation::get_destination::builders::GetDestinationInputBuilder::default() - } -} - -/// A builder for [`GetDestinationInput`](crate::operation::get_destination::GetDestinationInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetDestinationInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl GetDestinationInputBuilder { - /// Destination ARN. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Destination ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`GetDestinationInput`](crate::operation::get_destination::GetDestinationInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_destination::GetDestinationInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_destination/_get_destination_output.rs b/sdk/iotroborunner/src/operation/get_destination/_get_destination_output.rs deleted file mode 100644 index c648a78e266b..000000000000 --- a/sdk/iotroborunner/src/operation/get_destination/_get_destination_output.rs +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetDestinationOutput { - /// Destination ARN. - pub arn: ::std::string::String, - /// Filters access by the destination's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Site ARN. - pub site: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// State of the destination. - pub state: crate::types::DestinationState, - /// JSON document containing additional fixed properties regarding the destination - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl GetDestinationOutput { - /// Destination ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the destination's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// State of the destination. - pub fn state(&self) -> &crate::types::DestinationState { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl ::aws_types::request_id::RequestId for GetDestinationOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl GetDestinationOutput { - /// Creates a new builder-style object to manufacture [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput). - pub fn builder() -> crate::operation::get_destination::builders::GetDestinationOutputBuilder { - crate::operation::get_destination::builders::GetDestinationOutputBuilder::default() - } -} - -/// A builder for [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetDestinationOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) state: ::std::option::Option, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl GetDestinationOutputBuilder { - /// Destination ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Destination ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the destination's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the destination's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the destination's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// State of the destination. - /// This field is required. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::arn) - /// - [`id`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::id) - /// - [`name`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::name) - /// - [`site`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::site) - /// - [`created_at`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::updated_at) - /// - [`state`](crate::operation::get_destination::builders::GetDestinationOutputBuilder::state) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_destination::GetDestinationOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building GetDestinationOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building GetDestinationOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building GetDestinationOutput", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building GetDestinationOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building GetDestinationOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building GetDestinationOutput", - ) - })?, - state: self.state.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "state", - "state was not specified but it is required when building GetDestinationOutput", - ) - })?, - additional_fixed_properties: self.additional_fixed_properties, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_destination/builders.rs b/sdk/iotroborunner/src/operation/get_destination/builders.rs deleted file mode 100644 index 966de591d985..000000000000 --- a/sdk/iotroborunner/src/operation/get_destination/builders.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::get_destination::_get_destination_output::GetDestinationOutputBuilder; - -pub use crate::operation::get_destination::_get_destination_input::GetDestinationInputBuilder; - -impl GetDestinationInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::get_destination::GetDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_destination::GetDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.get_destination(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `GetDestination`. -/// -/// Grants permission to get a destination -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct GetDestinationFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::get_destination::builders::GetDestinationInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::get_destination::GetDestinationOutput, - crate::operation::get_destination::GetDestinationError, - > for GetDestinationFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::get_destination::GetDestinationOutput, - crate::operation::get_destination::GetDestinationError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl GetDestinationFluentBuilder { - /// Creates a new `GetDestination`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the GetDestination as a reference. - pub fn as_input(&self) -> &crate::operation::get_destination::builders::GetDestinationInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::get_destination::GetDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_destination::GetDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::get_destination::GetDestination::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::get_destination::GetDestination::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::get_destination::GetDestinationOutput, - crate::operation::get_destination::GetDestinationError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Destination ARN. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Destination ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Destination ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/get_site.rs b/sdk/iotroborunner/src/operation/get_site.rs deleted file mode 100644 index f606466cd482..000000000000 --- a/sdk/iotroborunner/src/operation/get_site.rs +++ /dev/null @@ -1,404 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `GetSite`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct GetSite; -impl GetSite { - /// Creates a new `GetSite` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_site::GetSiteInput, - ) -> ::std::result::Result< - crate::operation::get_site::GetSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_site::GetSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = - |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { err.map_service_error(|err| err.downcast::().expect("correct error type")) }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_site::GetSiteInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "GetSite", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetSite { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetSite"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - GetSiteRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - GetSiteResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetSite", "iotroborunner")); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetSite") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(GetSiteEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::get_site::GetSiteError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::get_site::GetSiteError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::get_site::GetSiteError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct GetSiteResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetSiteResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_get_site::de_get_site_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_get_site::de_get_site_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct GetSiteRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetSiteRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input.downcast::().expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::get_site::GetSiteInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/getSite").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::get_site::GetSiteInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.id; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("id", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "cannot be empty or unset", - )); - } - query.push_kv("id", &::aws_smithy_http::query::fmt_string(inner_1)); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::get_site::GetSiteInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct GetSiteEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetSiteEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "GetSiteEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to GetSiteInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `GetSiteError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum GetSiteError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetSiteError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl GetSiteError { - /// Creates the `GetSiteError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `GetSiteError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `GetSiteError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `GetSiteError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `GetSiteError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `GetSiteError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `GetSiteError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for GetSiteError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for GetSiteError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for GetSiteError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetSiteError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetSiteError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::get_site::GetSiteError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::get_site::_get_site_output::GetSiteOutput; - -pub use crate::operation::get_site::_get_site_input::GetSiteInput; - -mod _get_site_input; - -mod _get_site_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/get_site/_get_site_input.rs b/sdk/iotroborunner/src/operation/get_site/_get_site_input.rs deleted file mode 100644 index 096b4bd22134..000000000000 --- a/sdk/iotroborunner/src/operation/get_site/_get_site_input.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetSiteInput { - /// Site ARN. - pub id: ::std::option::Option<::std::string::String>, -} -impl GetSiteInput { - /// Site ARN. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl GetSiteInput { - /// Creates a new builder-style object to manufacture [`GetSiteInput`](crate::operation::get_site::GetSiteInput). - pub fn builder() -> crate::operation::get_site::builders::GetSiteInputBuilder { - crate::operation::get_site::builders::GetSiteInputBuilder::default() - } -} - -/// A builder for [`GetSiteInput`](crate::operation::get_site::GetSiteInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetSiteInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl GetSiteInputBuilder { - /// Site ARN. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Site ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`GetSiteInput`](crate::operation::get_site::GetSiteInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_site::GetSiteInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_site/_get_site_output.rs b/sdk/iotroborunner/src/operation/get_site/_get_site_output.rs deleted file mode 100644 index 4e95b9820369..000000000000 --- a/sdk/iotroborunner/src/operation/get_site/_get_site_output.rs +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetSiteOutput { - /// Site ARN. - pub arn: ::std::string::String, - /// Filters access by the site's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub country_code: ::std::string::String, - /// A high-level description of the site. - pub description: ::std::option::Option<::std::string::String>, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - _request_id: Option, -} -impl GetSiteOutput { - /// Site ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the site's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(&self) -> &str { - use std::ops::Deref; - self.country_code.deref() - } - /// A high-level description of the site. - pub fn description(&self) -> ::std::option::Option<&str> { - self.description.as_deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } -} -impl ::aws_types::request_id::RequestId for GetSiteOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl GetSiteOutput { - /// Creates a new builder-style object to manufacture [`GetSiteOutput`](crate::operation::get_site::GetSiteOutput). - pub fn builder() -> crate::operation::get_site::builders::GetSiteOutputBuilder { - crate::operation::get_site::builders::GetSiteOutputBuilder::default() - } -} - -/// A builder for [`GetSiteOutput`](crate::operation::get_site::GetSiteOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetSiteOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) country_code: ::std::option::Option<::std::string::String>, - pub(crate) description: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - _request_id: Option, -} -impl GetSiteOutputBuilder { - /// Site ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Site ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the site's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the site's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the site's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - /// This field is required. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.country_code = ::std::option::Option::Some(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.country_code = input; - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - &self.country_code - } - /// A high-level description of the site. - pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.description = ::std::option::Option::Some(input.into()); - self - } - /// A high-level description of the site. - pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.description = input; - self - } - /// A high-level description of the site. - pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { - &self.description - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`GetSiteOutput`](crate::operation::get_site::GetSiteOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::get_site::builders::GetSiteOutputBuilder::arn) - /// - [`id`](crate::operation::get_site::builders::GetSiteOutputBuilder::id) - /// - [`name`](crate::operation::get_site::builders::GetSiteOutputBuilder::name) - /// - [`country_code`](crate::operation::get_site::builders::GetSiteOutputBuilder::country_code) - /// - [`created_at`](crate::operation::get_site::builders::GetSiteOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::get_site::builders::GetSiteOutputBuilder::updated_at) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_site::GetSiteOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building GetSiteOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building GetSiteOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building GetSiteOutput", - ) - })?, - country_code: self.country_code.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "country_code", - "country_code was not specified but it is required when building GetSiteOutput", - ) - })?, - description: self.description, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building GetSiteOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building GetSiteOutput", - ) - })?, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_site/builders.rs b/sdk/iotroborunner/src/operation/get_site/builders.rs deleted file mode 100644 index b4b09a1c552b..000000000000 --- a/sdk/iotroborunner/src/operation/get_site/builders.rs +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::get_site::_get_site_output::GetSiteOutputBuilder; - -pub use crate::operation::get_site::_get_site_input::GetSiteInputBuilder; - -impl GetSiteInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::get_site::GetSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_site::GetSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.get_site(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `GetSite`. -/// -/// Grants permission to get a site -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct GetSiteFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::get_site::builders::GetSiteInputBuilder, - config_override: ::std::option::Option, -} -impl crate::client::customize::internal::CustomizableSend - for GetSiteFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl GetSiteFluentBuilder { - /// Creates a new `GetSite`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the GetSite as a reference. - pub fn as_input(&self) -> &crate::operation::get_site::builders::GetSiteInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::get_site::GetSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_site::GetSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::get_site::GetSite::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::get_site::GetSite::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation - { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Site ARN. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Site ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Site ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/get_worker.rs b/sdk/iotroborunner/src/operation/get_worker.rs deleted file mode 100644 index d108cd3e79cb..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker.rs +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `GetWorker`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct GetWorker; -impl GetWorker { - /// Creates a new `GetWorker` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_worker::GetWorkerInput, - ) -> ::std::result::Result< - crate::operation::get_worker::GetWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_worker::GetWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_worker::GetWorkerInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "GetWorker", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetWorker { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetWorker"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - GetWorkerRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - GetWorkerResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "GetWorker", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetWorker") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(GetWorkerEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::get_worker::GetWorkerError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::get_worker::GetWorkerError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::get_worker::GetWorkerError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct GetWorkerResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetWorkerResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_get_worker::de_get_worker_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_get_worker::de_get_worker_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct GetWorkerRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetWorkerRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input.downcast::().expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::get_worker::GetWorkerInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/getWorker").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::get_worker::GetWorkerInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.id; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("id", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "cannot be empty or unset", - )); - } - query.push_kv("id", &::aws_smithy_http::query::fmt_string(inner_1)); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::get_worker::GetWorkerInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct GetWorkerEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetWorkerEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "GetWorkerEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to GetWorkerInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `GetWorkerError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum GetWorkerError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetWorkerError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl GetWorkerError { - /// Creates the `GetWorkerError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `GetWorkerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `GetWorkerError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `GetWorkerError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `GetWorkerError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `GetWorkerError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `GetWorkerError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for GetWorkerError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for GetWorkerError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for GetWorkerError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetWorkerError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetWorkerError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::get_worker::GetWorkerError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::get_worker::_get_worker_output::GetWorkerOutput; - -pub use crate::operation::get_worker::_get_worker_input::GetWorkerInput; - -mod _get_worker_input; - -mod _get_worker_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/get_worker/_get_worker_input.rs b/sdk/iotroborunner/src/operation/get_worker/_get_worker_input.rs deleted file mode 100644 index 2bb26e14694f..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker/_get_worker_input.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetWorkerInput { - /// Full ARN of the worker. - pub id: ::std::option::Option<::std::string::String>, -} -impl GetWorkerInput { - /// Full ARN of the worker. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl GetWorkerInput { - /// Creates a new builder-style object to manufacture [`GetWorkerInput`](crate::operation::get_worker::GetWorkerInput). - pub fn builder() -> crate::operation::get_worker::builders::GetWorkerInputBuilder { - crate::operation::get_worker::builders::GetWorkerInputBuilder::default() - } -} - -/// A builder for [`GetWorkerInput`](crate::operation::get_worker::GetWorkerInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetWorkerInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl GetWorkerInputBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Full ARN of the worker. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`GetWorkerInput`](crate::operation::get_worker::GetWorkerInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_worker::GetWorkerInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_worker/_get_worker_output.rs b/sdk/iotroborunner/src/operation/get_worker/_get_worker_output.rs deleted file mode 100644 index 3b5e83031b9a..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker/_get_worker_output.rs +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetWorkerOutput { - /// Full ARN of the worker. - pub arn: ::std::string::String, - /// Filters access by the workers identifier - pub id: ::std::string::String, - /// Full ARN of the worker fleet. - pub fleet: ::std::string::String, - /// Site ARN. - pub site: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub additional_transient_properties: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - /// Properties of the worker that are provided by the vendor FMS. - pub vendor_properties: ::std::option::Option, - /// Supported coordinates for worker position. - pub position: ::std::option::Option, - /// Worker orientation measured in units clockwise from north. - pub orientation: ::std::option::Option, - _request_id: Option, -} -impl GetWorkerOutput { - /// Full ARN of the worker. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the workers identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Full ARN of the worker fleet. - pub fn fleet(&self) -> &str { - use std::ops::Deref; - self.fleet.deref() - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(&self) -> ::std::option::Option<&str> { - self.additional_transient_properties.as_deref() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(&self) -> ::std::option::Option<&crate::types::VendorProperties> { - self.vendor_properties.as_ref() - } - /// Supported coordinates for worker position. - pub fn position(&self) -> ::std::option::Option<&crate::types::PositionCoordinates> { - self.position.as_ref() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(&self) -> ::std::option::Option<&crate::types::Orientation> { - self.orientation.as_ref() - } -} -impl ::aws_types::request_id::RequestId for GetWorkerOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl GetWorkerOutput { - /// Creates a new builder-style object to manufacture [`GetWorkerOutput`](crate::operation::get_worker::GetWorkerOutput). - pub fn builder() -> crate::operation::get_worker::builders::GetWorkerOutputBuilder { - crate::operation::get_worker::builders::GetWorkerOutputBuilder::default() - } -} - -/// A builder for [`GetWorkerOutput`](crate::operation::get_worker::GetWorkerOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetWorkerOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) fleet: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) additional_transient_properties: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - pub(crate) vendor_properties: ::std::option::Option, - pub(crate) position: ::std::option::Option, - pub(crate) orientation: ::std::option::Option, - _request_id: Option, -} -impl GetWorkerOutputBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the workers identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the workers identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the workers identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Full ARN of the worker fleet. - /// This field is required. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.fleet = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.fleet = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - &self.fleet - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_transient_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_transient_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_transient_properties - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.vendor_properties = ::std::option::Option::Some(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.vendor_properties = input; - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - &self.vendor_properties - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.position = ::std::option::Option::Some(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.position = input; - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - &self.position - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.orientation = ::std::option::Option::Some(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.orientation = input; - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - &self.orientation - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`GetWorkerOutput`](crate::operation::get_worker::GetWorkerOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::arn) - /// - [`id`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::id) - /// - [`fleet`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::fleet) - /// - [`site`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::site) - /// - [`created_at`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::updated_at) - /// - [`name`](crate::operation::get_worker::builders::GetWorkerOutputBuilder::name) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_worker::GetWorkerOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building GetWorkerOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building GetWorkerOutput", - ) - })?, - fleet: self.fleet.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "fleet", - "fleet was not specified but it is required when building GetWorkerOutput", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building GetWorkerOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building GetWorkerOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building GetWorkerOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building GetWorkerOutput", - ) - })?, - additional_transient_properties: self.additional_transient_properties, - additional_fixed_properties: self.additional_fixed_properties, - vendor_properties: self.vendor_properties, - position: self.position, - orientation: self.orientation, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_worker/builders.rs b/sdk/iotroborunner/src/operation/get_worker/builders.rs deleted file mode 100644 index c44299ec3624..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker/builders.rs +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::get_worker::_get_worker_output::GetWorkerOutputBuilder; - -pub use crate::operation::get_worker::_get_worker_input::GetWorkerInputBuilder; - -impl GetWorkerInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::get_worker::GetWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_worker::GetWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.get_worker(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `GetWorker`. -/// -/// Grants permission to get a worker -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct GetWorkerFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::get_worker::builders::GetWorkerInputBuilder, - config_override: ::std::option::Option, -} -impl crate::client::customize::internal::CustomizableSend - for GetWorkerFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl GetWorkerFluentBuilder { - /// Creates a new `GetWorker`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the GetWorker as a reference. - pub fn as_input(&self) -> &crate::operation::get_worker::builders::GetWorkerInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::get_worker::GetWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_worker::GetWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::get_worker::GetWorker::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::get_worker::GetWorker::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::get_worker::GetWorkerOutput, - crate::operation::get_worker::GetWorkerError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Full ARN of the worker. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Full ARN of the worker. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/get_worker_fleet.rs b/sdk/iotroborunner/src/operation/get_worker_fleet.rs deleted file mode 100644 index d00ef7d6e808..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker_fleet.rs +++ /dev/null @@ -1,414 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `GetWorkerFleet`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct GetWorkerFleet; -impl GetWorkerFleet { - /// Creates a new `GetWorkerFleet` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_worker_fleet::GetWorkerFleetInput, - ) -> ::std::result::Result< - crate::operation::get_worker_fleet::GetWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_worker_fleet::GetWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::get_worker_fleet::GetWorkerFleetInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "GetWorkerFleet", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetWorkerFleet { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetWorkerFleet"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - GetWorkerFleetRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - GetWorkerFleetResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "GetWorkerFleet", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetWorkerFleet") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(GetWorkerFleetEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::get_worker_fleet::GetWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::get_worker_fleet::GetWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::get_worker_fleet::GetWorkerFleetError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct GetWorkerFleetResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetWorkerFleetResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_get_worker_fleet::de_get_worker_fleet_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_get_worker_fleet::de_get_worker_fleet_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct GetWorkerFleetRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetWorkerFleetRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::get_worker_fleet::GetWorkerFleetInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/getWorkerFleet").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::get_worker_fleet::GetWorkerFleetInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.id; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("id", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "cannot be empty or unset", - )); - } - query.push_kv("id", &::aws_smithy_http::query::fmt_string(inner_1)); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::get_worker_fleet::GetWorkerFleetInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct GetWorkerFleetEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetWorkerFleetEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "GetWorkerFleetEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to GetWorkerFleetInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `GetWorkerFleetError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum GetWorkerFleetError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetWorkerFleetError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl GetWorkerFleetError { - /// Creates the `GetWorkerFleetError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `GetWorkerFleetError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `GetWorkerFleetError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `GetWorkerFleetError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `GetWorkerFleetError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `GetWorkerFleetError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `GetWorkerFleetError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for GetWorkerFleetError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for GetWorkerFleetError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for GetWorkerFleetError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetWorkerFleetError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetWorkerFleetError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::get_worker_fleet::GetWorkerFleetError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::get_worker_fleet::_get_worker_fleet_output::GetWorkerFleetOutput; - -pub use crate::operation::get_worker_fleet::_get_worker_fleet_input::GetWorkerFleetInput; - -mod _get_worker_fleet_input; - -mod _get_worker_fleet_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_input.rs b/sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_input.rs deleted file mode 100644 index d069b8dc65bc..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_input.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetWorkerFleetInput { - /// Full ARN of the worker fleet. - pub id: ::std::option::Option<::std::string::String>, -} -impl GetWorkerFleetInput { - /// Full ARN of the worker fleet. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } -} -impl GetWorkerFleetInput { - /// Creates a new builder-style object to manufacture [`GetWorkerFleetInput`](crate::operation::get_worker_fleet::GetWorkerFleetInput). - pub fn builder() -> crate::operation::get_worker_fleet::builders::GetWorkerFleetInputBuilder { - crate::operation::get_worker_fleet::builders::GetWorkerFleetInputBuilder::default() - } -} - -/// A builder for [`GetWorkerFleetInput`](crate::operation::get_worker_fleet::GetWorkerFleetInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetWorkerFleetInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, -} -impl GetWorkerFleetInputBuilder { - /// Full ARN of the worker fleet. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Consumes the builder and constructs a [`GetWorkerFleetInput`](crate::operation::get_worker_fleet::GetWorkerFleetInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_worker_fleet::GetWorkerFleetInput { id: self.id }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_output.rs b/sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_output.rs deleted file mode 100644 index 089c82e04cf1..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker_fleet/_get_worker_fleet_output.rs +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct GetWorkerFleetOutput { - /// Filters access by the worker fleet's identifier - pub id: ::std::string::String, - /// Full ARN of the worker fleet. - pub arn: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Site ARN. - pub site: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// JSON blob containing additional fixed properties regarding the worker fleet - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl GetWorkerFleetOutput { - /// Filters access by the worker fleet's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Full ARN of the worker fleet. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl ::aws_types::request_id::RequestId for GetWorkerFleetOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl GetWorkerFleetOutput { - /// Creates a new builder-style object to manufacture [`GetWorkerFleetOutput`](crate::operation::get_worker_fleet::GetWorkerFleetOutput). - pub fn builder() -> crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder { - crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::default() - } -} - -/// A builder for [`GetWorkerFleetOutput`](crate::operation::get_worker_fleet::GetWorkerFleetOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct GetWorkerFleetOutputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl GetWorkerFleetOutputBuilder { - /// Filters access by the worker fleet's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the worker fleet's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the worker fleet's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Full ARN of the worker fleet. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`GetWorkerFleetOutput`](crate::operation::get_worker_fleet::GetWorkerFleetOutput). - /// This method will fail if any of the following fields are not set: - /// - [`id`](crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::id) - /// - [`arn`](crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::arn) - /// - [`name`](crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::name) - /// - [`site`](crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::site) - /// - [`created_at`](crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::created_at) - /// - [`updated_at`](crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::updated_at) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::get_worker_fleet::GetWorkerFleetOutput { - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building GetWorkerFleetOutput", - ) - })?, - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building GetWorkerFleetOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building GetWorkerFleetOutput", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building GetWorkerFleetOutput", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building GetWorkerFleetOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building GetWorkerFleetOutput", - ) - })?, - additional_fixed_properties: self.additional_fixed_properties, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/get_worker_fleet/builders.rs b/sdk/iotroborunner/src/operation/get_worker_fleet/builders.rs deleted file mode 100644 index 08d059ef24d7..000000000000 --- a/sdk/iotroborunner/src/operation/get_worker_fleet/builders.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::get_worker_fleet::_get_worker_fleet_output::GetWorkerFleetOutputBuilder; - -pub use crate::operation::get_worker_fleet::_get_worker_fleet_input::GetWorkerFleetInputBuilder; - -impl GetWorkerFleetInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::get_worker_fleet::GetWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_worker_fleet::GetWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.get_worker_fleet(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `GetWorkerFleet`. -/// -/// Grants permission to get a worker fleet -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct GetWorkerFleetFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::get_worker_fleet::builders::GetWorkerFleetInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::get_worker_fleet::GetWorkerFleetOutput, - crate::operation::get_worker_fleet::GetWorkerFleetError, - > for GetWorkerFleetFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::get_worker_fleet::GetWorkerFleetOutput, - crate::operation::get_worker_fleet::GetWorkerFleetError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl GetWorkerFleetFluentBuilder { - /// Creates a new `GetWorkerFleet`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the GetWorkerFleet as a reference. - pub fn as_input(&self) -> &crate::operation::get_worker_fleet::builders::GetWorkerFleetInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::get_worker_fleet::GetWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::get_worker_fleet::GetWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::get_worker_fleet::GetWorkerFleet::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::get_worker_fleet::GetWorkerFleet::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::get_worker_fleet::GetWorkerFleetOutput, - crate::operation::get_worker_fleet::GetWorkerFleetError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Full ARN of the worker fleet. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Full ARN of the worker fleet. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } -} diff --git a/sdk/iotroborunner/src/operation/list_destinations.rs b/sdk/iotroborunner/src/operation/list_destinations.rs deleted file mode 100644 index c708ff43d852..000000000000 --- a/sdk/iotroborunner/src/operation/list_destinations.rs +++ /dev/null @@ -1,432 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `ListDestinations`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct ListDestinations; -impl ListDestinations { - /// Creates a new `ListDestinations` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_destinations::ListDestinationsInput, - ) -> ::std::result::Result< - crate::operation::list_destinations::ListDestinationsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_destinations::ListDestinationsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_destinations::ListDestinationsInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "ListDestinations", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListDestinations { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListDestinations"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - ListDestinationsRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - ListDestinationsResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "ListDestinations", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListDestinations") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(ListDestinationsEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::list_destinations::ListDestinationsError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::list_destinations::ListDestinationsError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::list_destinations::ListDestinationsError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct ListDestinationsResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListDestinationsResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_list_destinations::de_list_destinations_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_list_destinations::de_list_destinations_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct ListDestinationsRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListDestinationsRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::list_destinations::ListDestinationsInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/listDestinations").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::list_destinations::ListDestinationsInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.site; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("site", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "cannot be empty or unset", - )); - } - query.push_kv("site", &::aws_smithy_http::query::fmt_string(inner_1)); - if let ::std::option::Option::Some(inner_2) = &_input.max_results { - { - query.push_kv("maxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode()); - } - } - if let ::std::option::Option::Some(inner_3) = &_input.next_token { - { - query.push_kv("nextToken", &::aws_smithy_http::query::fmt_string(inner_3)); - } - } - if let ::std::option::Option::Some(inner_4) = &_input.state { - { - query.push_kv("state", &::aws_smithy_http::query::fmt_string(inner_4)); - } - } - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::list_destinations::ListDestinationsInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct ListDestinationsEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListDestinationsEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "ListDestinationsEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to ListDestinationsInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `ListDestinationsError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum ListDestinationsError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListDestinationsError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl ListDestinationsError { - /// Creates the `ListDestinationsError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `ListDestinationsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `ListDestinationsError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `ListDestinationsError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `ListDestinationsError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `ListDestinationsError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `ListDestinationsError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for ListDestinationsError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for ListDestinationsError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for ListDestinationsError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListDestinationsError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListDestinationsError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::list_destinations::ListDestinationsError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::list_destinations::_list_destinations_output::ListDestinationsOutput; - -pub use crate::operation::list_destinations::_list_destinations_input::ListDestinationsInput; - -mod _list_destinations_input; - -mod _list_destinations_output; - -/// Builders -pub mod builders; - -/// Paginator for this operation -pub mod paginator; diff --git a/sdk/iotroborunner/src/operation/list_destinations/_list_destinations_input.rs b/sdk/iotroborunner/src/operation/list_destinations/_list_destinations_input.rs deleted file mode 100644 index c2c44d2671d8..000000000000 --- a/sdk/iotroborunner/src/operation/list_destinations/_list_destinations_input.rs +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListDestinationsInput { - /// Site ARN. - pub site: ::std::option::Option<::std::string::String>, - /// Maximum number of results to retrieve in a single call. - pub max_results: ::std::option::Option, - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, - /// State of the destination. - pub state: ::std::option::Option, -} -impl ListDestinationsInput { - /// Site ARN. - pub fn site(&self) -> ::std::option::Option<&str> { - self.site.as_deref() - } - /// Maximum number of results to retrieve in a single call. - pub fn max_results(&self) -> ::std::option::Option { - self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } - /// State of the destination. - pub fn state(&self) -> ::std::option::Option<&crate::types::DestinationState> { - self.state.as_ref() - } -} -impl ListDestinationsInput { - /// Creates a new builder-style object to manufacture [`ListDestinationsInput`](crate::operation::list_destinations::ListDestinationsInput). - pub fn builder() -> crate::operation::list_destinations::builders::ListDestinationsInputBuilder { - crate::operation::list_destinations::builders::ListDestinationsInputBuilder::default() - } -} - -/// A builder for [`ListDestinationsInput`](crate::operation::list_destinations::ListDestinationsInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListDestinationsInputBuilder { - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) max_results: ::std::option::Option, - pub(crate) next_token: ::std::option::Option<::std::string::String>, - pub(crate) state: ::std::option::Option, -} -impl ListDestinationsInputBuilder { - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Maximum number of results to retrieve in a single call. - pub fn max_results(mut self, input: i32) -> Self { - self.max_results = ::std::option::Option::Some(input); - self - } - /// Maximum number of results to retrieve in a single call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.max_results = input; - self - } - /// Maximum number of results to retrieve in a single call. - pub fn get_max_results(&self) -> &::std::option::Option { - &self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// State of the destination. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - /// Consumes the builder and constructs a [`ListDestinationsInput`](crate::operation::list_destinations::ListDestinationsInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::list_destinations::ListDestinationsInput { - site: self.site, - max_results: self.max_results, - next_token: self.next_token, - state: self.state, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/list_destinations/_list_destinations_output.rs b/sdk/iotroborunner/src/operation/list_destinations/_list_destinations_output.rs deleted file mode 100644 index 3dedde4279b4..000000000000 --- a/sdk/iotroborunner/src/operation/list_destinations/_list_destinations_output.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListDestinationsOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, - /// List of destinations. - pub destinations: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListDestinationsOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } - /// List of destinations. - /// - /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.destinations.is_none()`. - pub fn destinations(&self) -> &[crate::types::Destination] { - self.destinations.as_deref().unwrap_or_default() - } -} -impl ::aws_types::request_id::RequestId for ListDestinationsOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl ListDestinationsOutput { - /// Creates a new builder-style object to manufacture [`ListDestinationsOutput`](crate::operation::list_destinations::ListDestinationsOutput). - pub fn builder() -> crate::operation::list_destinations::builders::ListDestinationsOutputBuilder { - crate::operation::list_destinations::builders::ListDestinationsOutputBuilder::default() - } -} - -/// A builder for [`ListDestinationsOutput`](crate::operation::list_destinations::ListDestinationsOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListDestinationsOutputBuilder { - pub(crate) next_token: ::std::option::Option<::std::string::String>, - pub(crate) destinations: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListDestinationsOutputBuilder { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Appends an item to `destinations`. - /// - /// To override the contents of this collection use [`set_destinations`](Self::set_destinations). - /// - /// List of destinations. - pub fn destinations(mut self, input: crate::types::Destination) -> Self { - let mut v = self.destinations.unwrap_or_default(); - v.push(input); - self.destinations = ::std::option::Option::Some(v); - self - } - /// List of destinations. - pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { - self.destinations = input; - self - } - /// List of destinations. - pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec> { - &self.destinations - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`ListDestinationsOutput`](crate::operation::list_destinations::ListDestinationsOutput). - pub fn build(self) -> crate::operation::list_destinations::ListDestinationsOutput { - crate::operation::list_destinations::ListDestinationsOutput { - next_token: self.next_token, - destinations: self.destinations, - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/list_destinations/builders.rs b/sdk/iotroborunner/src/operation/list_destinations/builders.rs deleted file mode 100644 index d246f9c6b37d..000000000000 --- a/sdk/iotroborunner/src/operation/list_destinations/builders.rs +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::list_destinations::_list_destinations_output::ListDestinationsOutputBuilder; - -pub use crate::operation::list_destinations::_list_destinations_input::ListDestinationsInputBuilder; - -impl ListDestinationsInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::list_destinations::ListDestinationsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_destinations::ListDestinationsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.list_destinations(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `ListDestinations`. -/// -/// Grants permission to list destinations -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct ListDestinationsFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::list_destinations::builders::ListDestinationsInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::list_destinations::ListDestinationsOutput, - crate::operation::list_destinations::ListDestinationsError, - > for ListDestinationsFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::list_destinations::ListDestinationsOutput, - crate::operation::list_destinations::ListDestinationsError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl ListDestinationsFluentBuilder { - /// Creates a new `ListDestinations`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the ListDestinations as a reference. - pub fn as_input(&self) -> &crate::operation::list_destinations::builders::ListDestinationsInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::list_destinations::ListDestinationsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_destinations::ListDestinationsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::list_destinations::ListDestinations::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::list_destinations::ListDestinations::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::list_destinations::ListDestinationsOutput, - crate::operation::list_destinations::ListDestinationsError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Create a paginator for this request - /// - /// Paginators are used by calling [`send().await`](crate::operation::list_destinations::paginator::ListDestinationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream). - pub fn into_paginator(self) -> crate::operation::list_destinations::paginator::ListDestinationsPaginator { - crate::operation::list_destinations::paginator::ListDestinationsPaginator::new(self.handle, self.inner) - } - /// Site ARN. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.site(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_site(input); - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_site() - } - /// Maximum number of results to retrieve in a single call. - pub fn max_results(mut self, input: i32) -> Self { - self.inner = self.inner.max_results(input); - self - } - /// Maximum number of results to retrieve in a single call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_max_results(input); - self - } - /// Maximum number of results to retrieve in a single call. - pub fn get_max_results(&self) -> &::std::option::Option { - self.inner.get_max_results() - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.next_token(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_next_token(input); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_next_token() - } - /// State of the destination. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.inner = self.inner.state(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_state(input); - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - self.inner.get_state() - } -} diff --git a/sdk/iotroborunner/src/operation/list_destinations/paginator.rs b/sdk/iotroborunner/src/operation/list_destinations/paginator.rs deleted file mode 100644 index 7f4133a115ce..000000000000 --- a/sdk/iotroborunner/src/operation/list_destinations/paginator.rs +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Paginator for [`ListDestinations`](crate::operation::list_destinations::ListDestinations) -pub struct ListDestinationsPaginator { - handle: std::sync::Arc, - builder: crate::operation::list_destinations::builders::ListDestinationsInputBuilder, - stop_on_duplicate_token: bool, -} - -impl ListDestinationsPaginator { - /// Create a new paginator-wrapper - pub(crate) fn new( - handle: std::sync::Arc, - builder: crate::operation::list_destinations::builders::ListDestinationsInputBuilder, - ) -> Self { - Self { - handle, - builder, - stop_on_duplicate_token: true, - } - } - - /// Set the page size - /// - /// _Note: this method will override any previously set value for `max_results`_ - pub fn page_size(mut self, limit: i32) -> Self { - self.builder.max_results = ::std::option::Option::Some(limit); - self - } - - /// Create a flattened paginator - /// - /// This paginator automatically flattens results using `destinations`. Queries to the underlying service - /// are dispatched lazily. - pub fn items(self) -> crate::operation::list_destinations::paginator::ListDestinationsPaginatorItems { - crate::operation::list_destinations::paginator::ListDestinationsPaginatorItems(self) - } - - /// Stop paginating when the service returns the same pagination token twice in a row. - /// - /// Defaults to true. - /// - /// For certain operations, it may be useful to continue on duplicate token. For example, - /// if an operation is for tailing a log file in real-time, then continuing may be desired. - /// This option can be set to `false` to accommodate these use cases. - pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self { - self.stop_on_duplicate_token = stop_on_duplicate_token; - self - } - - /// Create the pagination stream - /// - /// _Note:_ No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::operation::list_destinations::ListDestinationsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_destinations::ListDestinationsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - // Move individual fields out of self for the borrow checker - let builder = self.builder; - let handle = self.handle; - let runtime_plugins = crate::operation::list_destinations::ListDestinations::operation_runtime_plugins( - handle.runtime_plugins.clone(), - &handle.conf, - ::std::option::Option::None, - ); - ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new( - move |tx| { - ::std::boxed::Box::pin(async move { - // Build the input for the first time. If required fields are missing, this is where we'll produce an early error. - let mut input = match builder - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure) - { - ::std::result::Result::Ok(input) => input, - ::std::result::Result::Err(e) => { - let _ = tx.send(::std::result::Result::Err(e)).await; - return; - } - }; - loop { - let resp = crate::operation::list_destinations::ListDestinations::orchestrate(&runtime_plugins, input.clone()).await; - // If the input member is None or it was an error - let done = match resp { - ::std::result::Result::Ok(ref resp) => { - let new_token = crate::lens::reflens_list_destinations_output_output_next_token(resp); - let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true); - if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token { - true - } else { - input.next_token = new_token.cloned(); - is_empty - } - } - ::std::result::Result::Err(_) => true, - }; - if tx.send(resp).await.is_err() { - // receiving end was dropped - return; - } - if done { - return; - } - } - }) - }, - )) - } -} - -/// Flattened paginator for `ListDestinationsPaginator` -/// -/// This is created with [`.items()`](ListDestinationsPaginator::items) -pub struct ListDestinationsPaginatorItems(ListDestinationsPaginator); - -impl ListDestinationsPaginatorItems { - /// Create the pagination stream - /// - /// _Note_: No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - /// - /// To read the entirety of the paginator, use [`.collect::, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::types::Destination, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_destinations::ListDestinationsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| { - crate::lens::lens_list_destinations_output_output_destinations(page) - .unwrap_or_default() - .into_iter() - }) - } -} diff --git a/sdk/iotroborunner/src/operation/list_sites.rs b/sdk/iotroborunner/src/operation/list_sites.rs deleted file mode 100644 index 4cc8565dbf9c..000000000000 --- a/sdk/iotroborunner/src/operation/list_sites.rs +++ /dev/null @@ -1,403 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `ListSites`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct ListSites; -impl ListSites { - /// Creates a new `ListSites` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_sites::ListSitesInput, - ) -> ::std::result::Result< - crate::operation::list_sites::ListSitesOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_sites::ListSitesError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_sites::ListSitesInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "ListSites", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListSites { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListSites"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - ListSitesRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - ListSitesResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "ListSites", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListSites") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(ListSitesEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::list_sites::ListSitesError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::list_sites::ListSitesError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::list_sites::ListSitesError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct ListSitesResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListSitesResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_list_sites::de_list_sites_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_list_sites::de_list_sites_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct ListSitesRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListSitesRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input.downcast::().expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::list_sites::ListSitesInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/listSites").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::list_sites::ListSitesInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - if let ::std::option::Option::Some(inner_1) = &_input.max_results { - { - query.push_kv("maxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_1).encode()); - } - } - if let ::std::option::Option::Some(inner_2) = &_input.next_token { - { - query.push_kv("nextToken", &::aws_smithy_http::query::fmt_string(inner_2)); - } - } - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::list_sites::ListSitesInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct ListSitesEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListSitesEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "ListSitesEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to ListSitesInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `ListSitesError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum ListSitesError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListSitesError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl ListSitesError { - /// Creates the `ListSitesError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `ListSitesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `ListSitesError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `ListSitesError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `ListSitesError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `ListSitesError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for ListSitesError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for ListSitesError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for ListSitesError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListSitesError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListSitesError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::list_sites::ListSitesError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::list_sites::_list_sites_output::ListSitesOutput; - -pub use crate::operation::list_sites::_list_sites_input::ListSitesInput; - -mod _list_sites_input; - -mod _list_sites_output; - -/// Builders -pub mod builders; - -/// Paginator for this operation -pub mod paginator; diff --git a/sdk/iotroborunner/src/operation/list_sites/_list_sites_input.rs b/sdk/iotroborunner/src/operation/list_sites/_list_sites_input.rs deleted file mode 100644 index 99c3c624608b..000000000000 --- a/sdk/iotroborunner/src/operation/list_sites/_list_sites_input.rs +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListSitesInput { - /// Maximum number of results to retrieve in a single ListSites call. - pub max_results: ::std::option::Option, - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, -} -impl ListSitesInput { - /// Maximum number of results to retrieve in a single ListSites call. - pub fn max_results(&self) -> ::std::option::Option { - self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } -} -impl ListSitesInput { - /// Creates a new builder-style object to manufacture [`ListSitesInput`](crate::operation::list_sites::ListSitesInput). - pub fn builder() -> crate::operation::list_sites::builders::ListSitesInputBuilder { - crate::operation::list_sites::builders::ListSitesInputBuilder::default() - } -} - -/// A builder for [`ListSitesInput`](crate::operation::list_sites::ListSitesInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListSitesInputBuilder { - pub(crate) max_results: ::std::option::Option, - pub(crate) next_token: ::std::option::Option<::std::string::String>, -} -impl ListSitesInputBuilder { - /// Maximum number of results to retrieve in a single ListSites call. - pub fn max_results(mut self, input: i32) -> Self { - self.max_results = ::std::option::Option::Some(input); - self - } - /// Maximum number of results to retrieve in a single ListSites call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.max_results = input; - self - } - /// Maximum number of results to retrieve in a single ListSites call. - pub fn get_max_results(&self) -> &::std::option::Option { - &self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Consumes the builder and constructs a [`ListSitesInput`](crate::operation::list_sites::ListSitesInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::list_sites::ListSitesInput { - max_results: self.max_results, - next_token: self.next_token, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/list_sites/_list_sites_output.rs b/sdk/iotroborunner/src/operation/list_sites/_list_sites_output.rs deleted file mode 100644 index ade2fa5c464d..000000000000 --- a/sdk/iotroborunner/src/operation/list_sites/_list_sites_output.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListSitesOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, - /// List of facilities. - pub sites: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListSitesOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } - /// List of facilities. - /// - /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sites.is_none()`. - pub fn sites(&self) -> &[crate::types::Site] { - self.sites.as_deref().unwrap_or_default() - } -} -impl ::aws_types::request_id::RequestId for ListSitesOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl ListSitesOutput { - /// Creates a new builder-style object to manufacture [`ListSitesOutput`](crate::operation::list_sites::ListSitesOutput). - pub fn builder() -> crate::operation::list_sites::builders::ListSitesOutputBuilder { - crate::operation::list_sites::builders::ListSitesOutputBuilder::default() - } -} - -/// A builder for [`ListSitesOutput`](crate::operation::list_sites::ListSitesOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListSitesOutputBuilder { - pub(crate) next_token: ::std::option::Option<::std::string::String>, - pub(crate) sites: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListSitesOutputBuilder { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Appends an item to `sites`. - /// - /// To override the contents of this collection use [`set_sites`](Self::set_sites). - /// - /// List of facilities. - pub fn sites(mut self, input: crate::types::Site) -> Self { - let mut v = self.sites.unwrap_or_default(); - v.push(input); - self.sites = ::std::option::Option::Some(v); - self - } - /// List of facilities. - pub fn set_sites(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { - self.sites = input; - self - } - /// List of facilities. - pub fn get_sites(&self) -> &::std::option::Option<::std::vec::Vec> { - &self.sites - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`ListSitesOutput`](crate::operation::list_sites::ListSitesOutput). - pub fn build(self) -> crate::operation::list_sites::ListSitesOutput { - crate::operation::list_sites::ListSitesOutput { - next_token: self.next_token, - sites: self.sites, - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/list_sites/builders.rs b/sdk/iotroborunner/src/operation/list_sites/builders.rs deleted file mode 100644 index 0273a4317303..000000000000 --- a/sdk/iotroborunner/src/operation/list_sites/builders.rs +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::list_sites::_list_sites_output::ListSitesOutputBuilder; - -pub use crate::operation::list_sites::_list_sites_input::ListSitesInputBuilder; - -impl ListSitesInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::list_sites::ListSitesOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_sites::ListSitesError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.list_sites(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `ListSites`. -/// -/// Grants permission to list sites -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct ListSitesFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::list_sites::builders::ListSitesInputBuilder, - config_override: ::std::option::Option, -} -impl crate::client::customize::internal::CustomizableSend - for ListSitesFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl ListSitesFluentBuilder { - /// Creates a new `ListSites`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the ListSites as a reference. - pub fn as_input(&self) -> &crate::operation::list_sites::builders::ListSitesInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::list_sites::ListSitesOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_sites::ListSitesError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::list_sites::ListSites::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::list_sites::ListSites::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::list_sites::ListSitesOutput, - crate::operation::list_sites::ListSitesError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Create a paginator for this request - /// - /// Paginators are used by calling [`send().await`](crate::operation::list_sites::paginator::ListSitesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream). - pub fn into_paginator(self) -> crate::operation::list_sites::paginator::ListSitesPaginator { - crate::operation::list_sites::paginator::ListSitesPaginator::new(self.handle, self.inner) - } - /// Maximum number of results to retrieve in a single ListSites call. - pub fn max_results(mut self, input: i32) -> Self { - self.inner = self.inner.max_results(input); - self - } - /// Maximum number of results to retrieve in a single ListSites call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_max_results(input); - self - } - /// Maximum number of results to retrieve in a single ListSites call. - pub fn get_max_results(&self) -> &::std::option::Option { - self.inner.get_max_results() - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.next_token(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_next_token(input); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_next_token() - } -} diff --git a/sdk/iotroborunner/src/operation/list_sites/paginator.rs b/sdk/iotroborunner/src/operation/list_sites/paginator.rs deleted file mode 100644 index aefb30d888f6..000000000000 --- a/sdk/iotroborunner/src/operation/list_sites/paginator.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Paginator for [`ListSites`](crate::operation::list_sites::ListSites) -pub struct ListSitesPaginator { - handle: std::sync::Arc, - builder: crate::operation::list_sites::builders::ListSitesInputBuilder, - stop_on_duplicate_token: bool, -} - -impl ListSitesPaginator { - /// Create a new paginator-wrapper - pub(crate) fn new(handle: std::sync::Arc, builder: crate::operation::list_sites::builders::ListSitesInputBuilder) -> Self { - Self { - handle, - builder, - stop_on_duplicate_token: true, - } - } - - /// Set the page size - /// - /// _Note: this method will override any previously set value for `max_results`_ - pub fn page_size(mut self, limit: i32) -> Self { - self.builder.max_results = ::std::option::Option::Some(limit); - self - } - - /// Create a flattened paginator - /// - /// This paginator automatically flattens results using `sites`. Queries to the underlying service - /// are dispatched lazily. - pub fn items(self) -> crate::operation::list_sites::paginator::ListSitesPaginatorItems { - crate::operation::list_sites::paginator::ListSitesPaginatorItems(self) - } - - /// Stop paginating when the service returns the same pagination token twice in a row. - /// - /// Defaults to true. - /// - /// For certain operations, it may be useful to continue on duplicate token. For example, - /// if an operation is for tailing a log file in real-time, then continuing may be desired. - /// This option can be set to `false` to accommodate these use cases. - pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self { - self.stop_on_duplicate_token = stop_on_duplicate_token; - self - } - - /// Create the pagination stream - /// - /// _Note:_ No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::operation::list_sites::ListSitesOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_sites::ListSitesError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - // Move individual fields out of self for the borrow checker - let builder = self.builder; - let handle = self.handle; - let runtime_plugins = crate::operation::list_sites::ListSites::operation_runtime_plugins( - handle.runtime_plugins.clone(), - &handle.conf, - ::std::option::Option::None, - ); - ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new( - move |tx| { - ::std::boxed::Box::pin(async move { - // Build the input for the first time. If required fields are missing, this is where we'll produce an early error. - let mut input = match builder - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure) - { - ::std::result::Result::Ok(input) => input, - ::std::result::Result::Err(e) => { - let _ = tx.send(::std::result::Result::Err(e)).await; - return; - } - }; - loop { - let resp = crate::operation::list_sites::ListSites::orchestrate(&runtime_plugins, input.clone()).await; - // If the input member is None or it was an error - let done = match resp { - ::std::result::Result::Ok(ref resp) => { - let new_token = crate::lens::reflens_list_sites_output_output_next_token(resp); - let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true); - if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token { - true - } else { - input.next_token = new_token.cloned(); - is_empty - } - } - ::std::result::Result::Err(_) => true, - }; - if tx.send(resp).await.is_err() { - // receiving end was dropped - return; - } - if done { - return; - } - } - }) - }, - )) - } -} - -/// Flattened paginator for `ListSitesPaginator` -/// -/// This is created with [`.items()`](ListSitesPaginator::items) -pub struct ListSitesPaginatorItems(ListSitesPaginator); - -impl ListSitesPaginatorItems { - /// Create the pagination stream - /// - /// _Note_: No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - /// - /// To read the entirety of the paginator, use [`.collect::, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::types::Site, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_sites::ListSitesError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()) - .flat_map(|page| crate::lens::lens_list_sites_output_output_sites(page).unwrap_or_default().into_iter()) - } -} diff --git a/sdk/iotroborunner/src/operation/list_worker_fleets.rs b/sdk/iotroborunner/src/operation/list_worker_fleets.rs deleted file mode 100644 index 3083bf11498f..000000000000 --- a/sdk/iotroborunner/src/operation/list_worker_fleets.rs +++ /dev/null @@ -1,427 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `ListWorkerFleets`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct ListWorkerFleets; -impl ListWorkerFleets { - /// Creates a new `ListWorkerFleets` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_worker_fleets::ListWorkerFleetsInput, - ) -> ::std::result::Result< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_worker_fleets::ListWorkerFleetsInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "ListWorkerFleets", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListWorkerFleets { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListWorkerFleets"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - ListWorkerFleetsRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - ListWorkerFleetsResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "ListWorkerFleets", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListWorkerFleets") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(ListWorkerFleetsEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct ListWorkerFleetsResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListWorkerFleetsResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_list_worker_fleets::de_list_worker_fleets_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_list_worker_fleets::de_list_worker_fleets_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct ListWorkerFleetsRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListWorkerFleetsRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::list_worker_fleets::ListWorkerFleetsInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/listWorkerFleets").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::list_worker_fleets::ListWorkerFleetsInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.site; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("site", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "cannot be empty or unset", - )); - } - query.push_kv("site", &::aws_smithy_http::query::fmt_string(inner_1)); - if let ::std::option::Option::Some(inner_2) = &_input.max_results { - { - query.push_kv("maxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode()); - } - } - if let ::std::option::Option::Some(inner_3) = &_input.next_token { - { - query.push_kv("nextToken", &::aws_smithy_http::query::fmt_string(inner_3)); - } - } - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::list_worker_fleets::ListWorkerFleetsInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct ListWorkerFleetsEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListWorkerFleetsEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "ListWorkerFleetsEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to ListWorkerFleetsInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `ListWorkerFleetsError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum ListWorkerFleetsError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListWorkerFleetsError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl ListWorkerFleetsError { - /// Creates the `ListWorkerFleetsError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `ListWorkerFleetsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `ListWorkerFleetsError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `ListWorkerFleetsError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `ListWorkerFleetsError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `ListWorkerFleetsError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `ListWorkerFleetsError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for ListWorkerFleetsError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for ListWorkerFleetsError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for ListWorkerFleetsError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListWorkerFleetsError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListWorkerFleetsError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::list_worker_fleets::ListWorkerFleetsError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::list_worker_fleets::_list_worker_fleets_output::ListWorkerFleetsOutput; - -pub use crate::operation::list_worker_fleets::_list_worker_fleets_input::ListWorkerFleetsInput; - -mod _list_worker_fleets_input; - -mod _list_worker_fleets_output; - -/// Builders -pub mod builders; - -/// Paginator for this operation -pub mod paginator; diff --git a/sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_input.rs b/sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_input.rs deleted file mode 100644 index 6bfebe26d92f..000000000000 --- a/sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_input.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListWorkerFleetsInput { - /// Site ARN. - pub site: ::std::option::Option<::std::string::String>, - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub max_results: ::std::option::Option, - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, -} -impl ListWorkerFleetsInput { - /// Site ARN. - pub fn site(&self) -> ::std::option::Option<&str> { - self.site.as_deref() - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn max_results(&self) -> ::std::option::Option { - self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } -} -impl ListWorkerFleetsInput { - /// Creates a new builder-style object to manufacture [`ListWorkerFleetsInput`](crate::operation::list_worker_fleets::ListWorkerFleetsInput). - pub fn builder() -> crate::operation::list_worker_fleets::builders::ListWorkerFleetsInputBuilder { - crate::operation::list_worker_fleets::builders::ListWorkerFleetsInputBuilder::default() - } -} - -/// A builder for [`ListWorkerFleetsInput`](crate::operation::list_worker_fleets::ListWorkerFleetsInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListWorkerFleetsInputBuilder { - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) max_results: ::std::option::Option, - pub(crate) next_token: ::std::option::Option<::std::string::String>, -} -impl ListWorkerFleetsInputBuilder { - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn max_results(mut self, input: i32) -> Self { - self.max_results = ::std::option::Option::Some(input); - self - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.max_results = input; - self - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn get_max_results(&self) -> &::std::option::Option { - &self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Consumes the builder and constructs a [`ListWorkerFleetsInput`](crate::operation::list_worker_fleets::ListWorkerFleetsInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::list_worker_fleets::ListWorkerFleetsInput { - site: self.site, - max_results: self.max_results, - next_token: self.next_token, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_output.rs b/sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_output.rs deleted file mode 100644 index e186764de404..000000000000 --- a/sdk/iotroborunner/src/operation/list_worker_fleets/_list_worker_fleets_output.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListWorkerFleetsOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, - /// List of worker fleets. - pub worker_fleets: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListWorkerFleetsOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } - /// List of worker fleets. - /// - /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.worker_fleets.is_none()`. - pub fn worker_fleets(&self) -> &[crate::types::WorkerFleet] { - self.worker_fleets.as_deref().unwrap_or_default() - } -} -impl ::aws_types::request_id::RequestId for ListWorkerFleetsOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl ListWorkerFleetsOutput { - /// Creates a new builder-style object to manufacture [`ListWorkerFleetsOutput`](crate::operation::list_worker_fleets::ListWorkerFleetsOutput). - pub fn builder() -> crate::operation::list_worker_fleets::builders::ListWorkerFleetsOutputBuilder { - crate::operation::list_worker_fleets::builders::ListWorkerFleetsOutputBuilder::default() - } -} - -/// A builder for [`ListWorkerFleetsOutput`](crate::operation::list_worker_fleets::ListWorkerFleetsOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListWorkerFleetsOutputBuilder { - pub(crate) next_token: ::std::option::Option<::std::string::String>, - pub(crate) worker_fleets: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListWorkerFleetsOutputBuilder { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Appends an item to `worker_fleets`. - /// - /// To override the contents of this collection use [`set_worker_fleets`](Self::set_worker_fleets). - /// - /// List of worker fleets. - pub fn worker_fleets(mut self, input: crate::types::WorkerFleet) -> Self { - let mut v = self.worker_fleets.unwrap_or_default(); - v.push(input); - self.worker_fleets = ::std::option::Option::Some(v); - self - } - /// List of worker fleets. - pub fn set_worker_fleets(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { - self.worker_fleets = input; - self - } - /// List of worker fleets. - pub fn get_worker_fleets(&self) -> &::std::option::Option<::std::vec::Vec> { - &self.worker_fleets - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`ListWorkerFleetsOutput`](crate::operation::list_worker_fleets::ListWorkerFleetsOutput). - pub fn build(self) -> crate::operation::list_worker_fleets::ListWorkerFleetsOutput { - crate::operation::list_worker_fleets::ListWorkerFleetsOutput { - next_token: self.next_token, - worker_fleets: self.worker_fleets, - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/list_worker_fleets/builders.rs b/sdk/iotroborunner/src/operation/list_worker_fleets/builders.rs deleted file mode 100644 index d06287d0e09e..000000000000 --- a/sdk/iotroborunner/src/operation/list_worker_fleets/builders.rs +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::list_worker_fleets::_list_worker_fleets_output::ListWorkerFleetsOutputBuilder; - -pub use crate::operation::list_worker_fleets::_list_worker_fleets_input::ListWorkerFleetsInputBuilder; - -impl ListWorkerFleetsInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.list_worker_fleets(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `ListWorkerFleets`. -/// -/// Grants permission to list worker fleets -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct ListWorkerFleetsFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::list_worker_fleets::builders::ListWorkerFleetsInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - crate::operation::list_worker_fleets::ListWorkerFleetsError, - > for ListWorkerFleetsFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - crate::operation::list_worker_fleets::ListWorkerFleetsError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl ListWorkerFleetsFluentBuilder { - /// Creates a new `ListWorkerFleets`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the ListWorkerFleets as a reference. - pub fn as_input(&self) -> &crate::operation::list_worker_fleets::builders::ListWorkerFleetsInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::list_worker_fleets::ListWorkerFleets::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::list_worker_fleets::ListWorkerFleets::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - crate::operation::list_worker_fleets::ListWorkerFleetsError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Create a paginator for this request - /// - /// Paginators are used by calling [`send().await`](crate::operation::list_worker_fleets::paginator::ListWorkerFleetsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream). - pub fn into_paginator(self) -> crate::operation::list_worker_fleets::paginator::ListWorkerFleetsPaginator { - crate::operation::list_worker_fleets::paginator::ListWorkerFleetsPaginator::new(self.handle, self.inner) - } - /// Site ARN. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.site(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_site(input); - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_site() - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn max_results(mut self, input: i32) -> Self { - self.inner = self.inner.max_results(input); - self - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_max_results(input); - self - } - /// Maximum number of results to retrieve in a single ListWorkerFleets call. - pub fn get_max_results(&self) -> &::std::option::Option { - self.inner.get_max_results() - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.next_token(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_next_token(input); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_next_token() - } -} diff --git a/sdk/iotroborunner/src/operation/list_worker_fleets/paginator.rs b/sdk/iotroborunner/src/operation/list_worker_fleets/paginator.rs deleted file mode 100644 index 46f6f30f04d5..000000000000 --- a/sdk/iotroborunner/src/operation/list_worker_fleets/paginator.rs +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Paginator for [`ListWorkerFleets`](crate::operation::list_worker_fleets::ListWorkerFleets) -pub struct ListWorkerFleetsPaginator { - handle: std::sync::Arc, - builder: crate::operation::list_worker_fleets::builders::ListWorkerFleetsInputBuilder, - stop_on_duplicate_token: bool, -} - -impl ListWorkerFleetsPaginator { - /// Create a new paginator-wrapper - pub(crate) fn new( - handle: std::sync::Arc, - builder: crate::operation::list_worker_fleets::builders::ListWorkerFleetsInputBuilder, - ) -> Self { - Self { - handle, - builder, - stop_on_duplicate_token: true, - } - } - - /// Set the page size - /// - /// _Note: this method will override any previously set value for `max_results`_ - pub fn page_size(mut self, limit: i32) -> Self { - self.builder.max_results = ::std::option::Option::Some(limit); - self - } - - /// Create a flattened paginator - /// - /// This paginator automatically flattens results using `worker_fleets`. Queries to the underlying service - /// are dispatched lazily. - pub fn items(self) -> crate::operation::list_worker_fleets::paginator::ListWorkerFleetsPaginatorItems { - crate::operation::list_worker_fleets::paginator::ListWorkerFleetsPaginatorItems(self) - } - - /// Stop paginating when the service returns the same pagination token twice in a row. - /// - /// Defaults to true. - /// - /// For certain operations, it may be useful to continue on duplicate token. For example, - /// if an operation is for tailing a log file in real-time, then continuing may be desired. - /// This option can be set to `false` to accommodate these use cases. - pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self { - self.stop_on_duplicate_token = stop_on_duplicate_token; - self - } - - /// Create the pagination stream - /// - /// _Note:_ No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::operation::list_worker_fleets::ListWorkerFleetsOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - // Move individual fields out of self for the borrow checker - let builder = self.builder; - let handle = self.handle; - let runtime_plugins = crate::operation::list_worker_fleets::ListWorkerFleets::operation_runtime_plugins( - handle.runtime_plugins.clone(), - &handle.conf, - ::std::option::Option::None, - ); - ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new( - move |tx| { - ::std::boxed::Box::pin(async move { - // Build the input for the first time. If required fields are missing, this is where we'll produce an early error. - let mut input = match builder - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure) - { - ::std::result::Result::Ok(input) => input, - ::std::result::Result::Err(e) => { - let _ = tx.send(::std::result::Result::Err(e)).await; - return; - } - }; - loop { - let resp = crate::operation::list_worker_fleets::ListWorkerFleets::orchestrate(&runtime_plugins, input.clone()).await; - // If the input member is None or it was an error - let done = match resp { - ::std::result::Result::Ok(ref resp) => { - let new_token = crate::lens::reflens_list_worker_fleets_output_output_next_token(resp); - let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true); - if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token { - true - } else { - input.next_token = new_token.cloned(); - is_empty - } - } - ::std::result::Result::Err(_) => true, - }; - if tx.send(resp).await.is_err() { - // receiving end was dropped - return; - } - if done { - return; - } - } - }) - }, - )) - } -} - -/// Flattened paginator for `ListWorkerFleetsPaginator` -/// -/// This is created with [`.items()`](ListWorkerFleetsPaginator::items) -pub struct ListWorkerFleetsPaginatorItems(ListWorkerFleetsPaginator); - -impl ListWorkerFleetsPaginatorItems { - /// Create the pagination stream - /// - /// _Note_: No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - /// - /// To read the entirety of the paginator, use [`.collect::, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::types::WorkerFleet, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_worker_fleets::ListWorkerFleetsError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| { - crate::lens::lens_list_worker_fleets_output_output_worker_fleets(page) - .unwrap_or_default() - .into_iter() - }) - } -} diff --git a/sdk/iotroborunner/src/operation/list_workers.rs b/sdk/iotroborunner/src/operation/list_workers.rs deleted file mode 100644 index 2505e3e67251..000000000000 --- a/sdk/iotroborunner/src/operation/list_workers.rs +++ /dev/null @@ -1,431 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `ListWorkers`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct ListWorkers; -impl ListWorkers { - /// Creates a new `ListWorkers` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_workers::ListWorkersInput, - ) -> ::std::result::Result< - crate::operation::list_workers::ListWorkersOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_workers::ListWorkersError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::list_workers::ListWorkersInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "ListWorkers", input, runtime_plugins, stop_point).await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListWorkers { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListWorkers"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - ListWorkersRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - ListWorkersResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "ListWorkers", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListWorkers") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(ListWorkersEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::list_workers::ListWorkersError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::list_workers::ListWorkersError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::list_workers::ListWorkersError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct ListWorkersResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListWorkersResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_list_workers::de_list_workers_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_list_workers::de_list_workers_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct ListWorkersRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListWorkersRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::list_workers::ListWorkersInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/listWorkers").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - fn uri_query( - _input: &crate::operation::list_workers::ListWorkersInput, - mut output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - let mut query = ::aws_smithy_http::query::Writer::new(output); - let inner_1 = &_input.site; - let inner_1 = inner_1 - .as_ref() - .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("site", "cannot be empty or unset"))?; - if inner_1.is_empty() { - return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "cannot be empty or unset", - )); - } - query.push_kv("site", &::aws_smithy_http::query::fmt_string(inner_1)); - if let ::std::option::Option::Some(inner_2) = &_input.max_results { - { - query.push_kv("maxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_2).encode()); - } - } - if let ::std::option::Option::Some(inner_3) = &_input.next_token { - { - query.push_kv("nextToken", &::aws_smithy_http::query::fmt_string(inner_3)); - } - } - if let ::std::option::Option::Some(inner_4) = &_input.fleet { - { - query.push_kv("fleet", &::aws_smithy_http::query::fmt_string(inner_4)); - } - } - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::list_workers::ListWorkersInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - uri_query(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("GET").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(""); - - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct ListWorkersEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListWorkersEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "ListWorkersEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to ListWorkersInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `ListWorkersError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum ListWorkersError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListWorkersError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl ListWorkersError { - /// Creates the `ListWorkersError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `ListWorkersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `ListWorkersError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `ListWorkersError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `ListWorkersError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `ListWorkersError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `ListWorkersError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for ListWorkersError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for ListWorkersError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for ListWorkersError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListWorkersError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListWorkersError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::list_workers::ListWorkersError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::list_workers::_list_workers_output::ListWorkersOutput; - -pub use crate::operation::list_workers::_list_workers_input::ListWorkersInput; - -mod _list_workers_input; - -mod _list_workers_output; - -/// Builders -pub mod builders; - -/// Paginator for this operation -pub mod paginator; diff --git a/sdk/iotroborunner/src/operation/list_workers/_list_workers_input.rs b/sdk/iotroborunner/src/operation/list_workers/_list_workers_input.rs deleted file mode 100644 index ee653101f133..000000000000 --- a/sdk/iotroborunner/src/operation/list_workers/_list_workers_input.rs +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListWorkersInput { - /// Site ARN. - pub site: ::std::option::Option<::std::string::String>, - /// Maximum number of results to retrieve in a single ListWorkers call. - pub max_results: ::std::option::Option, - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, - /// Full ARN of the worker fleet. - pub fleet: ::std::option::Option<::std::string::String>, -} -impl ListWorkersInput { - /// Site ARN. - pub fn site(&self) -> ::std::option::Option<&str> { - self.site.as_deref() - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn max_results(&self) -> ::std::option::Option { - self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } - /// Full ARN of the worker fleet. - pub fn fleet(&self) -> ::std::option::Option<&str> { - self.fleet.as_deref() - } -} -impl ListWorkersInput { - /// Creates a new builder-style object to manufacture [`ListWorkersInput`](crate::operation::list_workers::ListWorkersInput). - pub fn builder() -> crate::operation::list_workers::builders::ListWorkersInputBuilder { - crate::operation::list_workers::builders::ListWorkersInputBuilder::default() - } -} - -/// A builder for [`ListWorkersInput`](crate::operation::list_workers::ListWorkersInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListWorkersInputBuilder { - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) max_results: ::std::option::Option, - pub(crate) next_token: ::std::option::Option<::std::string::String>, - pub(crate) fleet: ::std::option::Option<::std::string::String>, -} -impl ListWorkersInputBuilder { - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn max_results(mut self, input: i32) -> Self { - self.max_results = ::std::option::Option::Some(input); - self - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.max_results = input; - self - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn get_max_results(&self) -> &::std::option::Option { - &self.max_results - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Full ARN of the worker fleet. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.fleet = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.fleet = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - &self.fleet - } - /// Consumes the builder and constructs a [`ListWorkersInput`](crate::operation::list_workers::ListWorkersInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::list_workers::ListWorkersInput { - site: self.site, - max_results: self.max_results, - next_token: self.next_token, - fleet: self.fleet, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/list_workers/_list_workers_output.rs b/sdk/iotroborunner/src/operation/list_workers/_list_workers_output.rs deleted file mode 100644 index c29e668488b8..000000000000 --- a/sdk/iotroborunner/src/operation/list_workers/_list_workers_output.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ListWorkersOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub next_token: ::std::option::Option<::std::string::String>, - /// List of workers. - pub workers: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListWorkersOutput { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(&self) -> ::std::option::Option<&str> { - self.next_token.as_deref() - } - /// List of workers. - /// - /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.workers.is_none()`. - pub fn workers(&self) -> &[crate::types::Worker] { - self.workers.as_deref().unwrap_or_default() - } -} -impl ::aws_types::request_id::RequestId for ListWorkersOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl ListWorkersOutput { - /// Creates a new builder-style object to manufacture [`ListWorkersOutput`](crate::operation::list_workers::ListWorkersOutput). - pub fn builder() -> crate::operation::list_workers::builders::ListWorkersOutputBuilder { - crate::operation::list_workers::builders::ListWorkersOutputBuilder::default() - } -} - -/// A builder for [`ListWorkersOutput`](crate::operation::list_workers::ListWorkersOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ListWorkersOutputBuilder { - pub(crate) next_token: ::std::option::Option<::std::string::String>, - pub(crate) workers: ::std::option::Option<::std::vec::Vec>, - _request_id: Option, -} -impl ListWorkersOutputBuilder { - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.next_token = ::std::option::Option::Some(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.next_token = input; - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - &self.next_token - } - /// Appends an item to `workers`. - /// - /// To override the contents of this collection use [`set_workers`](Self::set_workers). - /// - /// List of workers. - pub fn workers(mut self, input: crate::types::Worker) -> Self { - let mut v = self.workers.unwrap_or_default(); - v.push(input); - self.workers = ::std::option::Option::Some(v); - self - } - /// List of workers. - pub fn set_workers(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { - self.workers = input; - self - } - /// List of workers. - pub fn get_workers(&self) -> &::std::option::Option<::std::vec::Vec> { - &self.workers - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`ListWorkersOutput`](crate::operation::list_workers::ListWorkersOutput). - pub fn build(self) -> crate::operation::list_workers::ListWorkersOutput { - crate::operation::list_workers::ListWorkersOutput { - next_token: self.next_token, - workers: self.workers, - _request_id: self._request_id, - } - } -} diff --git a/sdk/iotroborunner/src/operation/list_workers/builders.rs b/sdk/iotroborunner/src/operation/list_workers/builders.rs deleted file mode 100644 index 4f23ae7f73b3..000000000000 --- a/sdk/iotroborunner/src/operation/list_workers/builders.rs +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::list_workers::_list_workers_output::ListWorkersOutputBuilder; - -pub use crate::operation::list_workers::_list_workers_input::ListWorkersInputBuilder; - -impl ListWorkersInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::list_workers::ListWorkersOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_workers::ListWorkersError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.list_workers(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `ListWorkers`. -/// -/// Grants permission to list workers -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct ListWorkersFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::list_workers::builders::ListWorkersInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::list_workers::ListWorkersOutput, - crate::operation::list_workers::ListWorkersError, - > for ListWorkersFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::list_workers::ListWorkersOutput, - crate::operation::list_workers::ListWorkersError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl ListWorkersFluentBuilder { - /// Creates a new `ListWorkers`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the ListWorkers as a reference. - pub fn as_input(&self) -> &crate::operation::list_workers::builders::ListWorkersInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::list_workers::ListWorkersOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_workers::ListWorkersError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::list_workers::ListWorkers::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::list_workers::ListWorkers::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::list_workers::ListWorkersOutput, - crate::operation::list_workers::ListWorkersError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Create a paginator for this request - /// - /// Paginators are used by calling [`send().await`](crate::operation::list_workers::paginator::ListWorkersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream). - pub fn into_paginator(self) -> crate::operation::list_workers::paginator::ListWorkersPaginator { - crate::operation::list_workers::paginator::ListWorkersPaginator::new(self.handle, self.inner) - } - /// Site ARN. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.site(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_site(input); - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_site() - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn max_results(mut self, input: i32) -> Self { - self.inner = self.inner.max_results(input); - self - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn set_max_results(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_max_results(input); - self - } - /// Maximum number of results to retrieve in a single ListWorkers call. - pub fn get_max_results(&self) -> &::std::option::Option { - self.inner.get_max_results() - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.next_token(input.into()); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_next_token(input); - self - } - /// Pagination token returned when another page of data exists. Provide it in your next call to the API to receive the next page. - pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_next_token() - } - /// Full ARN of the worker fleet. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.fleet(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_fleet(input); - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_fleet() - } -} diff --git a/sdk/iotroborunner/src/operation/list_workers/paginator.rs b/sdk/iotroborunner/src/operation/list_workers/paginator.rs deleted file mode 100644 index d438767b47be..000000000000 --- a/sdk/iotroborunner/src/operation/list_workers/paginator.rs +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Paginator for [`ListWorkers`](crate::operation::list_workers::ListWorkers) -pub struct ListWorkersPaginator { - handle: std::sync::Arc, - builder: crate::operation::list_workers::builders::ListWorkersInputBuilder, - stop_on_duplicate_token: bool, -} - -impl ListWorkersPaginator { - /// Create a new paginator-wrapper - pub(crate) fn new( - handle: std::sync::Arc, - builder: crate::operation::list_workers::builders::ListWorkersInputBuilder, - ) -> Self { - Self { - handle, - builder, - stop_on_duplicate_token: true, - } - } - - /// Set the page size - /// - /// _Note: this method will override any previously set value for `max_results`_ - pub fn page_size(mut self, limit: i32) -> Self { - self.builder.max_results = ::std::option::Option::Some(limit); - self - } - - /// Create a flattened paginator - /// - /// This paginator automatically flattens results using `workers`. Queries to the underlying service - /// are dispatched lazily. - pub fn items(self) -> crate::operation::list_workers::paginator::ListWorkersPaginatorItems { - crate::operation::list_workers::paginator::ListWorkersPaginatorItems(self) - } - - /// Stop paginating when the service returns the same pagination token twice in a row. - /// - /// Defaults to true. - /// - /// For certain operations, it may be useful to continue on duplicate token. For example, - /// if an operation is for tailing a log file in real-time, then continuing may be desired. - /// This option can be set to `false` to accommodate these use cases. - pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self { - self.stop_on_duplicate_token = stop_on_duplicate_token; - self - } - - /// Create the pagination stream - /// - /// _Note:_ No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::operation::list_workers::ListWorkersOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_workers::ListWorkersError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - // Move individual fields out of self for the borrow checker - let builder = self.builder; - let handle = self.handle; - let runtime_plugins = crate::operation::list_workers::ListWorkers::operation_runtime_plugins( - handle.runtime_plugins.clone(), - &handle.conf, - ::std::option::Option::None, - ); - ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new( - move |tx| { - ::std::boxed::Box::pin(async move { - // Build the input for the first time. If required fields are missing, this is where we'll produce an early error. - let mut input = match builder - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure) - { - ::std::result::Result::Ok(input) => input, - ::std::result::Result::Err(e) => { - let _ = tx.send(::std::result::Result::Err(e)).await; - return; - } - }; - loop { - let resp = crate::operation::list_workers::ListWorkers::orchestrate(&runtime_plugins, input.clone()).await; - // If the input member is None or it was an error - let done = match resp { - ::std::result::Result::Ok(ref resp) => { - let new_token = crate::lens::reflens_list_workers_output_output_next_token(resp); - let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true); - if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token { - true - } else { - input.next_token = new_token.cloned(); - is_empty - } - } - ::std::result::Result::Err(_) => true, - }; - if tx.send(resp).await.is_err() { - // receiving end was dropped - return; - } - if done { - return; - } - } - }) - }, - )) - } -} - -/// Flattened paginator for `ListWorkersPaginator` -/// -/// This is created with [`.items()`](ListWorkersPaginator::items) -pub struct ListWorkersPaginatorItems(ListWorkersPaginator); - -impl ListWorkersPaginatorItems { - /// Create the pagination stream - /// - /// _Note_: No requests will be dispatched until the stream is used - /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method). - /// - /// To read the entirety of the paginator, use [`.collect::, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect). - pub fn send( - self, - ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream< - ::std::result::Result< - crate::types::Worker, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::list_workers::ListWorkersError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - >, - > { - ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()) - .flat_map(|page| crate::lens::lens_list_workers_output_output_workers(page).unwrap_or_default().into_iter()) - } -} diff --git a/sdk/iotroborunner/src/operation/update_destination.rs b/sdk/iotroborunner/src/operation/update_destination.rs deleted file mode 100644 index c784fb5b8292..000000000000 --- a/sdk/iotroborunner/src/operation/update_destination.rs +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `UpdateDestination`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct UpdateDestination; -impl UpdateDestination { - /// Creates a new `UpdateDestination` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_destination::UpdateDestinationInput, - ) -> ::std::result::Result< - crate::operation::update_destination::UpdateDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_destination::UpdateDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_destination::UpdateDestinationInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "UpdateDestination", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateDestination { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateDestination"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - UpdateDestinationRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - UpdateDestinationResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "UpdateDestination", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateDestination") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(UpdateDestinationEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::update_destination::UpdateDestinationError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::update_destination::UpdateDestinationError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::update_destination::UpdateDestinationError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct UpdateDestinationResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateDestinationResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_update_destination::de_update_destination_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_update_destination::de_update_destination_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct UpdateDestinationRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateDestinationRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::update_destination::UpdateDestinationInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/updateDestination").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::update_destination::UpdateDestinationInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_destination::ser_update_destination_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct UpdateDestinationEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDestinationEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "UpdateDestinationEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to UpdateDestinationInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `UpdateDestinationError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum UpdateDestinationError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateDestinationError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl UpdateDestinationError { - /// Creates the `UpdateDestinationError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `UpdateDestinationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `UpdateDestinationError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `UpdateDestinationError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `UpdateDestinationError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `UpdateDestinationError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `UpdateDestinationError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for UpdateDestinationError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for UpdateDestinationError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateDestinationError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateDestinationError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateDestinationError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::update_destination::UpdateDestinationError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::update_destination::_update_destination_output::UpdateDestinationOutput; - -pub use crate::operation::update_destination::_update_destination_input::UpdateDestinationInput; - -mod _update_destination_input; - -mod _update_destination_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/update_destination/_update_destination_input.rs b/sdk/iotroborunner/src/operation/update_destination/_update_destination_input.rs deleted file mode 100644 index f42a927c6142..000000000000 --- a/sdk/iotroborunner/src/operation/update_destination/_update_destination_input.rs +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateDestinationInput { - /// Destination ARN. - pub id: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// State of the destination. - pub state: ::std::option::Option, - /// JSON document containing additional fixed properties regarding the destination - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl UpdateDestinationInput { - /// Destination ARN. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// State of the destination. - pub fn state(&self) -> ::std::option::Option<&crate::types::DestinationState> { - self.state.as_ref() - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl UpdateDestinationInput { - /// Creates a new builder-style object to manufacture [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput). - pub fn builder() -> crate::operation::update_destination::builders::UpdateDestinationInputBuilder { - crate::operation::update_destination::builders::UpdateDestinationInputBuilder::default() - } -} - -/// A builder for [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateDestinationInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) state: ::std::option::Option, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl UpdateDestinationInputBuilder { - /// Destination ARN. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Destination ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// State of the destination. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Consumes the builder and constructs a [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_destination::UpdateDestinationInput { - id: self.id, - name: self.name, - state: self.state, - additional_fixed_properties: self.additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_destination/_update_destination_output.rs b/sdk/iotroborunner/src/operation/update_destination/_update_destination_output.rs deleted file mode 100644 index 7b3baf90737f..000000000000 --- a/sdk/iotroborunner/src/operation/update_destination/_update_destination_output.rs +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateDestinationOutput { - /// Destination ARN. - pub arn: ::std::string::String, - /// Filters access by the destination's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// State of the destination. - pub state: crate::types::DestinationState, - /// JSON document containing additional fixed properties regarding the destination - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl UpdateDestinationOutput { - /// Destination ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the destination's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// State of the destination. - pub fn state(&self) -> &crate::types::DestinationState { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl ::aws_types::request_id::RequestId for UpdateDestinationOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl UpdateDestinationOutput { - /// Creates a new builder-style object to manufacture [`UpdateDestinationOutput`](crate::operation::update_destination::UpdateDestinationOutput). - pub fn builder() -> crate::operation::update_destination::builders::UpdateDestinationOutputBuilder { - crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::default() - } -} - -/// A builder for [`UpdateDestinationOutput`](crate::operation::update_destination::UpdateDestinationOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateDestinationOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) state: ::std::option::Option, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl UpdateDestinationOutputBuilder { - /// Destination ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Destination ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the destination's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the destination's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the destination's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// State of the destination. - /// This field is required. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`UpdateDestinationOutput`](crate::operation::update_destination::UpdateDestinationOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::arn) - /// - [`id`](crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::id) - /// - [`name`](crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::name) - /// - [`updated_at`](crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::updated_at) - /// - [`state`](crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::state) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_destination::UpdateDestinationOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building UpdateDestinationOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building UpdateDestinationOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building UpdateDestinationOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building UpdateDestinationOutput", - ) - })?, - state: self.state.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "state", - "state was not specified but it is required when building UpdateDestinationOutput", - ) - })?, - additional_fixed_properties: self.additional_fixed_properties, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_destination/builders.rs b/sdk/iotroborunner/src/operation/update_destination/builders.rs deleted file mode 100644 index a1e254e88d60..000000000000 --- a/sdk/iotroborunner/src/operation/update_destination/builders.rs +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::update_destination::_update_destination_output::UpdateDestinationOutputBuilder; - -pub use crate::operation::update_destination::_update_destination_input::UpdateDestinationInputBuilder; - -impl UpdateDestinationInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::update_destination::UpdateDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_destination::UpdateDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.update_destination(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `UpdateDestination`. -/// -/// Grants permission to update a destination -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct UpdateDestinationFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::update_destination::builders::UpdateDestinationInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::update_destination::UpdateDestinationOutput, - crate::operation::update_destination::UpdateDestinationError, - > for UpdateDestinationFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::update_destination::UpdateDestinationOutput, - crate::operation::update_destination::UpdateDestinationError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl UpdateDestinationFluentBuilder { - /// Creates a new `UpdateDestination`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the UpdateDestination as a reference. - pub fn as_input(&self) -> &crate::operation::update_destination::builders::UpdateDestinationInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::update_destination::UpdateDestinationOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_destination::UpdateDestinationError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::update_destination::UpdateDestination::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::update_destination::UpdateDestination::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::update_destination::UpdateDestinationOutput, - crate::operation::update_destination::UpdateDestinationError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Destination ARN. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Destination ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Destination ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// State of the destination. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.inner = self.inner.state(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_state(input); - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - self.inner.get_state() - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_fixed_properties(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_fixed_properties(input); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_fixed_properties() - } -} diff --git a/sdk/iotroborunner/src/operation/update_site/_update_site_input.rs b/sdk/iotroborunner/src/operation/update_site/_update_site_input.rs deleted file mode 100644 index 197c0d0dacc8..000000000000 --- a/sdk/iotroborunner/src/operation/update_site/_update_site_input.rs +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateSiteInput { - /// Site ARN. - pub id: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub country_code: ::std::option::Option<::std::string::String>, - /// A high-level description of the site. - pub description: ::std::option::Option<::std::string::String>, -} -impl UpdateSiteInput { - /// Site ARN. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(&self) -> ::std::option::Option<&str> { - self.country_code.as_deref() - } - /// A high-level description of the site. - pub fn description(&self) -> ::std::option::Option<&str> { - self.description.as_deref() - } -} -impl UpdateSiteInput { - /// Creates a new builder-style object to manufacture [`UpdateSiteInput`](crate::operation::update_site::UpdateSiteInput). - pub fn builder() -> crate::operation::update_site::builders::UpdateSiteInputBuilder { - crate::operation::update_site::builders::UpdateSiteInputBuilder::default() - } -} - -/// A builder for [`UpdateSiteInput`](crate::operation::update_site::UpdateSiteInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateSiteInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) country_code: ::std::option::Option<::std::string::String>, - pub(crate) description: ::std::option::Option<::std::string::String>, -} -impl UpdateSiteInputBuilder { - /// Site ARN. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Site ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.country_code = ::std::option::Option::Some(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.country_code = input; - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - &self.country_code - } - /// A high-level description of the site. - pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.description = ::std::option::Option::Some(input.into()); - self - } - /// A high-level description of the site. - pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.description = input; - self - } - /// A high-level description of the site. - pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { - &self.description - } - /// Consumes the builder and constructs a [`UpdateSiteInput`](crate::operation::update_site::UpdateSiteInput). - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_site::UpdateSiteInput { - id: self.id, - name: self.name, - country_code: self.country_code, - description: self.description, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_site/_update_site_output.rs b/sdk/iotroborunner/src/operation/update_site/_update_site_output.rs deleted file mode 100644 index 5da39e73d37f..000000000000 --- a/sdk/iotroborunner/src/operation/update_site/_update_site_output.rs +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateSiteOutput { - /// Site ARN. - pub arn: ::std::string::String, - /// Filters access by the site's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub country_code: ::std::option::Option<::std::string::String>, - /// A high-level description of the site. - pub description: ::std::option::Option<::std::string::String>, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - _request_id: Option, -} -impl UpdateSiteOutput { - /// Site ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the site's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(&self) -> ::std::option::Option<&str> { - self.country_code.as_deref() - } - /// A high-level description of the site. - pub fn description(&self) -> ::std::option::Option<&str> { - self.description.as_deref() - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } -} -impl ::aws_types::request_id::RequestId for UpdateSiteOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl UpdateSiteOutput { - /// Creates a new builder-style object to manufacture [`UpdateSiteOutput`](crate::operation::update_site::UpdateSiteOutput). - pub fn builder() -> crate::operation::update_site::builders::UpdateSiteOutputBuilder { - crate::operation::update_site::builders::UpdateSiteOutputBuilder::default() - } -} - -/// A builder for [`UpdateSiteOutput`](crate::operation::update_site::UpdateSiteOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateSiteOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) country_code: ::std::option::Option<::std::string::String>, - pub(crate) description: ::std::option::Option<::std::string::String>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - _request_id: Option, -} -impl UpdateSiteOutputBuilder { - /// Site ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Site ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the site's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the site's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the site's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.country_code = ::std::option::Option::Some(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.country_code = input; - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - &self.country_code - } - /// A high-level description of the site. - pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.description = ::std::option::Option::Some(input.into()); - self - } - /// A high-level description of the site. - pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.description = input; - self - } - /// A high-level description of the site. - pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { - &self.description - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`UpdateSiteOutput`](crate::operation::update_site::UpdateSiteOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::update_site::builders::UpdateSiteOutputBuilder::arn) - /// - [`id`](crate::operation::update_site::builders::UpdateSiteOutputBuilder::id) - /// - [`name`](crate::operation::update_site::builders::UpdateSiteOutputBuilder::name) - /// - [`updated_at`](crate::operation::update_site::builders::UpdateSiteOutputBuilder::updated_at) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_site::UpdateSiteOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building UpdateSiteOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building UpdateSiteOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building UpdateSiteOutput", - ) - })?, - country_code: self.country_code, - description: self.description, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building UpdateSiteOutput", - ) - })?, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_site/builders.rs b/sdk/iotroborunner/src/operation/update_site/builders.rs deleted file mode 100644 index 913ac79c8387..000000000000 --- a/sdk/iotroborunner/src/operation/update_site/builders.rs +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::update_site::_update_site_output::UpdateSiteOutputBuilder; - -pub use crate::operation::update_site::_update_site_input::UpdateSiteInputBuilder; - -impl UpdateSiteInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::update_site::UpdateSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_site::UpdateSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.update_site(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `UpdateSite`. -/// -/// Grants permission to update a site -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct UpdateSiteFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::update_site::builders::UpdateSiteInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::update_site::UpdateSiteOutput, - crate::operation::update_site::UpdateSiteError, - > for UpdateSiteFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::update_site::UpdateSiteOutput, - crate::operation::update_site::UpdateSiteError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl UpdateSiteFluentBuilder { - /// Creates a new `UpdateSite`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the UpdateSite as a reference. - pub fn as_input(&self) -> &crate::operation::update_site::builders::UpdateSiteInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::update_site::UpdateSiteOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_site::UpdateSiteError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::update_site::UpdateSite::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::update_site::UpdateSite::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::update_site::UpdateSiteOutput, - crate::operation::update_site::UpdateSiteError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Site ARN. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Site ARN. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Site ARN. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.country_code(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_country_code(input); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_country_code() - } - /// A high-level description of the site. - pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.description(input.into()); - self - } - /// A high-level description of the site. - pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_description(input); - self - } - /// A high-level description of the site. - pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_description() - } -} diff --git a/sdk/iotroborunner/src/operation/update_worker/_update_worker_input.rs b/sdk/iotroborunner/src/operation/update_worker/_update_worker_input.rs deleted file mode 100644 index 5edbecb7955d..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker/_update_worker_input.rs +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateWorkerInput { - /// Full ARN of the worker. - pub id: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub additional_transient_properties: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - /// Properties of the worker that are provided by the vendor FMS. - pub vendor_properties: ::std::option::Option, - /// Supported coordinates for worker position. - pub position: ::std::option::Option, - /// Worker orientation measured in units clockwise from north. - pub orientation: ::std::option::Option, -} -impl UpdateWorkerInput { - /// Full ARN of the worker. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(&self) -> ::std::option::Option<&str> { - self.additional_transient_properties.as_deref() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(&self) -> ::std::option::Option<&crate::types::VendorProperties> { - self.vendor_properties.as_ref() - } - /// Supported coordinates for worker position. - pub fn position(&self) -> ::std::option::Option<&crate::types::PositionCoordinates> { - self.position.as_ref() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(&self) -> ::std::option::Option<&crate::types::Orientation> { - self.orientation.as_ref() - } -} -impl UpdateWorkerInput { - /// Creates a new builder-style object to manufacture [`UpdateWorkerInput`](crate::operation::update_worker::UpdateWorkerInput). - pub fn builder() -> crate::operation::update_worker::builders::UpdateWorkerInputBuilder { - crate::operation::update_worker::builders::UpdateWorkerInputBuilder::default() - } -} - -/// A builder for [`UpdateWorkerInput`](crate::operation::update_worker::UpdateWorkerInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateWorkerInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) additional_transient_properties: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - pub(crate) vendor_properties: ::std::option::Option, - pub(crate) position: ::std::option::Option, - pub(crate) orientation: ::std::option::Option, -} -impl UpdateWorkerInputBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Full ARN of the worker. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_transient_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_transient_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_transient_properties - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.vendor_properties = ::std::option::Option::Some(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.vendor_properties = input; - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - &self.vendor_properties - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.position = ::std::option::Option::Some(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.position = input; - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - &self.position - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.orientation = ::std::option::Option::Some(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.orientation = input; - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - &self.orientation - } - /// Consumes the builder and constructs a [`UpdateWorkerInput`](crate::operation::update_worker::UpdateWorkerInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_worker::UpdateWorkerInput { - id: self.id, - name: self.name, - additional_transient_properties: self.additional_transient_properties, - additional_fixed_properties: self.additional_fixed_properties, - vendor_properties: self.vendor_properties, - position: self.position, - orientation: self.orientation, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_worker/_update_worker_output.rs b/sdk/iotroborunner/src/operation/update_worker/_update_worker_output.rs deleted file mode 100644 index 31fdc26035b9..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker/_update_worker_output.rs +++ /dev/null @@ -1,306 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateWorkerOutput { - /// Full ARN of the worker. - pub arn: ::std::string::String, - /// Filters access by the workers identifier - pub id: ::std::string::String, - /// Full ARN of the worker fleet. - pub fleet: ::std::string::String, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub additional_transient_properties: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - /// Worker orientation measured in units clockwise from north. - pub orientation: ::std::option::Option, - /// Properties of the worker that are provided by the vendor FMS. - pub vendor_properties: ::std::option::Option, - /// Supported coordinates for worker position. - pub position: ::std::option::Option, - _request_id: Option, -} -impl UpdateWorkerOutput { - /// Full ARN of the worker. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the workers identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Full ARN of the worker fleet. - pub fn fleet(&self) -> &str { - use std::ops::Deref; - self.fleet.deref() - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(&self) -> ::std::option::Option<&str> { - self.additional_transient_properties.as_deref() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(&self) -> ::std::option::Option<&crate::types::Orientation> { - self.orientation.as_ref() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(&self) -> ::std::option::Option<&crate::types::VendorProperties> { - self.vendor_properties.as_ref() - } - /// Supported coordinates for worker position. - pub fn position(&self) -> ::std::option::Option<&crate::types::PositionCoordinates> { - self.position.as_ref() - } -} -impl ::aws_types::request_id::RequestId for UpdateWorkerOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl UpdateWorkerOutput { - /// Creates a new builder-style object to manufacture [`UpdateWorkerOutput`](crate::operation::update_worker::UpdateWorkerOutput). - pub fn builder() -> crate::operation::update_worker::builders::UpdateWorkerOutputBuilder { - crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::default() - } -} - -/// A builder for [`UpdateWorkerOutput`](crate::operation::update_worker::UpdateWorkerOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateWorkerOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) fleet: ::std::option::Option<::std::string::String>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) additional_transient_properties: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - pub(crate) orientation: ::std::option::Option, - pub(crate) vendor_properties: ::std::option::Option, - pub(crate) position: ::std::option::Option, - _request_id: Option, -} -impl UpdateWorkerOutputBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the workers identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the workers identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the workers identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Full ARN of the worker fleet. - /// This field is required. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.fleet = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.fleet = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - &self.fleet - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_transient_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_transient_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_transient_properties - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.orientation = ::std::option::Option::Some(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.orientation = input; - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - &self.orientation - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.vendor_properties = ::std::option::Option::Some(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.vendor_properties = input; - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - &self.vendor_properties - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.position = ::std::option::Option::Some(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.position = input; - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - &self.position - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`UpdateWorkerOutput`](crate::operation::update_worker::UpdateWorkerOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::arn) - /// - [`id`](crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::id) - /// - [`fleet`](crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::fleet) - /// - [`updated_at`](crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::updated_at) - /// - [`name`](crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::name) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_worker::UpdateWorkerOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building UpdateWorkerOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building UpdateWorkerOutput", - ) - })?, - fleet: self.fleet.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "fleet", - "fleet was not specified but it is required when building UpdateWorkerOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building UpdateWorkerOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building UpdateWorkerOutput", - ) - })?, - additional_transient_properties: self.additional_transient_properties, - additional_fixed_properties: self.additional_fixed_properties, - orientation: self.orientation, - vendor_properties: self.vendor_properties, - position: self.position, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_worker/builders.rs b/sdk/iotroborunner/src/operation/update_worker/builders.rs deleted file mode 100644 index b73b5cb723f0..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker/builders.rs +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::update_worker::_update_worker_output::UpdateWorkerOutputBuilder; - -pub use crate::operation::update_worker::_update_worker_input::UpdateWorkerInputBuilder; - -impl UpdateWorkerInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::update_worker::UpdateWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_worker::UpdateWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.update_worker(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `UpdateWorker`. -/// -/// Grants permission to update a worker -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct UpdateWorkerFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::update_worker::builders::UpdateWorkerInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::update_worker::UpdateWorkerOutput, - crate::operation::update_worker::UpdateWorkerError, - > for UpdateWorkerFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::update_worker::UpdateWorkerOutput, - crate::operation::update_worker::UpdateWorkerError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl UpdateWorkerFluentBuilder { - /// Creates a new `UpdateWorker`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the UpdateWorker as a reference. - pub fn as_input(&self) -> &crate::operation::update_worker::builders::UpdateWorkerInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::update_worker::UpdateWorkerOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_worker::UpdateWorkerError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::update_worker::UpdateWorker::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::update_worker::UpdateWorker::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::update_worker::UpdateWorkerOutput, - crate::operation::update_worker::UpdateWorkerError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Full ARN of the worker. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Full ARN of the worker. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_transient_properties(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_transient_properties(input); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_transient_properties() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_fixed_properties(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_fixed_properties(input); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_fixed_properties() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.inner = self.inner.vendor_properties(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_vendor_properties(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - self.inner.get_vendor_properties() - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.inner = self.inner.position(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_position(input); - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - self.inner.get_position() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.inner = self.inner.orientation(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.inner = self.inner.set_orientation(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - self.inner.get_orientation() - } -} diff --git a/sdk/iotroborunner/src/operation/update_worker_fleet.rs b/sdk/iotroborunner/src/operation/update_worker_fleet.rs deleted file mode 100644 index e85f53f7698b..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker_fleet.rs +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `UpdateWorkerFleet`. -#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -#[non_exhaustive] -pub struct UpdateWorkerFleet; -impl UpdateWorkerFleet { - /// Creates a new `UpdateWorkerFleet` - pub fn new() -> Self { - Self - } - pub(crate) async fn orchestrate( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_worker_fleet::UpdateWorkerFleetInput, - ) -> ::std::result::Result< - crate::operation::update_worker_fleet::UpdateWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >| { - err.map_service_error(|err| { - err.downcast::() - .expect("correct error type") - }) - }; - let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None) - .await - .map_err(map_err)?; - let output = context.finalize().map_err(map_err)?; - ::std::result::Result::Ok( - output - .downcast::() - .expect("correct output type"), - ) - } - - pub(crate) async fn orchestrate_with_stop_point( - runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_worker_fleet::UpdateWorkerFleetInput, - stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, - ) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, - ::aws_smithy_runtime_api::client::result::SdkError< - ::aws_smithy_runtime_api::client::interceptors::context::Error, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "UpdateWorkerFleet", input, runtime_plugins, stop_point) - .await - } - - pub(crate) fn operation_runtime_plugins( - client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - client_config: &crate::config::Config, - config_override: ::std::option::Option, - ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins { - let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new()); - runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![ - ::aws_runtime::auth::sigv4::SCHEME_ID, - ])); - if let ::std::option::Option::Some(config_override) = config_override { - for plugin in config_override.runtime_plugins.iter().cloned() { - runtime_plugins = runtime_plugins.with_operation_plugin(plugin); - } - runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new( - config_override, - client_config.config.clone(), - &client_config.runtime_components, - )); - } - runtime_plugins - } -} -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateWorkerFleet { - fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateWorkerFleet"); - - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - UpdateWorkerFleetRequestSerializer, - )); - cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - UpdateWorkerFleetResponseDeserializer, - )); - - cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( - ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), - )); - - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "UpdateWorkerFleet", - "iotroborunner", - )); - let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); - signing_options.double_uri_encode = true; - signing_options.content_sha256_header = false; - signing_options.normalize_uri_path = true; - signing_options.payload_override = None; - - cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig { - signing_options, - ..::std::default::Default::default() - }); - - ::std::option::Option::Some(cfg.freeze()) - } - - fn runtime_components( - &self, - _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, - ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { - #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateWorkerFleet") - .with_interceptor( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( - ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, - ), - ) - .with_interceptor(UpdateWorkerFleetEndpointParamsInterceptor) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - >::new()) - .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - >::new()); - - ::std::borrow::Cow::Owned(rcb) - } -} - -#[derive(Debug)] -struct UpdateWorkerFleetResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateWorkerFleetResponseDeserializer { - fn deserialize_nonstreaming( - &self, - response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError { - let (success, status) = (response.status().is_success(), response.status().as_u16()); - let headers = response.headers(); - let body = response.body().bytes().expect("body loaded"); - #[allow(unused_mut)] - let mut force_error = false; - ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); - let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_update_worker_fleet::de_update_worker_fleet_http_error(status, headers, body) - } else { - crate::protocol_serde::shape_update_worker_fleet::de_update_worker_fleet_http_response(status, headers, body) - }; - crate::protocol_serde::type_erase_result(parse_result) - } -} -#[derive(Debug)] -struct UpdateWorkerFleetRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateWorkerFleetRequestSerializer { - #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] - fn serialize_input( - &self, - input: ::aws_smithy_runtime_api::client::interceptors::context::Input, - _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { - let input = input - .downcast::() - .expect("correct type"); - let _header_serialization_settings = _cfg - .load::() - .cloned() - .unwrap_or_default(); - let mut request_builder = { - fn uri_base( - _input: &crate::operation::update_worker_fleet::UpdateWorkerFleetInput, - output: &mut ::std::string::String, - ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { - use ::std::fmt::Write as _; - ::std::write!(output, "/updateWorkerFleet").expect("formatting should succeed"); - ::std::result::Result::Ok(()) - } - #[allow(clippy::unnecessary_wraps)] - fn update_http_builder( - input: &crate::operation::update_worker_fleet::UpdateWorkerFleetInput, - builder: ::http::request::Builder, - ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { - let mut uri = ::std::string::String::new(); - uri_base(input, &mut uri)?; - ::std::result::Result::Ok(builder.method("POST").uri(uri)) - } - let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); - builder - }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_worker_fleet::ser_update_worker_fleet_input(&input)?); - if let Some(content_length) = body.content_length() { - let content_length = content_length.to_string(); - request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); - } - ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap()) - } -} -#[derive(Debug)] -struct UpdateWorkerFleetEndpointParamsInterceptor; - -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateWorkerFleetEndpointParamsInterceptor { - fn name(&self) -> &'static str { - "UpdateWorkerFleetEndpointParamsInterceptor" - } - - fn read_before_execution( - &self, - context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef< - '_, - ::aws_smithy_runtime_api::client::interceptors::context::Input, - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::interceptors::context::Error, - >, - cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, - ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { - let _input = context - .input() - .downcast_ref::() - .ok_or("failed to downcast to UpdateWorkerFleetInput")?; - - let params = crate::config::endpoint::Params::builder() - .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) - .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0)) - .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0)) - .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone())) - .build() - .map_err(|err| { - ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err) - })?; - cfg.interceptor_state() - .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params)); - ::std::result::Result::Ok(()) - } -} - -/// Error type for the `UpdateWorkerFleetError` operation. -#[non_exhaustive] -#[derive(::std::fmt::Debug)] -pub enum UpdateWorkerFleetError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), - /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). - #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ - variable wildcard pattern and check `.code()`: - \ -    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` - \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateWorkerFleetError) for what information is available for the error.")] - Unhandled(crate::error::sealed_unhandled::Unhandled), -} -impl UpdateWorkerFleetError { - /// Creates the `UpdateWorkerFleetError::Unhandled` variant from any error type. - pub fn unhandled( - err: impl ::std::convert::Into<::std::boxed::Box>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.into(), - meta: ::std::default::Default::default(), - }) - } - - /// Creates the `UpdateWorkerFleetError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). - pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source: err.clone().into(), - meta: err, - }) - } - /// - /// Returns error metadata, which includes the error code, message, - /// request ID, and potentially additional information. - /// - pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::Unhandled(e) => &e.meta, - } - } - /// Returns `true` if the error kind is `UpdateWorkerFleetError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `UpdateWorkerFleetError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `UpdateWorkerFleetError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) - } - /// Returns `true` if the error kind is `UpdateWorkerFleetError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) - } - /// Returns `true` if the error kind is `UpdateWorkerFleetError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) - } -} -impl ::std::error::Error for UpdateWorkerFleetError { - fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { - match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), - Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), - } - } -} -impl ::std::fmt::Display for UpdateWorkerFleetError { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), - Self::Unhandled(_inner) => { - if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { - write!(f, "unhandled error ({code})") - } else { - f.write_str("unhandled error") - } - } - } - } -} -impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateWorkerFleetError { - fn code(&self) -> ::std::option::Option<&str> { - ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) - } - fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateWorkerFleetError { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::Unhandled(_inner) => &_inner.meta, - } - } -} -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateWorkerFleetError { - fn create_unhandled_error( - source: ::std::boxed::Box, - meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, - ) -> Self { - Self::Unhandled(crate::error::sealed_unhandled::Unhandled { - source, - meta: meta.unwrap_or_default(), - }) - } -} -impl ::aws_types::request_id::RequestId for crate::operation::update_worker_fleet::UpdateWorkerFleetError { - fn request_id(&self) -> Option<&str> { - self.meta().request_id() - } -} - -pub use crate::operation::update_worker_fleet::_update_worker_fleet_output::UpdateWorkerFleetOutput; - -pub use crate::operation::update_worker_fleet::_update_worker_fleet_input::UpdateWorkerFleetInput; - -mod _update_worker_fleet_input; - -mod _update_worker_fleet_output; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_input.rs b/sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_input.rs deleted file mode 100644 index a86cf8e2a610..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_input.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateWorkerFleetInput { - /// Full ARN of the worker fleet. - pub id: ::std::option::Option<::std::string::String>, - /// Human friendly name of the resource. - pub name: ::std::option::Option<::std::string::String>, - /// JSON blob containing additional fixed properties regarding the worker fleet - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl UpdateWorkerFleetInput { - /// Full ARN of the worker fleet. - pub fn id(&self) -> ::std::option::Option<&str> { - self.id.as_deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> ::std::option::Option<&str> { - self.name.as_deref() - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl UpdateWorkerFleetInput { - /// Creates a new builder-style object to manufacture [`UpdateWorkerFleetInput`](crate::operation::update_worker_fleet::UpdateWorkerFleetInput). - pub fn builder() -> crate::operation::update_worker_fleet::builders::UpdateWorkerFleetInputBuilder { - crate::operation::update_worker_fleet::builders::UpdateWorkerFleetInputBuilder::default() - } -} - -/// A builder for [`UpdateWorkerFleetInput`](crate::operation::update_worker_fleet::UpdateWorkerFleetInput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateWorkerFleetInputBuilder { - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl UpdateWorkerFleetInputBuilder { - /// Full ARN of the worker fleet. - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Consumes the builder and constructs a [`UpdateWorkerFleetInput`](crate::operation::update_worker_fleet::UpdateWorkerFleetInput). - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_worker_fleet::UpdateWorkerFleetInput { - id: self.id, - name: self.name, - additional_fixed_properties: self.additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_output.rs b/sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_output.rs deleted file mode 100644 index 9896da0fa60a..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker_fleet/_update_worker_fleet_output.rs +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(missing_docs)] // documentation missing in model -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct UpdateWorkerFleetOutput { - /// Full ARN of the worker fleet. - pub arn: ::std::string::String, - /// Filters access by the worker fleet's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// JSON blob containing additional fixed properties regarding the worker fleet - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl UpdateWorkerFleetOutput { - /// Full ARN of the worker fleet. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the worker fleet's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl ::aws_types::request_id::RequestId for UpdateWorkerFleetOutput { - fn request_id(&self) -> Option<&str> { - self._request_id.as_deref() - } -} -impl UpdateWorkerFleetOutput { - /// Creates a new builder-style object to manufacture [`UpdateWorkerFleetOutput`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput). - pub fn builder() -> crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder { - crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder::default() - } -} - -/// A builder for [`UpdateWorkerFleetOutput`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct UpdateWorkerFleetOutputBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - _request_id: Option, -} -impl UpdateWorkerFleetOutputBuilder { - /// Full ARN of the worker fleet. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the worker fleet's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the worker fleet's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the worker fleet's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { - self._request_id = Some(request_id.into()); - self - } - - pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { - self._request_id = request_id; - self - } - /// Consumes the builder and constructs a [`UpdateWorkerFleetOutput`](crate::operation::update_worker_fleet::UpdateWorkerFleetOutput). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder::arn) - /// - [`id`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder::id) - /// - [`name`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder::name) - /// - [`updated_at`](crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder::updated_at) - pub fn build( - self, - ) -> ::std::result::Result { - ::std::result::Result::Ok(crate::operation::update_worker_fleet::UpdateWorkerFleetOutput { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building UpdateWorkerFleetOutput", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building UpdateWorkerFleetOutput", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building UpdateWorkerFleetOutput", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building UpdateWorkerFleetOutput", - ) - })?, - additional_fixed_properties: self.additional_fixed_properties, - _request_id: self._request_id, - }) - } -} diff --git a/sdk/iotroborunner/src/operation/update_worker_fleet/builders.rs b/sdk/iotroborunner/src/operation/update_worker_fleet/builders.rs deleted file mode 100644 index 27f4effd648e..000000000000 --- a/sdk/iotroborunner/src/operation/update_worker_fleet/builders.rs +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::operation::update_worker_fleet::_update_worker_fleet_output::UpdateWorkerFleetOutputBuilder; - -pub use crate::operation::update_worker_fleet::_update_worker_fleet_input::UpdateWorkerFleetInputBuilder; - -impl UpdateWorkerFleetInputBuilder { - /// Sends a request with this input using the given client. - pub async fn send_with( - self, - client: &crate::Client, - ) -> ::std::result::Result< - crate::operation::update_worker_fleet::UpdateWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let mut fluent_builder = client.update_worker_fleet(); - fluent_builder.inner = self; - fluent_builder.send().await - } -} -/// Fluent builder constructing a request to `UpdateWorkerFleet`. -/// -/// Grants permission to update a worker fleet -#[derive(::std::clone::Clone, ::std::fmt::Debug)] -pub struct UpdateWorkerFleetFluentBuilder { - handle: ::std::sync::Arc, - inner: crate::operation::update_worker_fleet::builders::UpdateWorkerFleetInputBuilder, - config_override: ::std::option::Option, -} -impl - crate::client::customize::internal::CustomizableSend< - crate::operation::update_worker_fleet::UpdateWorkerFleetOutput, - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - > for UpdateWorkerFleetFluentBuilder -{ - fn send( - self, - config_override: crate::config::Builder, - ) -> crate::client::customize::internal::BoxFuture< - crate::client::customize::internal::SendResult< - crate::operation::update_worker_fleet::UpdateWorkerFleetOutput, - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - >, - > { - ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) - } -} -impl UpdateWorkerFleetFluentBuilder { - /// Creates a new `UpdateWorkerFleet`. - pub(crate) fn new(handle: ::std::sync::Arc) -> Self { - Self { - handle, - inner: ::std::default::Default::default(), - config_override: ::std::option::Option::None, - } - } - /// Access the UpdateWorkerFleet as a reference. - pub fn as_input(&self) -> &crate::operation::update_worker_fleet::builders::UpdateWorkerFleetInputBuilder { - &self.inner - } - /// Sends the request and returns the response. - /// - /// If an error occurs, an `SdkError` will be returned with additional details that - /// can be matched against. - /// - /// By default, any retryable failures will be retried twice. Retry behavior - /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be - /// set when configuring the client. - pub async fn send( - self, - ) -> ::std::result::Result< - crate::operation::update_worker_fleet::UpdateWorkerFleetOutput, - ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, - >, - > { - let input = self - .inner - .build() - .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; - let runtime_plugins = crate::operation::update_worker_fleet::UpdateWorkerFleet::operation_runtime_plugins( - self.handle.runtime_plugins.clone(), - &self.handle.conf, - self.config_override, - ); - crate::operation::update_worker_fleet::UpdateWorkerFleet::orchestrate(&runtime_plugins, input).await - } - - /// Consumes this builder, creating a customizable operation that can be modified before being sent. - pub fn customize( - self, - ) -> crate::client::customize::CustomizableOperation< - crate::operation::update_worker_fleet::UpdateWorkerFleetOutput, - crate::operation::update_worker_fleet::UpdateWorkerFleetError, - Self, - > { - crate::client::customize::CustomizableOperation::new(self) - } - pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { - self.set_config_override(Some(config_override.into())); - self - } - - pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { - self.config_override = config_override; - self - } - /// Full ARN of the worker fleet. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.id(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_id(input); - self - } - /// Full ARN of the worker fleet. - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_id() - } - /// Human friendly name of the resource. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.name(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_name(input); - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_name() - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.inner = self.inner.additional_fixed_properties(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.inner = self.inner.set_additional_fixed_properties(input); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - self.inner.get_additional_fixed_properties() - } -} diff --git a/sdk/iotroborunner/src/primitives.rs b/sdk/iotroborunner/src/primitives.rs deleted file mode 100644 index 367d49da1d6d..000000000000 --- a/sdk/iotroborunner/src/primitives.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; -pub use ::aws_smithy_types::DateTime; - -/// Event stream related primitives such as `Message` or `Header`. -pub mod event_stream; - -pub(crate) mod sealed_enum_unknown; diff --git a/sdk/iotroborunner/src/primitives/event_stream.rs b/sdk/iotroborunner/src/primitives/event_stream.rs deleted file mode 100644 index ddd9e04a924d..000000000000 --- a/sdk/iotroborunner/src/primitives/event_stream.rs +++ /dev/null @@ -1 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. diff --git a/sdk/iotroborunner/src/primitives/sealed_enum_unknown.rs b/sdk/iotroborunner/src/primitives/sealed_enum_unknown.rs deleted file mode 100644 index 746e172e83bf..000000000000 --- a/sdk/iotroborunner/src/primitives/sealed_enum_unknown.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Opaque struct used as inner data for the `Unknown` variant defined in enums in -/// the crate. -/// -/// This is not intended to be used directly. -#[non_exhaustive] -#[derive( - ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, -)] -pub struct UnknownVariantValue(pub(crate) ::std::string::String); -impl UnknownVariantValue { - pub(crate) fn as_str(&self) -> &str { - &self.0 - } -} -impl ::std::fmt::Display for UnknownVariantValue { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "{}", self.0) - } -} diff --git a/sdk/iotroborunner/src/protocol_serde.rs b/sdk/iotroborunner/src/protocol_serde.rs deleted file mode 100644 index b49f6fa0ed39..000000000000 --- a/sdk/iotroborunner/src/protocol_serde.rs +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn type_erase_result( - result: ::std::result::Result, -) -> ::std::result::Result< - ::aws_smithy_runtime_api::client::interceptors::context::Output, - ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>, -> -where - O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static, - E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static, -{ - result - .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output)) - .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error)) - .map_err(::std::convert::Into::into) -} - -pub fn parse_http_error_metadata( - _response_status: u16, - response_headers: &::aws_smithy_runtime_api::http::Headers, - response_body: &[u8], -) -> Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> { - crate::json_errors::parse_error_metadata(response_body, response_headers) -} - -pub(crate) mod shape_create_destination; - -pub(crate) mod shape_create_site; - -pub(crate) mod shape_create_worker; - -pub(crate) mod shape_create_worker_fleet; - -pub(crate) mod shape_delete_destination; - -pub(crate) mod shape_delete_site; - -pub(crate) mod shape_delete_worker; - -pub(crate) mod shape_delete_worker_fleet; - -pub(crate) mod shape_get_destination; - -pub(crate) mod shape_get_site; - -pub(crate) mod shape_get_worker; - -pub(crate) mod shape_get_worker_fleet; - -pub(crate) mod shape_list_destinations; - -pub(crate) mod shape_list_sites; - -pub(crate) mod shape_list_worker_fleets; - -pub(crate) mod shape_list_workers; - -pub(crate) mod shape_update_destination; - -pub(crate) mod shape_update_site; - -pub(crate) mod shape_update_worker; - -pub(crate) mod shape_update_worker_fleet; - -pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] { - if data.is_empty() { - b"{}" - } else { - data - } -} - -pub(crate) mod shape_access_denied_exception; - -pub(crate) mod shape_conflict_exception; - -pub(crate) mod shape_create_destination_input; - -pub(crate) mod shape_create_site_input; - -pub(crate) mod shape_create_worker_fleet_input; - -pub(crate) mod shape_create_worker_input; - -pub(crate) mod shape_delete_destination_input; - -pub(crate) mod shape_delete_site_input; - -pub(crate) mod shape_delete_worker_fleet_input; - -pub(crate) mod shape_delete_worker_input; - -pub(crate) mod shape_internal_server_exception; - -pub(crate) mod shape_resource_not_found_exception; - -pub(crate) mod shape_service_quota_exceeded_exception; - -pub(crate) mod shape_throttling_exception; - -pub(crate) mod shape_update_destination_input; - -pub(crate) mod shape_update_site_input; - -pub(crate) mod shape_update_worker_fleet_input; - -pub(crate) mod shape_update_worker_input; - -pub(crate) mod shape_validation_exception; - -pub(crate) mod shape_destinations; - -pub(crate) mod shape_orientation; - -pub(crate) mod shape_position_coordinates; - -pub(crate) mod shape_sites; - -pub(crate) mod shape_vendor_properties; - -pub(crate) mod shape_worker_fleets; - -pub(crate) mod shape_workers; - -pub(crate) mod shape_cartesian_coordinates; - -pub(crate) mod shape_destination; - -pub(crate) mod shape_site; - -pub(crate) mod shape_worker; - -pub(crate) mod shape_worker_fleet; diff --git a/sdk/iotroborunner/src/protocol_serde/shape_access_denied_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_access_denied_exception.rs deleted file mode 100644 index d8fa6ac83705..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_access_denied_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_access_denied_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::AccessDeniedExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_cartesian_coordinates.rs b/sdk/iotroborunner/src/protocol_serde/shape_cartesian_coordinates.rs deleted file mode 100644 index 25c9c5e8e13b..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_cartesian_coordinates.rs +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_cartesian_coordinates( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::types::CartesianCoordinates, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - { - object.key("x").number( - #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::Float((input.x).into()), - ); - } - { - object.key("y").number( - #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::Float((input.y).into()), - ); - } - if let Some(var_1) = &input.z { - object.key("z").number( - #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::Float((*var_1).into()), - ); - } - Ok(()) -} - -pub(crate) fn de_cartesian_coordinates<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { - #[allow(unused_mut)] - let mut builder = crate::types::builders::CartesianCoordinatesBuilder::default(); - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "x" => { - builder = - builder.set_x(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())); - } - "y" => { - builder = - builder.set_y(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())); - } - "z" => { - builder = - builder.set_z(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - Ok(Some(crate::serde_util::cartesian_coordinates_correct_errors(builder).build().map_err( - |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err), - )?)) - } - _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )), - } -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_conflict_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_conflict_exception.rs deleted file mode 100644 index c9f9880270ac..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_conflict_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_conflict_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::ConflictExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_destination.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_destination.rs deleted file mode 100644 index 9c06c2eff406..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_destination.rs +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_destination_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::create_destination::CreateDestinationError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::create_destination::CreateDestinationError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::create_destination::CreateDestinationError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::create_destination::CreateDestinationError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::create_destination::CreateDestinationError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ServiceQuotaExceededException" => crate::operation::create_destination::CreateDestinationError::ServiceQuotaExceededException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default(); - output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err( - _response_body, - output, - ) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::create_destination::CreateDestinationError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::create_destination::CreateDestinationError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::create_destination::CreateDestinationError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_destination_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::create_destination::builders::CreateDestinationOutputBuilder::default(); - output = crate::protocol_serde::shape_create_destination::de_create_destination(_response_body, output) - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::create_destination_output_output_correct_errors(output) - .build() - .map_err(crate::operation::create_destination::CreateDestinationError::unhandled)? - }) -} - -pub fn ser_create_destination_input( - input: &crate::operation::create_destination::CreateDestinationInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_create_destination_input::ser_create_destination_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_create_destination( - value: &[u8], - mut builder: crate::operation::create_destination::builders::CreateDestinationOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "state" => { - builder = builder.set_state( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| crate::types::DestinationState::from(u.as_ref()))) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_destination_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_destination_input.rs deleted file mode 100644 index 0b4cefca83c5..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_destination_input.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_create_destination_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::create_destination::CreateDestinationInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.additional_fixed_properties { - object.key("additionalFixedProperties").string(var_1.as_str()); - } - if let Some(var_2) = &input.client_token { - object.key("clientToken").string(var_2.as_str()); - } - if let Some(var_3) = &input.name { - object.key("name").string(var_3.as_str()); - } - if let Some(var_4) = &input.site { - object.key("site").string(var_4.as_str()); - } - if let Some(var_5) = &input.state { - object.key("state").string(var_5.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_site.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_site.rs deleted file mode 100644 index abab63ed79f5..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_site.rs +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_site_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::create_site::CreateSiteError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::create_site::CreateSiteError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::create_site::CreateSiteError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::create_site::CreateSiteError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ServiceQuotaExceededException" => crate::operation::create_site::CreateSiteError::ServiceQuotaExceededException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default(); - output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err( - _response_body, - output, - ) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::create_site::CreateSiteError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::create_site::CreateSiteError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::create_site::CreateSiteError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_site_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::create_site::builders::CreateSiteOutputBuilder::default(); - output = crate::protocol_serde::shape_create_site::de_create_site(_response_body, output) - .map_err(crate::operation::create_site::CreateSiteError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::create_site_output_output_correct_errors(output) - .build() - .map_err(crate::operation::create_site::CreateSiteError::unhandled)? - }) -} - -pub fn ser_create_site_input( - input: &crate::operation::create_site::CreateSiteInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_create_site_input::ser_create_site_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_create_site( - value: &[u8], - mut builder: crate::operation::create_site::builders::CreateSiteOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_site_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_site_input.rs deleted file mode 100644 index f7e75bad3010..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_site_input.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_create_site_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::create_site::CreateSiteInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.client_token { - object.key("clientToken").string(var_1.as_str()); - } - if let Some(var_2) = &input.country_code { - object.key("countryCode").string(var_2.as_str()); - } - if let Some(var_3) = &input.description { - object.key("description").string(var_3.as_str()); - } - if let Some(var_4) = &input.name { - object.key("name").string(var_4.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_worker.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_worker.rs deleted file mode 100644 index b458b3c01816..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_worker.rs +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_worker_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::create_worker::CreateWorkerError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::create_worker::CreateWorkerError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::create_worker::CreateWorkerError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::create_worker::CreateWorkerError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::create_worker::CreateWorkerError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ServiceQuotaExceededException" => crate::operation::create_worker::CreateWorkerError::ServiceQuotaExceededException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default(); - output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err( - _response_body, - output, - ) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::create_worker::CreateWorkerError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::create_worker::CreateWorkerError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::create_worker::CreateWorkerError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_worker_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::create_worker::builders::CreateWorkerOutputBuilder::default(); - output = crate::protocol_serde::shape_create_worker::de_create_worker(_response_body, output) - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::create_worker_output_output_correct_errors(output) - .build() - .map_err(crate::operation::create_worker::CreateWorkerError::unhandled)? - }) -} - -pub fn ser_create_worker_input( - input: &crate::operation::create_worker::CreateWorkerInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_create_worker_input::ser_create_worker_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_create_worker( - value: &[u8], - mut builder: crate::operation::create_worker::builders::CreateWorkerOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet.rs deleted file mode 100644 index 7d429bec22b8..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet.rs +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_worker_fleet_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ServiceQuotaExceededException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::ServiceQuotaExceededException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default(); - output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err( - _response_body, - output, - ) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::create_worker_fleet::CreateWorkerFleetError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::create_worker_fleet::CreateWorkerFleetError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_create_worker_fleet_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder::default(); - output = crate::protocol_serde::shape_create_worker_fleet::de_create_worker_fleet(_response_body, output) - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::create_worker_fleet_output_output_correct_errors(output) - .build() - .map_err(crate::operation::create_worker_fleet::CreateWorkerFleetError::unhandled)? - }) -} - -pub fn ser_create_worker_fleet_input( - input: &crate::operation::create_worker_fleet::CreateWorkerFleetInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_create_worker_fleet_input::ser_create_worker_fleet_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_create_worker_fleet( - value: &[u8], - mut builder: crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder, -) -> Result -{ - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet_input.rs deleted file mode 100644 index 23304374db0e..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_worker_fleet_input.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_create_worker_fleet_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::create_worker_fleet::CreateWorkerFleetInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.additional_fixed_properties { - object.key("additionalFixedProperties").string(var_1.as_str()); - } - if let Some(var_2) = &input.client_token { - object.key("clientToken").string(var_2.as_str()); - } - if let Some(var_3) = &input.name { - object.key("name").string(var_3.as_str()); - } - if let Some(var_4) = &input.site { - object.key("site").string(var_4.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_create_worker_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_create_worker_input.rs deleted file mode 100644 index 0360137ac612..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_create_worker_input.rs +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_create_worker_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::create_worker::CreateWorkerInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.additional_fixed_properties { - object.key("additionalFixedProperties").string(var_1.as_str()); - } - if let Some(var_2) = &input.additional_transient_properties { - object.key("additionalTransientProperties").string(var_2.as_str()); - } - if let Some(var_3) = &input.client_token { - object.key("clientToken").string(var_3.as_str()); - } - if let Some(var_4) = &input.fleet { - object.key("fleet").string(var_4.as_str()); - } - if let Some(var_5) = &input.name { - object.key("name").string(var_5.as_str()); - } - if let Some(var_6) = &input.orientation { - #[allow(unused_mut)] - let mut object_7 = object.key("orientation").start_object(); - crate::protocol_serde::shape_orientation::ser_orientation(&mut object_7, var_6)?; - object_7.finish(); - } - if let Some(var_8) = &input.position { - #[allow(unused_mut)] - let mut object_9 = object.key("position").start_object(); - crate::protocol_serde::shape_position_coordinates::ser_position_coordinates(&mut object_9, var_8)?; - object_9.finish(); - } - if let Some(var_10) = &input.vendor_properties { - #[allow(unused_mut)] - let mut object_11 = object.key("vendorProperties").start_object(); - crate::protocol_serde::shape_vendor_properties::ser_vendor_properties(&mut object_11, var_10)?; - object_11.finish(); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_destination.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_destination.rs deleted file mode 100644 index eb9cbce8d983..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_destination.rs +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_destination_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::delete_destination::DeleteDestinationError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::delete_destination::DeleteDestinationError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::delete_destination::DeleteDestinationError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::delete_destination::DeleteDestinationError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::delete_destination::DeleteDestinationError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::delete_destination::DeleteDestinationError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::delete_destination::DeleteDestinationError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_destination::DeleteDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::delete_destination::DeleteDestinationError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_destination_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::delete_destination::builders::DeleteDestinationOutputBuilder::default(); - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub fn ser_delete_destination_input( - input: &crate::operation::delete_destination::DeleteDestinationInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_delete_destination_input::ser_delete_destination_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_destination_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_destination_input.rs deleted file mode 100644 index d6a7de5e7641..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_destination_input.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_delete_destination_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::delete_destination::DeleteDestinationInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.id { - object.key("id").string(var_1.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_site.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_site.rs deleted file mode 100644 index 4503f913ca87..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_site.rs +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_site_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::delete_site::DeleteSiteError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::delete_site::DeleteSiteError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::delete_site::DeleteSiteError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::delete_site::DeleteSiteError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::delete_site::DeleteSiteError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::delete_site::DeleteSiteError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::delete_site::DeleteSiteError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_site::DeleteSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::delete_site::DeleteSiteError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_site_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::delete_site::builders::DeleteSiteOutputBuilder::default(); - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub fn ser_delete_site_input( - input: &crate::operation::delete_site::DeleteSiteInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_delete_site_input::ser_delete_site_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_site_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_site_input.rs deleted file mode 100644 index 8ad31becc208..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_site_input.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_delete_site_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::delete_site::DeleteSiteInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.id { - object.key("id").string(var_1.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_worker.rs deleted file mode 100644 index cfdd82e01cba..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker.rs +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_worker_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::delete_worker::DeleteWorkerError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::delete_worker::DeleteWorkerError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::delete_worker::DeleteWorkerError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::delete_worker::DeleteWorkerError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::delete_worker::DeleteWorkerError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::delete_worker::DeleteWorkerError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::delete_worker::DeleteWorkerError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker::DeleteWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::delete_worker::DeleteWorkerError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_worker_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::delete_worker::builders::DeleteWorkerOutputBuilder::default(); - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub fn ser_delete_worker_input( - input: &crate::operation::delete_worker::DeleteWorkerInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_delete_worker_input::ser_delete_worker_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet.rs deleted file mode 100644 index c1c37adf6733..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet.rs +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_worker_fleet_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ConflictException" => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ConflictException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ConflictExceptionBuilder::default(); - output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::delete_worker_fleet::DeleteWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::delete_worker_fleet::DeleteWorkerFleetError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_delete_worker_fleet_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::delete_worker_fleet::builders::DeleteWorkerFleetOutputBuilder::default(); - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub fn ser_delete_worker_fleet_input( - input: &crate::operation::delete_worker_fleet::DeleteWorkerFleetInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_delete_worker_fleet_input::ser_delete_worker_fleet_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet_input.rs deleted file mode 100644 index 65bc49c20f4a..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_fleet_input.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_delete_worker_fleet_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::delete_worker_fleet::DeleteWorkerFleetInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.id { - object.key("id").string(var_1.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_input.rs deleted file mode 100644 index bf8fe8a13e92..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_delete_worker_input.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_delete_worker_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::delete_worker::DeleteWorkerInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.id { - object.key("id").string(var_1.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_destination.rs b/sdk/iotroborunner/src/protocol_serde/shape_destination.rs deleted file mode 100644 index 0355a1d83013..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_destination.rs +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_destination<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { - #[allow(unused_mut)] - let mut builder = crate::types::builders::DestinationBuilder::default(); - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "state" => { - builder = builder.set_state( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| crate::types::DestinationState::from(u.as_ref()))) - .transpose()?, - ); - } - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - Ok(Some(crate::serde_util::destination_correct_errors(builder).build().map_err(|err| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) - })?)) - } - _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )), - } -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_get_destination.rs b/sdk/iotroborunner/src/protocol_serde/shape_get_destination.rs deleted file mode 100644 index 28dc6518446e..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_get_destination.rs +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_destination_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::get_destination::GetDestinationError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::get_destination::GetDestinationError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::get_destination::GetDestinationError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::get_destination::GetDestinationError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::get_destination::GetDestinationError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::get_destination::GetDestinationError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::get_destination::GetDestinationError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_destination_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::get_destination::builders::GetDestinationOutputBuilder::default(); - output = crate::protocol_serde::shape_get_destination::de_get_destination(_response_body, output) - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::get_destination_output_output_correct_errors(output) - .build() - .map_err(crate::operation::get_destination::GetDestinationError::unhandled)? - }) -} - -pub(crate) fn de_get_destination( - value: &[u8], - mut builder: crate::operation::get_destination::builders::GetDestinationOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "state" => { - builder = builder.set_state( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| crate::types::DestinationState::from(u.as_ref()))) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_get_site.rs b/sdk/iotroborunner/src/protocol_serde/shape_get_site.rs deleted file mode 100644 index 4b2323cb0d16..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_get_site.rs +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_site_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::get_site::GetSiteError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::get_site::GetSiteError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::get_site::GetSiteError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::get_site::GetSiteError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::get_site::GetSiteError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::get_site::GetSiteError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::get_site::GetSiteError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_site_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::get_site::builders::GetSiteOutputBuilder::default(); - output = crate::protocol_serde::shape_get_site::de_get_site(_response_body, output) - .map_err(crate::operation::get_site::GetSiteError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::get_site_output_output_correct_errors(output) - .build() - .map_err(crate::operation::get_site::GetSiteError::unhandled)? - }) -} - -pub(crate) fn de_get_site( - value: &[u8], - mut builder: crate::operation::get_site::builders::GetSiteOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "countryCode" => { - builder = builder.set_country_code( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "description" => { - builder = builder.set_description( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_get_worker.rs b/sdk/iotroborunner/src/protocol_serde/shape_get_worker.rs deleted file mode 100644 index a1582ab10524..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_get_worker.rs +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_worker_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::get_worker::GetWorkerError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::get_worker::GetWorkerError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::get_worker::GetWorkerError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::get_worker::GetWorkerError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::get_worker::GetWorkerError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::get_worker::GetWorkerError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::get_worker::GetWorkerError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_worker_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::get_worker::builders::GetWorkerOutputBuilder::default(); - output = crate::protocol_serde::shape_get_worker::de_get_worker(_response_body, output) - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::get_worker_output_output_correct_errors(output) - .build() - .map_err(crate::operation::get_worker::GetWorkerError::unhandled)? - }) -} - -pub(crate) fn de_get_worker( - value: &[u8], - mut builder: crate::operation::get_worker::builders::GetWorkerOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "additionalTransientProperties" => { - builder = builder.set_additional_transient_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "fleet" => { - builder = builder.set_fleet( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "orientation" => { - builder = builder.set_orientation(crate::protocol_serde::shape_orientation::de_orientation(tokens)?); - } - "position" => { - builder = builder.set_position(crate::protocol_serde::shape_position_coordinates::de_position_coordinates(tokens)?); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "vendorProperties" => { - builder = builder.set_vendor_properties(crate::protocol_serde::shape_vendor_properties::de_vendor_properties(tokens)?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_get_worker_fleet.rs b/sdk/iotroborunner/src/protocol_serde/shape_get_worker_fleet.rs deleted file mode 100644 index 2c03b1e11efb..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_get_worker_fleet.rs +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_worker_fleet_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::get_worker_fleet::GetWorkerFleetError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::get_worker_fleet::GetWorkerFleetError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::get_worker_fleet::GetWorkerFleetError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::get_worker_fleet::GetWorkerFleetError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::get_worker_fleet::GetWorkerFleetError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::get_worker_fleet::GetWorkerFleetError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_get_worker_fleet_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder::default(); - output = crate::protocol_serde::shape_get_worker_fleet::de_get_worker_fleet(_response_body, output) - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::get_worker_fleet_output_output_correct_errors(output) - .build() - .map_err(crate::operation::get_worker_fleet::GetWorkerFleetError::unhandled)? - }) -} - -pub(crate) fn de_get_worker_fleet( - value: &[u8], - mut builder: crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_internal_server_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_internal_server_exception.rs deleted file mode 100644 index 685976838c36..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_internal_server_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_internal_server_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::InternalServerExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_list_destinations.rs b/sdk/iotroborunner/src/protocol_serde/shape_list_destinations.rs deleted file mode 100644 index f85ab41876ed..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_list_destinations.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_destinations_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::list_destinations::ListDestinationsError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::list_destinations::ListDestinationsError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::list_destinations::ListDestinationsError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::list_destinations::ListDestinationsError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::list_destinations::ListDestinationsError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::list_destinations::ListDestinationsError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::list_destinations::ListDestinationsError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_destinations_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::list_destinations::builders::ListDestinationsOutputBuilder::default(); - output = crate::protocol_serde::shape_list_destinations::de_list_destinations(_response_body, output) - .map_err(crate::operation::list_destinations::ListDestinationsError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub(crate) fn de_list_destinations( - value: &[u8], - mut builder: crate::operation::list_destinations::builders::ListDestinationsOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "destinations" => { - builder = builder.set_destinations(crate::protocol_serde::shape_destinations::de_destinations(tokens)?); - } - "nextToken" => { - builder = builder.set_next_token( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_list_sites.rs b/sdk/iotroborunner/src/protocol_serde/shape_list_sites.rs deleted file mode 100644 index cbba2c6ffdbf..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_list_sites.rs +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_sites_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::list_sites::ListSitesError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::list_sites::ListSitesError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::list_sites::ListSitesError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::list_sites::ListSitesError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::list_sites::ListSitesError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::list_sites::ListSitesError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::list_sites::ListSitesError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::list_sites::ListSitesError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::list_sites::ListSitesError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::list_sites::ListSitesError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::list_sites::ListSitesError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_sites_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::list_sites::builders::ListSitesOutputBuilder::default(); - output = crate::protocol_serde::shape_list_sites::de_list_sites(_response_body, output) - .map_err(crate::operation::list_sites::ListSitesError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub(crate) fn de_list_sites( - value: &[u8], - mut builder: crate::operation::list_sites::builders::ListSitesOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "nextToken" => { - builder = builder.set_next_token( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "sites" => { - builder = builder.set_sites(crate::protocol_serde::shape_sites::de_sites(tokens)?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_list_worker_fleets.rs b/sdk/iotroborunner/src/protocol_serde/shape_list_worker_fleets.rs deleted file mode 100644 index dab083af1089..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_list_worker_fleets.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_worker_fleets_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::list_worker_fleets::ListWorkerFleetsError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::list_worker_fleets::ListWorkerFleetsError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::list_worker_fleets::ListWorkerFleetsError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::list_worker_fleets::ListWorkerFleetsError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::list_worker_fleets::ListWorkerFleetsError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::list_worker_fleets::ListWorkerFleetsError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_worker_fleets_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::list_worker_fleets::builders::ListWorkerFleetsOutputBuilder::default(); - output = crate::protocol_serde::shape_list_worker_fleets::de_list_worker_fleets(_response_body, output) - .map_err(crate::operation::list_worker_fleets::ListWorkerFleetsError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub(crate) fn de_list_worker_fleets( - value: &[u8], - mut builder: crate::operation::list_worker_fleets::builders::ListWorkerFleetsOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "nextToken" => { - builder = builder.set_next_token( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "workerFleets" => { - builder = builder.set_worker_fleets(crate::protocol_serde::shape_worker_fleets::de_worker_fleets(tokens)?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_list_workers.rs b/sdk/iotroborunner/src/protocol_serde/shape_list_workers.rs deleted file mode 100644 index 42e45c476792..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_list_workers.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_workers_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::list_workers::ListWorkersError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::list_workers::ListWorkersError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::list_workers::ListWorkersError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::list_workers::ListWorkersError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::list_workers::ListWorkersError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::list_workers::ListWorkersError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::list_workers::ListWorkersError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_list_workers_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::list_workers::builders::ListWorkersOutputBuilder::default(); - output = crate::protocol_serde::shape_list_workers::de_list_workers(_response_body, output) - .map_err(crate::operation::list_workers::ListWorkersError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - output.build() - }) -} - -pub(crate) fn de_list_workers( - value: &[u8], - mut builder: crate::operation::list_workers::builders::ListWorkersOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "nextToken" => { - builder = builder.set_next_token( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "workers" => { - builder = builder.set_workers(crate::protocol_serde::shape_workers::de_workers(tokens)?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_orientation.rs b/sdk/iotroborunner/src/protocol_serde/shape_orientation.rs deleted file mode 100644 index 35eff1820149..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_orientation.rs +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_orientation( - object_7: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::types::Orientation, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - match input { - crate::types::Orientation::Degrees(inner) => { - object_7.key("degrees").number( - #[allow(clippy::useless_conversion)] - ::aws_smithy_types::Number::Float((*inner).into()), - ); - } - crate::types::Orientation::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("Orientation")), - } - Ok(()) -} - -pub(crate) fn de_orientation<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - let mut variant = None; - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => { - let key = key.to_unescaped()?; - if key == "__type" { - ::aws_smithy_json::deserialize::token::skip_value(tokens)?; - continue; - } - if variant.is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "encountered mixed variants in union", - )); - } - variant = match key.as_ref() { - "degrees" => Some(crate::types::Orientation::Degrees( - ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? - .map(|v| v.to_f64_lossy()) - .ok_or_else(|| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'degrees' cannot be null") - })?, - )), - _ => { - ::aws_smithy_json::deserialize::token::skip_value(tokens)?; - Some(crate::types::Orientation::Unknown) - } - }; - } - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - }, - _ => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )) - } - } - Ok(variant) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_position_coordinates.rs b/sdk/iotroborunner/src/protocol_serde/shape_position_coordinates.rs deleted file mode 100644 index 6fb3d91fb173..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_position_coordinates.rs +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_position_coordinates( - object_9: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::types::PositionCoordinates, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - match input { - crate::types::PositionCoordinates::CartesianCoordinates(inner) => { - #[allow(unused_mut)] - let mut object_1 = object_9.key("cartesianCoordinates").start_object(); - crate::protocol_serde::shape_cartesian_coordinates::ser_cartesian_coordinates(&mut object_1, inner)?; - object_1.finish(); - } - crate::types::PositionCoordinates::Unknown => { - return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant( - "PositionCoordinates", - )) - } - } - Ok(()) -} - -pub(crate) fn de_position_coordinates<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - let mut variant = None; - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => { - let key = key.to_unescaped()?; - if key == "__type" { - ::aws_smithy_json::deserialize::token::skip_value(tokens)?; - continue; - } - if variant.is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "encountered mixed variants in union", - )); - } - variant = match key.as_ref() { - "cartesianCoordinates" => Some(crate::types::PositionCoordinates::CartesianCoordinates( - crate::protocol_serde::shape_cartesian_coordinates::de_cartesian_coordinates(tokens)?.ok_or_else(|| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'cartesianCoordinates' cannot be null") - })?, - )), - _ => { - ::aws_smithy_json::deserialize::token::skip_value(tokens)?; - Some(crate::types::PositionCoordinates::Unknown) - } - }; - } - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - }, - _ => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )) - } - } - Ok(variant) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_resource_not_found_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_resource_not_found_exception.rs deleted file mode 100644 index ff4cb43a93b8..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_resource_not_found_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_resource_not_found_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::ResourceNotFoundExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_service_quota_exceeded_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_service_quota_exceeded_exception.rs deleted file mode 100644 index 470a25fa236e..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_service_quota_exceeded_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_service_quota_exceeded_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::ServiceQuotaExceededExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_throttling_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_throttling_exception.rs deleted file mode 100644 index 793a466fb75e..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_throttling_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_throttling_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::ThrottlingExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_destination.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_destination.rs deleted file mode 100644 index f8f5ddc4d480..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_destination.rs +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_destination_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::update_destination::UpdateDestinationError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::update_destination::UpdateDestinationError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::update_destination::UpdateDestinationError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::update_destination::UpdateDestinationError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::update_destination::UpdateDestinationError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::update_destination::UpdateDestinationError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::update_destination::UpdateDestinationError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_destination_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::update_destination::builders::UpdateDestinationOutputBuilder::default(); - output = crate::protocol_serde::shape_update_destination::de_update_destination(_response_body, output) - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::update_destination_output_output_correct_errors(output) - .build() - .map_err(crate::operation::update_destination::UpdateDestinationError::unhandled)? - }) -} - -pub fn ser_update_destination_input( - input: &crate::operation::update_destination::UpdateDestinationInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_update_destination_input::ser_update_destination_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_update_destination( - value: &[u8], - mut builder: crate::operation::update_destination::builders::UpdateDestinationOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "state" => { - builder = builder.set_state( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| crate::types::DestinationState::from(u.as_ref()))) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_destination_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_destination_input.rs deleted file mode 100644 index c541df2a08d3..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_destination_input.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_update_destination_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::update_destination::UpdateDestinationInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.additional_fixed_properties { - object.key("additionalFixedProperties").string(var_1.as_str()); - } - if let Some(var_2) = &input.id { - object.key("id").string(var_2.as_str()); - } - if let Some(var_3) = &input.name { - object.key("name").string(var_3.as_str()); - } - if let Some(var_4) = &input.state { - object.key("state").string(var_4.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_site.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_site.rs deleted file mode 100644 index 9215b705b054..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_site.rs +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_site_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::update_site::UpdateSiteError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::update_site::UpdateSiteError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::update_site::UpdateSiteError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::update_site::UpdateSiteError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::update_site::UpdateSiteError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::update_site::UpdateSiteError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::update_site::UpdateSiteError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_site_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::update_site::builders::UpdateSiteOutputBuilder::default(); - output = crate::protocol_serde::shape_update_site::de_update_site(_response_body, output) - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::update_site_output_output_correct_errors(output) - .build() - .map_err(crate::operation::update_site::UpdateSiteError::unhandled)? - }) -} - -pub fn ser_update_site_input( - input: &crate::operation::update_site::UpdateSiteInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_update_site_input::ser_update_site_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_update_site( - value: &[u8], - mut builder: crate::operation::update_site::builders::UpdateSiteOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "countryCode" => { - builder = builder.set_country_code( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "description" => { - builder = builder.set_description( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_site_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_site_input.rs deleted file mode 100644 index 3b8f1ca5a00b..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_site_input.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_update_site_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::update_site::UpdateSiteInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.country_code { - object.key("countryCode").string(var_1.as_str()); - } - if let Some(var_2) = &input.description { - object.key("description").string(var_2.as_str()); - } - if let Some(var_3) = &input.id { - object.key("id").string(var_3.as_str()); - } - if let Some(var_4) = &input.name { - object.key("name").string(var_4.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_worker.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_worker.rs deleted file mode 100644 index cbad64b002d6..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_worker.rs +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_worker_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::update_worker::UpdateWorkerError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::update_worker::UpdateWorkerError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::update_worker::UpdateWorkerError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::update_worker::UpdateWorkerError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::update_worker::UpdateWorkerError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::update_worker::UpdateWorkerError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::update_worker::UpdateWorkerError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_worker_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result { - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::update_worker::builders::UpdateWorkerOutputBuilder::default(); - output = crate::protocol_serde::shape_update_worker::de_update_worker(_response_body, output) - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::update_worker_output_output_correct_errors(output) - .build() - .map_err(crate::operation::update_worker::UpdateWorkerError::unhandled)? - }) -} - -pub fn ser_update_worker_input( - input: &crate::operation::update_worker::UpdateWorkerInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_update_worker_input::ser_update_worker_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_update_worker( - value: &[u8], - mut builder: crate::operation::update_worker::builders::UpdateWorkerOutputBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "additionalTransientProperties" => { - builder = builder.set_additional_transient_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "fleet" => { - builder = builder.set_fleet( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "orientation" => { - builder = builder.set_orientation(crate::protocol_serde::shape_orientation::de_orientation(tokens)?); - } - "position" => { - builder = builder.set_position(crate::protocol_serde::shape_position_coordinates::de_position_coordinates(tokens)?); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "vendorProperties" => { - builder = builder.set_vendor_properties(crate::protocol_serde::shape_vendor_properties::de_vendor_properties(tokens)?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet.rs deleted file mode 100644 index 8ac00704d037..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet.rs +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_worker_fleet_http_error( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - #[allow(unused_mut)] - let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); - let generic = generic_builder.build(); - let error_code = match generic.code() { - Some(code) => code, - None => return Err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled(generic)), - }; - - let _error_message = generic.message().map(|msg| msg.to_owned()); - Err(match error_code { - "AccessDeniedException" => crate::operation::update_worker_fleet::UpdateWorkerFleetError::AccessDeniedException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default(); - output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "InternalServerException" => crate::operation::update_worker_fleet::UpdateWorkerFleetError::InternalServerException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default(); - output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ResourceNotFoundException" => crate::operation::update_worker_fleet::UpdateWorkerFleetError::ResourceNotFoundException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default(); - output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ThrottlingException" => crate::operation::update_worker_fleet::UpdateWorkerFleetError::ThrottlingException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default(); - output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - "ValidationException" => crate::operation::update_worker_fleet::UpdateWorkerFleetError::ValidationException({ - #[allow(unused_mut)] - let mut tmp = { - #[allow(unused_mut)] - let mut output = crate::types::error::builders::ValidationExceptionBuilder::default(); - output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - let output = output.meta(generic); - output.build() - }; - if tmp.message.is_none() { - tmp.message = _error_message; - } - tmp - }), - _ => crate::operation::update_worker_fleet::UpdateWorkerFleetError::generic(generic), - }) -} - -#[allow(clippy::unnecessary_wraps)] -pub fn de_update_worker_fleet_http_response( - _response_status: u16, - _response_headers: &::aws_smithy_runtime_api::http::Headers, - _response_body: &[u8], -) -> std::result::Result -{ - Ok({ - #[allow(unused_mut)] - let mut output = crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder::default(); - output = crate::protocol_serde::shape_update_worker_fleet::de_update_worker_fleet(_response_body, output) - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)?; - output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); - crate::serde_util::update_worker_fleet_output_output_correct_errors(output) - .build() - .map_err(crate::operation::update_worker_fleet::UpdateWorkerFleetError::unhandled)? - }) -} - -pub fn ser_update_worker_fleet_input( - input: &crate::operation::update_worker_fleet::UpdateWorkerFleetInput, -) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { - let mut out = String::new(); - let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out); - crate::protocol_serde::shape_update_worker_fleet_input::ser_update_worker_fleet_input_input(&mut object, input)?; - object.finish(); - Ok(::aws_smithy_types::body::SdkBody::from(out)) -} - -pub(crate) fn de_update_worker_fleet( - value: &[u8], - mut builder: crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder, -) -> Result -{ - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet_input.rs deleted file mode 100644 index 1d9c3e45757f..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_worker_fleet_input.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_update_worker_fleet_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::update_worker_fleet::UpdateWorkerFleetInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.additional_fixed_properties { - object.key("additionalFixedProperties").string(var_1.as_str()); - } - if let Some(var_2) = &input.id { - object.key("id").string(var_2.as_str()); - } - if let Some(var_3) = &input.name { - object.key("name").string(var_3.as_str()); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_update_worker_input.rs b/sdk/iotroborunner/src/protocol_serde/shape_update_worker_input.rs deleted file mode 100644 index 1b2ad8dde398..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_update_worker_input.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_update_worker_input_input( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::operation::update_worker::UpdateWorkerInput, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.additional_fixed_properties { - object.key("additionalFixedProperties").string(var_1.as_str()); - } - if let Some(var_2) = &input.additional_transient_properties { - object.key("additionalTransientProperties").string(var_2.as_str()); - } - if let Some(var_3) = &input.id { - object.key("id").string(var_3.as_str()); - } - if let Some(var_4) = &input.name { - object.key("name").string(var_4.as_str()); - } - if let Some(var_5) = &input.orientation { - #[allow(unused_mut)] - let mut object_6 = object.key("orientation").start_object(); - crate::protocol_serde::shape_orientation::ser_orientation(&mut object_6, var_5)?; - object_6.finish(); - } - if let Some(var_7) = &input.position { - #[allow(unused_mut)] - let mut object_8 = object.key("position").start_object(); - crate::protocol_serde::shape_position_coordinates::ser_position_coordinates(&mut object_8, var_7)?; - object_8.finish(); - } - if let Some(var_9) = &input.vendor_properties { - #[allow(unused_mut)] - let mut object_10 = object.key("vendorProperties").start_object(); - crate::protocol_serde::shape_vendor_properties::ser_vendor_properties(&mut object_10, var_9)?; - object_10.finish(); - } - Ok(()) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_validation_exception.rs b/sdk/iotroborunner/src/protocol_serde/shape_validation_exception.rs deleted file mode 100644 index a0173754eba6..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_validation_exception.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_validation_exception_json_err( - value: &[u8], - mut builder: crate::types::error::builders::ValidationExceptionBuilder, -) -> Result { - let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable(); - let tokens = &mut tokens_owned; - ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?; - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "message" => { - builder = builder.set_message( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - if tokens.next().is_some() { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "found more JSON tokens after completing parsing", - )); - } - Ok(builder) -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_vendor_properties.rs b/sdk/iotroborunner/src/protocol_serde/shape_vendor_properties.rs deleted file mode 100644 index ab761c6e7e34..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_vendor_properties.rs +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub fn ser_vendor_properties( - object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, - input: &crate::types::VendorProperties, -) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - { - object.key("vendorWorkerId").string(input.vendor_worker_id.as_str()); - } - if let Some(var_1) = &input.vendor_worker_ip_address { - object.key("vendorWorkerIpAddress").string(var_1.as_str()); - } - if let Some(var_2) = &input.vendor_additional_transient_properties { - object.key("vendorAdditionalTransientProperties").string(var_2.as_str()); - } - if let Some(var_3) = &input.vendor_additional_fixed_properties { - object.key("vendorAdditionalFixedProperties").string(var_3.as_str()); - } - Ok(()) -} - -pub(crate) fn de_vendor_properties<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { - #[allow(unused_mut)] - let mut builder = crate::types::builders::VendorPropertiesBuilder::default(); - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "vendorWorkerId" => { - builder = builder.set_vendor_worker_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "vendorWorkerIpAddress" => { - builder = builder.set_vendor_worker_ip_address( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "vendorAdditionalTransientProperties" => { - builder = builder.set_vendor_additional_transient_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "vendorAdditionalFixedProperties" => { - builder = builder.set_vendor_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - Ok(Some(crate::serde_util::vendor_properties_correct_errors(builder).build().map_err( - |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err), - )?)) - } - _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )), - } -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_worker.rs b/sdk/iotroborunner/src/protocol_serde/shape_worker.rs deleted file mode 100644 index ad67c659221f..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_worker.rs +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_worker<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { - #[allow(unused_mut)] - let mut builder = crate::types::builders::WorkerBuilder::default(); - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "fleet" => { - builder = builder.set_fleet( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "additionalTransientProperties" => { - builder = builder.set_additional_transient_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "vendorProperties" => { - builder = builder.set_vendor_properties(crate::protocol_serde::shape_vendor_properties::de_vendor_properties(tokens)?); - } - "position" => { - builder = builder.set_position(crate::protocol_serde::shape_position_coordinates::de_position_coordinates(tokens)?); - } - "orientation" => { - builder = builder.set_orientation(crate::protocol_serde::shape_orientation::de_orientation(tokens)?); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - Ok(Some(crate::serde_util::worker_correct_errors(builder).build().map_err(|err| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) - })?)) - } - _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )), - } -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_worker_fleet.rs b/sdk/iotroborunner/src/protocol_serde/shape_worker_fleet.rs deleted file mode 100644 index 8931f9dc0de8..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_worker_fleet.rs +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_worker_fleet<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { - #[allow(unused_mut)] - let mut builder = crate::types::builders::WorkerFleetBuilder::default(); - loop { - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, - Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "id" => { - builder = builder.set_id( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "site" => { - builder = builder.set_site( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "updatedAt" => { - builder = builder.set_updated_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); - } - "additionalFixedProperties" => { - builder = builder.set_additional_fixed_properties( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, - }, - other => { - return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( - "expected object key or end object, found: {:?}", - other - ))) - } - } - } - Ok(Some(crate::serde_util::worker_fleet_correct_errors(builder).build().map_err(|err| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) - })?)) - } - _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start object or null", - )), - } -} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_worker_fleets.rs b/sdk/iotroborunner/src/protocol_serde/shape_worker_fleets.rs deleted file mode 100644 index 66d865543d45..000000000000 --- a/sdk/iotroborunner/src/protocol_serde/shape_worker_fleets.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_worker_fleets<'a, I>( - tokens: &mut ::std::iter::Peekable, -) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> -where - I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, -{ - match tokens.next().transpose()? { - Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), - Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => { - let mut items = Vec::new(); - loop { - match tokens.peek() { - Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => { - tokens.next().transpose().unwrap(); - break; - } - _ => { - let value = crate::protocol_serde::shape_worker_fleet::de_worker_fleet(tokens)?; - if let Some(value) = value { - items.push(value); - } - } - } - } - Ok(Some(items)) - } - _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( - "expected start array or null", - )), - } -} diff --git a/sdk/iotroborunner/src/serde_util.rs b/sdk/iotroborunner/src/serde_util.rs deleted file mode 100644 index 0d1adaef3614..000000000000 --- a/sdk/iotroborunner/src/serde_util.rs +++ /dev/null @@ -1,367 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn create_destination_output_output_correct_errors( - mut builder: crate::operation::create_destination::builders::CreateDestinationOutputBuilder, -) -> crate::operation::create_destination::builders::CreateDestinationOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.state.is_none() { - builder.state = "no value was set".parse::().ok() - } - builder -} - -pub(crate) fn create_site_output_output_correct_errors( - mut builder: crate::operation::create_site::builders::CreateSiteOutputBuilder, -) -> crate::operation::create_site::builders::CreateSiteOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn create_worker_output_output_correct_errors( - mut builder: crate::operation::create_worker::builders::CreateWorkerOutputBuilder, -) -> crate::operation::create_worker::builders::CreateWorkerOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - builder -} - -pub(crate) fn create_worker_fleet_output_output_correct_errors( - mut builder: crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder, -) -> crate::operation::create_worker_fleet::builders::CreateWorkerFleetOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn get_destination_output_output_correct_errors( - mut builder: crate::operation::get_destination::builders::GetDestinationOutputBuilder, -) -> crate::operation::get_destination::builders::GetDestinationOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.state.is_none() { - builder.state = "no value was set".parse::().ok() - } - builder -} - -pub(crate) fn get_site_output_output_correct_errors( - mut builder: crate::operation::get_site::builders::GetSiteOutputBuilder, -) -> crate::operation::get_site::builders::GetSiteOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.country_code.is_none() { - builder.country_code = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn get_worker_output_output_correct_errors( - mut builder: crate::operation::get_worker::builders::GetWorkerOutputBuilder, -) -> crate::operation::get_worker::builders::GetWorkerOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.fleet.is_none() { - builder.fleet = Some(Default::default()) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - builder -} - -pub(crate) fn get_worker_fleet_output_output_correct_errors( - mut builder: crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder, -) -> crate::operation::get_worker_fleet::builders::GetWorkerFleetOutputBuilder { - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn update_destination_output_output_correct_errors( - mut builder: crate::operation::update_destination::builders::UpdateDestinationOutputBuilder, -) -> crate::operation::update_destination::builders::UpdateDestinationOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.state.is_none() { - builder.state = "no value was set".parse::().ok() - } - builder -} - -pub(crate) fn update_site_output_output_correct_errors( - mut builder: crate::operation::update_site::builders::UpdateSiteOutputBuilder, -) -> crate::operation::update_site::builders::UpdateSiteOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn update_worker_output_output_correct_errors( - mut builder: crate::operation::update_worker::builders::UpdateWorkerOutputBuilder, -) -> crate::operation::update_worker::builders::UpdateWorkerOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.fleet.is_none() { - builder.fleet = Some(Default::default()) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - builder -} - -pub(crate) fn update_worker_fleet_output_output_correct_errors( - mut builder: crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder, -) -> crate::operation::update_worker_fleet::builders::UpdateWorkerFleetOutputBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn vendor_properties_correct_errors( - mut builder: crate::types::builders::VendorPropertiesBuilder, -) -> crate::types::builders::VendorPropertiesBuilder { - if builder.vendor_worker_id.is_none() { - builder.vendor_worker_id = Some(Default::default()) - } - builder -} - -pub(crate) fn cartesian_coordinates_correct_errors( - mut builder: crate::types::builders::CartesianCoordinatesBuilder, -) -> crate::types::builders::CartesianCoordinatesBuilder { - if builder.x.is_none() { - builder.x = Some(Default::default()) - } - if builder.y.is_none() { - builder.y = Some(Default::default()) - } - builder -} - -pub(crate) fn destination_correct_errors(mut builder: crate::types::builders::DestinationBuilder) -> crate::types::builders::DestinationBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.state.is_none() { - builder.state = "no value was set".parse::().ok() - } - builder -} - -pub(crate) fn site_correct_errors(mut builder: crate::types::builders::SiteBuilder) -> crate::types::builders::SiteBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.country_code.is_none() { - builder.country_code = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} - -pub(crate) fn worker_correct_errors(mut builder: crate::types::builders::WorkerBuilder) -> crate::types::builders::WorkerBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.fleet.is_none() { - builder.fleet = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - builder -} - -pub(crate) fn worker_fleet_correct_errors(mut builder: crate::types::builders::WorkerFleetBuilder) -> crate::types::builders::WorkerFleetBuilder { - if builder.arn.is_none() { - builder.arn = Some(Default::default()) - } - if builder.id.is_none() { - builder.id = Some(Default::default()) - } - if builder.name.is_none() { - builder.name = Some(Default::default()) - } - if builder.site.is_none() { - builder.site = Some(Default::default()) - } - if builder.created_at.is_none() { - builder.created_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - if builder.updated_at.is_none() { - builder.updated_at = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)) - } - builder -} diff --git a/sdk/iotroborunner/src/serialization_settings.rs b/sdk/iotroborunner/src/serialization_settings.rs deleted file mode 100644 index b543b8ad0b70..000000000000 --- a/sdk/iotroborunner/src/serialization_settings.rs +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -#![allow(dead_code)] - -use aws_smithy_http::header::set_request_header_if_absent; -use aws_smithy_types::config_bag::{Storable, StoreReplace}; -use http::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE}; - -/// Configuration for how default protocol headers are serialized -#[derive(Clone, Debug, Default)] -pub(crate) struct HeaderSerializationSettings { - omit_default_content_length: bool, - omit_default_content_type: bool, -} - -impl HeaderSerializationSettings { - /// Creates new [`HeaderSerializationSettings`] - pub(crate) fn new() -> Self { - Default::default() - } - - /// Omit the default `Content-Length` header during serialization - pub(crate) fn omit_default_content_length(self) -> Self { - Self { - omit_default_content_length: true, - ..self - } - } - - /// Omit the default `Content-Type` header during serialization - pub(crate) fn omit_default_content_type(self) -> Self { - Self { - omit_default_content_type: true, - ..self - } - } - - /// Returns true if the given default header name should be serialized - fn include_header(&self, header: &HeaderName) -> bool { - (!self.omit_default_content_length || header != CONTENT_LENGTH) && (!self.omit_default_content_type || header != CONTENT_TYPE) - } - - /// Sets a default header on the given request builder if it should be serialized - pub(crate) fn set_default_header(&self, mut request: http::request::Builder, header_name: HeaderName, value: &str) -> http::request::Builder { - if self.include_header(&header_name) { - request = set_request_header_if_absent(request, header_name, value); - } - request - } -} - -impl Storable for HeaderSerializationSettings { - type Storer = StoreReplace; -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_include_header() { - let settings = HeaderSerializationSettings::default(); - assert!(settings.include_header(&CONTENT_LENGTH)); - assert!(settings.include_header(&CONTENT_TYPE)); - - let settings = HeaderSerializationSettings::default().omit_default_content_length(); - assert!(!settings.include_header(&CONTENT_LENGTH)); - assert!(settings.include_header(&CONTENT_TYPE)); - - let settings = HeaderSerializationSettings::default().omit_default_content_type(); - assert!(settings.include_header(&CONTENT_LENGTH)); - assert!(!settings.include_header(&CONTENT_TYPE)); - - let settings = HeaderSerializationSettings::default() - .omit_default_content_type() - .omit_default_content_length(); - assert!(!settings.include_header(&CONTENT_LENGTH)); - assert!(!settings.include_header(&CONTENT_TYPE)); - } -} diff --git a/sdk/iotroborunner/src/types.rs b/sdk/iotroborunner/src/types.rs deleted file mode 100644 index a2daaab8a187..000000000000 --- a/sdk/iotroborunner/src/types.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::types::_site::Site; - -pub use crate::types::_worker_fleet::WorkerFleet; - -pub use crate::types::_destination_state::DestinationState; - -pub use crate::types::_destination::Destination; - -pub use crate::types::_position_coordinates::PositionCoordinates; - -pub use crate::types::_cartesian_coordinates::CartesianCoordinates; - -pub use crate::types::_vendor_properties::VendorProperties; - -pub use crate::types::_orientation::Orientation; - -pub use crate::types::_worker::Worker; - -mod _cartesian_coordinates; - -mod _destination; - -mod _destination_state; - -mod _orientation; - -mod _position_coordinates; - -mod _site; - -mod _vendor_properties; - -mod _worker; - -mod _worker_fleet; - -/// Builders -pub mod builders; - -/// Error types that AWS IoT RoboRunner can respond with. -pub mod error; diff --git a/sdk/iotroborunner/src/types/_cartesian_coordinates.rs b/sdk/iotroborunner/src/types/_cartesian_coordinates.rs deleted file mode 100644 index 9d956e4e6228..000000000000 --- a/sdk/iotroborunner/src/types/_cartesian_coordinates.rs +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Cartesian coordinates in 3D space relative to the RoboRunner origin. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct CartesianCoordinates { - /// X coordinate. - pub x: f64, - /// Y coordinate. - pub y: f64, - /// Z coordinate. - pub z: ::std::option::Option, -} -impl CartesianCoordinates { - /// X coordinate. - pub fn x(&self) -> f64 { - self.x - } - /// Y coordinate. - pub fn y(&self) -> f64 { - self.y - } - /// Z coordinate. - pub fn z(&self) -> ::std::option::Option { - self.z - } -} -impl CartesianCoordinates { - /// Creates a new builder-style object to manufacture [`CartesianCoordinates`](crate::types::CartesianCoordinates). - pub fn builder() -> crate::types::builders::CartesianCoordinatesBuilder { - crate::types::builders::CartesianCoordinatesBuilder::default() - } -} - -/// A builder for [`CartesianCoordinates`](crate::types::CartesianCoordinates). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct CartesianCoordinatesBuilder { - pub(crate) x: ::std::option::Option, - pub(crate) y: ::std::option::Option, - pub(crate) z: ::std::option::Option, -} -impl CartesianCoordinatesBuilder { - /// X coordinate. - /// This field is required. - pub fn x(mut self, input: f64) -> Self { - self.x = ::std::option::Option::Some(input); - self - } - /// X coordinate. - pub fn set_x(mut self, input: ::std::option::Option) -> Self { - self.x = input; - self - } - /// X coordinate. - pub fn get_x(&self) -> &::std::option::Option { - &self.x - } - /// Y coordinate. - /// This field is required. - pub fn y(mut self, input: f64) -> Self { - self.y = ::std::option::Option::Some(input); - self - } - /// Y coordinate. - pub fn set_y(mut self, input: ::std::option::Option) -> Self { - self.y = input; - self - } - /// Y coordinate. - pub fn get_y(&self) -> &::std::option::Option { - &self.y - } - /// Z coordinate. - pub fn z(mut self, input: f64) -> Self { - self.z = ::std::option::Option::Some(input); - self - } - /// Z coordinate. - pub fn set_z(mut self, input: ::std::option::Option) -> Self { - self.z = input; - self - } - /// Z coordinate. - pub fn get_z(&self) -> &::std::option::Option { - &self.z - } - /// Consumes the builder and constructs a [`CartesianCoordinates`](crate::types::CartesianCoordinates). - /// This method will fail if any of the following fields are not set: - /// - [`x`](crate::types::builders::CartesianCoordinatesBuilder::x) - /// - [`y`](crate::types::builders::CartesianCoordinatesBuilder::y) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::CartesianCoordinates { - x: self.x.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "x", - "x was not specified but it is required when building CartesianCoordinates", - ) - })?, - y: self.y.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "y", - "y was not specified but it is required when building CartesianCoordinates", - ) - })?, - z: self.z, - }) - } -} diff --git a/sdk/iotroborunner/src/types/_destination.rs b/sdk/iotroborunner/src/types/_destination.rs deleted file mode 100644 index e9b0b83014a4..000000000000 --- a/sdk/iotroborunner/src/types/_destination.rs +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Area within a facility where work can be performed. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct Destination { - /// Destination ARN. - pub arn: ::std::string::String, - /// Filters access by the destination's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Site ARN. - pub site: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// State of the destination. - pub state: crate::types::DestinationState, - /// JSON document containing additional fixed properties regarding the destination - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl Destination { - /// Destination ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the destination's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// State of the destination. - pub fn state(&self) -> &crate::types::DestinationState { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl Destination { - /// Creates a new builder-style object to manufacture [`Destination`](crate::types::Destination). - pub fn builder() -> crate::types::builders::DestinationBuilder { - crate::types::builders::DestinationBuilder::default() - } -} - -/// A builder for [`Destination`](crate::types::Destination). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct DestinationBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) state: ::std::option::Option, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl DestinationBuilder { - /// Destination ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Destination ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Destination ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the destination's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the destination's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the destination's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// State of the destination. - /// This field is required. - pub fn state(mut self, input: crate::types::DestinationState) -> Self { - self.state = ::std::option::Option::Some(input); - self - } - /// State of the destination. - pub fn set_state(mut self, input: ::std::option::Option) -> Self { - self.state = input; - self - } - /// State of the destination. - pub fn get_state(&self) -> &::std::option::Option { - &self.state - } - /// JSON document containing additional fixed properties regarding the destination - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON document containing additional fixed properties regarding the destination - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Consumes the builder and constructs a [`Destination`](crate::types::Destination). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::types::builders::DestinationBuilder::arn) - /// - [`id`](crate::types::builders::DestinationBuilder::id) - /// - [`name`](crate::types::builders::DestinationBuilder::name) - /// - [`site`](crate::types::builders::DestinationBuilder::site) - /// - [`created_at`](crate::types::builders::DestinationBuilder::created_at) - /// - [`updated_at`](crate::types::builders::DestinationBuilder::updated_at) - /// - [`state`](crate::types::builders::DestinationBuilder::state) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::Destination { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building Destination", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building Destination", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building Destination", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building Destination", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building Destination", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building Destination", - ) - })?, - state: self.state.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "state", - "state was not specified but it is required when building Destination", - ) - })?, - additional_fixed_properties: self.additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/types/_destination_state.rs b/sdk/iotroborunner/src/types/_destination_state.rs deleted file mode 100644 index d118ba2b5d7d..000000000000 --- a/sdk/iotroborunner/src/types/_destination_state.rs +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// When writing a match expression against `DestinationState`, it is important to ensure -/// your code is forward-compatible. That is, if a match arm handles a case for a -/// feature that is supported by the service but has not been represented as an enum -/// variant in a current version of SDK, your code should continue to work when you -/// upgrade SDK to a future version in which the enum does include a variant for that -/// feature. -/// -/// Here is an example of how you can make a match expression forward-compatible: -/// -/// ```text -/// # let destinationstate = unimplemented!(); -/// match destinationstate { -/// DestinationState::Decommissioned => { /* ... */ }, -/// DestinationState::Disabled => { /* ... */ }, -/// DestinationState::Enabled => { /* ... */ }, -/// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, -/// _ => { /* ... */ }, -/// } -/// ``` -/// The above code demonstrates that when `destinationstate` represents -/// `NewFeature`, the execution path will lead to the second last match arm, -/// even though the enum does not contain a variant `DestinationState::NewFeature` -/// in the current version of SDK. The reason is that the variable `other`, -/// created by the `@` operator, is bound to -/// `DestinationState::Unknown(UnknownVariantValue("NewFeature".to_owned()))` -/// and calling `as_str` on it yields `"NewFeature"`. -/// This match expression is forward-compatible when executed with a newer -/// version of SDK where the variant `DestinationState::NewFeature` is defined. -/// Specifically, when `destinationstate` represents `NewFeature`, -/// the execution path will hit the second last match arm as before by virtue of -/// calling `as_str` on `DestinationState::NewFeature` also yielding `"NewFeature"`. -/// -/// Explicitly matching on the `Unknown` variant should -/// be avoided for two reasons: -/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted. -/// - It might inadvertently shadow other intended match arms. -/// State of the destination. -#[non_exhaustive] -#[derive( - ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, -)] -pub enum DestinationState { - #[allow(missing_docs)] // documentation missing in model - Decommissioned, - #[allow(missing_docs)] // documentation missing in model - Disabled, - #[allow(missing_docs)] // documentation missing in model - Enabled, - /// `Unknown` contains new variants that have been added since this code was generated. - #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")] - Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), -} -impl ::std::convert::From<&str> for DestinationState { - fn from(s: &str) -> Self { - match s { - "DECOMMISSIONED" => DestinationState::Decommissioned, - "DISABLED" => DestinationState::Disabled, - "ENABLED" => DestinationState::Enabled, - other => DestinationState::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), - } - } -} -impl ::std::str::FromStr for DestinationState { - type Err = ::std::convert::Infallible; - - fn from_str(s: &str) -> ::std::result::Result::Err> { - ::std::result::Result::Ok(DestinationState::from(s)) - } -} -impl DestinationState { - /// Returns the `&str` value of the enum member. - pub fn as_str(&self) -> &str { - match self { - DestinationState::Decommissioned => "DECOMMISSIONED", - DestinationState::Disabled => "DISABLED", - DestinationState::Enabled => "ENABLED", - DestinationState::Unknown(value) => value.as_str(), - } - } - /// Returns all the `&str` representations of the enum members. - pub const fn values() -> &'static [&'static str] { - &["DECOMMISSIONED", "DISABLED", "ENABLED"] - } -} -impl ::std::convert::AsRef for DestinationState { - fn as_ref(&self) -> &str { - self.as_str() - } -} -impl DestinationState { - /// Parses the enum value while disallowing unknown variants. - /// - /// Unknown variants will result in an error. - pub fn try_parse(value: &str) -> ::std::result::Result { - match Self::from(value) { - #[allow(deprecated)] - Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)), - known => Ok(known), - } - } -} -impl ::std::fmt::Display for DestinationState { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - match self { - DestinationState::Decommissioned => write!(f, "DECOMMISSIONED"), - DestinationState::Disabled => write!(f, "DISABLED"), - DestinationState::Enabled => write!(f, "ENABLED"), - DestinationState::Unknown(value) => write!(f, "{}", value), - } - } -} diff --git a/sdk/iotroborunner/src/types/_orientation.rs b/sdk/iotroborunner/src/types/_orientation.rs deleted file mode 100644 index 5dff9c4de475..000000000000 --- a/sdk/iotroborunner/src/types/_orientation.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Worker orientation measured in units clockwise from north. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub enum Orientation { - /// Degrees, limited on [0, 360) - Degrees(f64), - /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. - /// An unknown enum variant - /// - /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ - /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized - /// by the client. This can happen when the server adds new functionality, but the client has not been updated. - /// To investigate this, consider turning on debug logging to print the raw HTTP response. - #[non_exhaustive] - Unknown, -} -impl Orientation { - #[allow(irrefutable_let_patterns)] - /// Tries to convert the enum instance into [`Degrees`](crate::types::Orientation::Degrees), extracting the inner [`f64`](f64). - /// Returns `Err(&Self)` if it can't be converted. - pub fn as_degrees(&self) -> ::std::result::Result<&f64, &Self> { - if let Orientation::Degrees(val) = &self { - ::std::result::Result::Ok(val) - } else { - ::std::result::Result::Err(self) - } - } - /// Returns true if this is a [`Degrees`](crate::types::Orientation::Degrees). - pub fn is_degrees(&self) -> bool { - self.as_degrees().is_ok() - } - /// Returns true if the enum instance is the `Unknown` variant. - pub fn is_unknown(&self) -> bool { - matches!(self, Self::Unknown) - } -} diff --git a/sdk/iotroborunner/src/types/_position_coordinates.rs b/sdk/iotroborunner/src/types/_position_coordinates.rs deleted file mode 100644 index 57e564ae6b6b..000000000000 --- a/sdk/iotroborunner/src/types/_position_coordinates.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Supported coordinates for worker position. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub enum PositionCoordinates { - /// Cartesian coordinates. - CartesianCoordinates(crate::types::CartesianCoordinates), - /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version. - /// An unknown enum variant - /// - /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._ - /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized - /// by the client. This can happen when the server adds new functionality, but the client has not been updated. - /// To investigate this, consider turning on debug logging to print the raw HTTP response. - #[non_exhaustive] - Unknown, -} -impl PositionCoordinates { - #[allow(irrefutable_let_patterns)] - /// Tries to convert the enum instance into [`CartesianCoordinates`](crate::types::PositionCoordinates::CartesianCoordinates), extracting the inner [`CartesianCoordinates`](crate::types::CartesianCoordinates). - /// Returns `Err(&Self)` if it can't be converted. - pub fn as_cartesian_coordinates(&self) -> ::std::result::Result<&crate::types::CartesianCoordinates, &Self> { - if let PositionCoordinates::CartesianCoordinates(val) = &self { - ::std::result::Result::Ok(val) - } else { - ::std::result::Result::Err(self) - } - } - /// Returns true if this is a [`CartesianCoordinates`](crate::types::PositionCoordinates::CartesianCoordinates). - pub fn is_cartesian_coordinates(&self) -> bool { - self.as_cartesian_coordinates().is_ok() - } - /// Returns true if the enum instance is the `Unknown` variant. - pub fn is_unknown(&self) -> bool { - matches!(self, Self::Unknown) - } -} diff --git a/sdk/iotroborunner/src/types/_site.rs b/sdk/iotroborunner/src/types/_site.rs deleted file mode 100644 index 6a8d95edc6d6..000000000000 --- a/sdk/iotroborunner/src/types/_site.rs +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Facility containing destinations, workers, activities, and tasks. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct Site { - /// Site ARN. - pub arn: ::std::string::String, - /// The name of the site. Mutable after creation and unique within a given account. - pub name: ::std::string::String, - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub country_code: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, -} -impl Site { - /// Site ARN. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// The name of the site. Mutable after creation and unique within a given account. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn country_code(&self) -> &str { - use std::ops::Deref; - self.country_code.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } -} -impl Site { - /// Creates a new builder-style object to manufacture [`Site`](crate::types::Site). - pub fn builder() -> crate::types::builders::SiteBuilder { - crate::types::builders::SiteBuilder::default() - } -} - -/// A builder for [`Site`](crate::types::Site). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct SiteBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) country_code: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, -} -impl SiteBuilder { - /// Site ARN. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Site ARN. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// The name of the site. Mutable after creation and unique within a given account. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// The name of the site. Mutable after creation and unique within a given account. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// The name of the site. Mutable after creation and unique within a given account. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - /// This field is required. - pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.country_code = ::std::option::Option::Some(input.into()); - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.country_code = input; - self - } - /// A valid ISO 3166-1 alpha-2 code for the country in which the site resides. e.g., US. - pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> { - &self.country_code - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Consumes the builder and constructs a [`Site`](crate::types::Site). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::types::builders::SiteBuilder::arn) - /// - [`name`](crate::types::builders::SiteBuilder::name) - /// - [`country_code`](crate::types::builders::SiteBuilder::country_code) - /// - [`created_at`](crate::types::builders::SiteBuilder::created_at) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::Site { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field("arn", "arn was not specified but it is required when building Site") - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building Site", - ) - })?, - country_code: self.country_code.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "country_code", - "country_code was not specified but it is required when building Site", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building Site", - ) - })?, - }) - } -} diff --git a/sdk/iotroborunner/src/types/_vendor_properties.rs b/sdk/iotroborunner/src/types/_vendor_properties.rs deleted file mode 100644 index 2d7937409198..000000000000 --- a/sdk/iotroborunner/src/types/_vendor_properties.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Properties of the worker that are provided by the vendor FMS. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct VendorProperties { - /// The worker ID defined by the vendor FMS. - pub vendor_worker_id: ::std::string::String, - /// The worker IP address defined by the vendor FMS. - pub vendor_worker_ip_address: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured vendor properties that are transient and may change during regular operation. - pub vendor_additional_transient_properties: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured vendor properties that are fixed and won't change during regular operation. - pub vendor_additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl VendorProperties { - /// The worker ID defined by the vendor FMS. - pub fn vendor_worker_id(&self) -> &str { - use std::ops::Deref; - self.vendor_worker_id.deref() - } - /// The worker IP address defined by the vendor FMS. - pub fn vendor_worker_ip_address(&self) -> ::std::option::Option<&str> { - self.vendor_worker_ip_address.as_deref() - } - /// JSON blob containing unstructured vendor properties that are transient and may change during regular operation. - pub fn vendor_additional_transient_properties(&self) -> ::std::option::Option<&str> { - self.vendor_additional_transient_properties.as_deref() - } - /// JSON blob containing unstructured vendor properties that are fixed and won't change during regular operation. - pub fn vendor_additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.vendor_additional_fixed_properties.as_deref() - } -} -impl VendorProperties { - /// Creates a new builder-style object to manufacture [`VendorProperties`](crate::types::VendorProperties). - pub fn builder() -> crate::types::builders::VendorPropertiesBuilder { - crate::types::builders::VendorPropertiesBuilder::default() - } -} - -/// A builder for [`VendorProperties`](crate::types::VendorProperties). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct VendorPropertiesBuilder { - pub(crate) vendor_worker_id: ::std::option::Option<::std::string::String>, - pub(crate) vendor_worker_ip_address: ::std::option::Option<::std::string::String>, - pub(crate) vendor_additional_transient_properties: ::std::option::Option<::std::string::String>, - pub(crate) vendor_additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl VendorPropertiesBuilder { - /// The worker ID defined by the vendor FMS. - /// This field is required. - pub fn vendor_worker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.vendor_worker_id = ::std::option::Option::Some(input.into()); - self - } - /// The worker ID defined by the vendor FMS. - pub fn set_vendor_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.vendor_worker_id = input; - self - } - /// The worker ID defined by the vendor FMS. - pub fn get_vendor_worker_id(&self) -> &::std::option::Option<::std::string::String> { - &self.vendor_worker_id - } - /// The worker IP address defined by the vendor FMS. - pub fn vendor_worker_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.vendor_worker_ip_address = ::std::option::Option::Some(input.into()); - self - } - /// The worker IP address defined by the vendor FMS. - pub fn set_vendor_worker_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.vendor_worker_ip_address = input; - self - } - /// The worker IP address defined by the vendor FMS. - pub fn get_vendor_worker_ip_address(&self) -> &::std::option::Option<::std::string::String> { - &self.vendor_worker_ip_address - } - /// JSON blob containing unstructured vendor properties that are transient and may change during regular operation. - pub fn vendor_additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.vendor_additional_transient_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured vendor properties that are transient and may change during regular operation. - pub fn set_vendor_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.vendor_additional_transient_properties = input; - self - } - /// JSON blob containing unstructured vendor properties that are transient and may change during regular operation. - pub fn get_vendor_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.vendor_additional_transient_properties - } - /// JSON blob containing unstructured vendor properties that are fixed and won't change during regular operation. - pub fn vendor_additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.vendor_additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured vendor properties that are fixed and won't change during regular operation. - pub fn set_vendor_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.vendor_additional_fixed_properties = input; - self - } - /// JSON blob containing unstructured vendor properties that are fixed and won't change during regular operation. - pub fn get_vendor_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.vendor_additional_fixed_properties - } - /// Consumes the builder and constructs a [`VendorProperties`](crate::types::VendorProperties). - /// This method will fail if any of the following fields are not set: - /// - [`vendor_worker_id`](crate::types::builders::VendorPropertiesBuilder::vendor_worker_id) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::VendorProperties { - vendor_worker_id: self.vendor_worker_id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "vendor_worker_id", - "vendor_worker_id was not specified but it is required when building VendorProperties", - ) - })?, - vendor_worker_ip_address: self.vendor_worker_ip_address, - vendor_additional_transient_properties: self.vendor_additional_transient_properties, - vendor_additional_fixed_properties: self.vendor_additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/types/_worker.rs b/sdk/iotroborunner/src/types/_worker.rs deleted file mode 100644 index a6c3c9b09f09..000000000000 --- a/sdk/iotroborunner/src/types/_worker.rs +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// A unit capable of performing tasks. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct Worker { - /// Full ARN of the worker. - pub arn: ::std::string::String, - /// Filters access by the workers identifier - pub id: ::std::string::String, - /// Full ARN of the worker fleet. - pub fleet: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Site ARN. - pub site: ::std::string::String, - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub additional_transient_properties: ::std::option::Option<::std::string::String>, - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, - /// Properties of the worker that are provided by the vendor FMS. - pub vendor_properties: ::std::option::Option, - /// Supported coordinates for worker position. - pub position: ::std::option::Option, - /// Worker orientation measured in units clockwise from north. - pub orientation: ::std::option::Option, -} -impl Worker { - /// Full ARN of the worker. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the workers identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Full ARN of the worker fleet. - pub fn fleet(&self) -> &str { - use std::ops::Deref; - self.fleet.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(&self) -> ::std::option::Option<&str> { - self.additional_transient_properties.as_deref() - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(&self) -> ::std::option::Option<&crate::types::VendorProperties> { - self.vendor_properties.as_ref() - } - /// Supported coordinates for worker position. - pub fn position(&self) -> ::std::option::Option<&crate::types::PositionCoordinates> { - self.position.as_ref() - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(&self) -> ::std::option::Option<&crate::types::Orientation> { - self.orientation.as_ref() - } -} -impl Worker { - /// Creates a new builder-style object to manufacture [`Worker`](crate::types::Worker). - pub fn builder() -> crate::types::builders::WorkerBuilder { - crate::types::builders::WorkerBuilder::default() - } -} - -/// A builder for [`Worker`](crate::types::Worker). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct WorkerBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) fleet: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) additional_transient_properties: ::std::option::Option<::std::string::String>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, - pub(crate) vendor_properties: ::std::option::Option, - pub(crate) position: ::std::option::Option, - pub(crate) orientation: ::std::option::Option, -} -impl WorkerBuilder { - /// Full ARN of the worker. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the workers identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the workers identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the workers identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Full ARN of the worker fleet. - /// This field is required. - pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.fleet = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.fleet = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> { - &self.fleet - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn additional_transient_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_transient_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn set_additional_transient_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_transient_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are transient and may change during regular operation. - pub fn get_additional_transient_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_transient_properties - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing unstructured worker properties that are fixed and won't change during regular operation. - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn vendor_properties(mut self, input: crate::types::VendorProperties) -> Self { - self.vendor_properties = ::std::option::Option::Some(input); - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn set_vendor_properties(mut self, input: ::std::option::Option) -> Self { - self.vendor_properties = input; - self - } - /// Properties of the worker that are provided by the vendor FMS. - pub fn get_vendor_properties(&self) -> &::std::option::Option { - &self.vendor_properties - } - /// Supported coordinates for worker position. - pub fn position(mut self, input: crate::types::PositionCoordinates) -> Self { - self.position = ::std::option::Option::Some(input); - self - } - /// Supported coordinates for worker position. - pub fn set_position(mut self, input: ::std::option::Option) -> Self { - self.position = input; - self - } - /// Supported coordinates for worker position. - pub fn get_position(&self) -> &::std::option::Option { - &self.position - } - /// Worker orientation measured in units clockwise from north. - pub fn orientation(mut self, input: crate::types::Orientation) -> Self { - self.orientation = ::std::option::Option::Some(input); - self - } - /// Worker orientation measured in units clockwise from north. - pub fn set_orientation(mut self, input: ::std::option::Option) -> Self { - self.orientation = input; - self - } - /// Worker orientation measured in units clockwise from north. - pub fn get_orientation(&self) -> &::std::option::Option { - &self.orientation - } - /// Consumes the builder and constructs a [`Worker`](crate::types::Worker). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::types::builders::WorkerBuilder::arn) - /// - [`id`](crate::types::builders::WorkerBuilder::id) - /// - [`fleet`](crate::types::builders::WorkerBuilder::fleet) - /// - [`created_at`](crate::types::builders::WorkerBuilder::created_at) - /// - [`updated_at`](crate::types::builders::WorkerBuilder::updated_at) - /// - [`name`](crate::types::builders::WorkerBuilder::name) - /// - [`site`](crate::types::builders::WorkerBuilder::site) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::Worker { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building Worker", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field("id", "id was not specified but it is required when building Worker") - })?, - fleet: self.fleet.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "fleet", - "fleet was not specified but it is required when building Worker", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building Worker", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building Worker", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building Worker", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building Worker", - ) - })?, - additional_transient_properties: self.additional_transient_properties, - additional_fixed_properties: self.additional_fixed_properties, - vendor_properties: self.vendor_properties, - position: self.position, - orientation: self.orientation, - }) - } -} diff --git a/sdk/iotroborunner/src/types/_worker_fleet.rs b/sdk/iotroborunner/src/types/_worker_fleet.rs deleted file mode 100644 index 122d6317fa4c..000000000000 --- a/sdk/iotroborunner/src/types/_worker_fleet.rs +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// A collection of workers organized within a facility. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct WorkerFleet { - /// Full ARN of the worker fleet. - pub arn: ::std::string::String, - /// Filters access by the worker fleet's identifier - pub id: ::std::string::String, - /// Human friendly name of the resource. - pub name: ::std::string::String, - /// Site ARN. - pub site: ::std::string::String, - /// Timestamp at which the resource was created. - pub created_at: ::aws_smithy_types::DateTime, - /// Timestamp at which the resource was last updated. - pub updated_at: ::aws_smithy_types::DateTime, - /// JSON blob containing additional fixed properties regarding the worker fleet - pub additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl WorkerFleet { - /// Full ARN of the worker fleet. - pub fn arn(&self) -> &str { - use std::ops::Deref; - self.arn.deref() - } - /// Filters access by the worker fleet's identifier - pub fn id(&self) -> &str { - use std::ops::Deref; - self.id.deref() - } - /// Human friendly name of the resource. - pub fn name(&self) -> &str { - use std::ops::Deref; - self.name.deref() - } - /// Site ARN. - pub fn site(&self) -> &str { - use std::ops::Deref; - self.site.deref() - } - /// Timestamp at which the resource was created. - pub fn created_at(&self) -> &::aws_smithy_types::DateTime { - &self.created_at - } - /// Timestamp at which the resource was last updated. - pub fn updated_at(&self) -> &::aws_smithy_types::DateTime { - &self.updated_at - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> { - self.additional_fixed_properties.as_deref() - } -} -impl WorkerFleet { - /// Creates a new builder-style object to manufacture [`WorkerFleet`](crate::types::WorkerFleet). - pub fn builder() -> crate::types::builders::WorkerFleetBuilder { - crate::types::builders::WorkerFleetBuilder::default() - } -} - -/// A builder for [`WorkerFleet`](crate::types::WorkerFleet). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct WorkerFleetBuilder { - pub(crate) arn: ::std::option::Option<::std::string::String>, - pub(crate) id: ::std::option::Option<::std::string::String>, - pub(crate) name: ::std::option::Option<::std::string::String>, - pub(crate) site: ::std::option::Option<::std::string::String>, - pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>, - pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>, -} -impl WorkerFleetBuilder { - /// Full ARN of the worker fleet. - /// This field is required. - pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.arn = ::std::option::Option::Some(input.into()); - self - } - /// Full ARN of the worker fleet. - pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.arn = input; - self - } - /// Full ARN of the worker fleet. - pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> { - &self.arn - } - /// Filters access by the worker fleet's identifier - /// This field is required. - pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.id = ::std::option::Option::Some(input.into()); - self - } - /// Filters access by the worker fleet's identifier - pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.id = input; - self - } - /// Filters access by the worker fleet's identifier - pub fn get_id(&self) -> &::std::option::Option<::std::string::String> { - &self.id - } - /// Human friendly name of the resource. - /// This field is required. - pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.name = ::std::option::Option::Some(input.into()); - self - } - /// Human friendly name of the resource. - pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.name = input; - self - } - /// Human friendly name of the resource. - pub fn get_name(&self) -> &::std::option::Option<::std::string::String> { - &self.name - } - /// Site ARN. - /// This field is required. - pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.site = ::std::option::Option::Some(input.into()); - self - } - /// Site ARN. - pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.site = input; - self - } - /// Site ARN. - pub fn get_site(&self) -> &::std::option::Option<::std::string::String> { - &self.site - } - /// Timestamp at which the resource was created. - /// This field is required. - pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.created_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was created. - pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.created_at = input; - self - } - /// Timestamp at which the resource was created. - pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.created_at - } - /// Timestamp at which the resource was last updated. - /// This field is required. - pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self { - self.updated_at = ::std::option::Option::Some(input); - self - } - /// Timestamp at which the resource was last updated. - pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { - self.updated_at = input; - self - } - /// Timestamp at which the resource was last updated. - pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { - &self.updated_at - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.additional_fixed_properties = ::std::option::Option::Some(input.into()); - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.additional_fixed_properties = input; - self - } - /// JSON blob containing additional fixed properties regarding the worker fleet - pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> { - &self.additional_fixed_properties - } - /// Consumes the builder and constructs a [`WorkerFleet`](crate::types::WorkerFleet). - /// This method will fail if any of the following fields are not set: - /// - [`arn`](crate::types::builders::WorkerFleetBuilder::arn) - /// - [`id`](crate::types::builders::WorkerFleetBuilder::id) - /// - [`name`](crate::types::builders::WorkerFleetBuilder::name) - /// - [`site`](crate::types::builders::WorkerFleetBuilder::site) - /// - [`created_at`](crate::types::builders::WorkerFleetBuilder::created_at) - /// - [`updated_at`](crate::types::builders::WorkerFleetBuilder::updated_at) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::WorkerFleet { - arn: self.arn.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "arn", - "arn was not specified but it is required when building WorkerFleet", - ) - })?, - id: self.id.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "id", - "id was not specified but it is required when building WorkerFleet", - ) - })?, - name: self.name.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "name", - "name was not specified but it is required when building WorkerFleet", - ) - })?, - site: self.site.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "site", - "site was not specified but it is required when building WorkerFleet", - ) - })?, - created_at: self.created_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "created_at", - "created_at was not specified but it is required when building WorkerFleet", - ) - })?, - updated_at: self.updated_at.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "updated_at", - "updated_at was not specified but it is required when building WorkerFleet", - ) - })?, - additional_fixed_properties: self.additional_fixed_properties, - }) - } -} diff --git a/sdk/iotroborunner/src/types/builders.rs b/sdk/iotroborunner/src/types/builders.rs deleted file mode 100644 index b4718c628527..000000000000 --- a/sdk/iotroborunner/src/types/builders.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::types::_site::SiteBuilder; - -pub use crate::types::_worker_fleet::WorkerFleetBuilder; - -pub use crate::types::_destination::DestinationBuilder; - -pub use crate::types::_cartesian_coordinates::CartesianCoordinatesBuilder; - -pub use crate::types::_vendor_properties::VendorPropertiesBuilder; - -pub use crate::types::_worker::WorkerBuilder; diff --git a/sdk/iotroborunner/src/types/error.rs b/sdk/iotroborunner/src/types/error.rs deleted file mode 100644 index 6554948668e3..000000000000 --- a/sdk/iotroborunner/src/types/error.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::types::error::_validation_exception::ValidationException; - -pub use crate::types::error::_throttling_exception::ThrottlingException; - -pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundException; - -pub use crate::types::error::_internal_server_exception::InternalServerException; - -pub use crate::types::error::_conflict_exception::ConflictException; - -pub use crate::types::error::_access_denied_exception::AccessDeniedException; - -pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededException; - -mod _access_denied_exception; - -mod _conflict_exception; - -mod _internal_server_exception; - -mod _resource_not_found_exception; - -mod _service_quota_exceeded_exception; - -mod _throttling_exception; - -mod _validation_exception; - -/// Builders -pub mod builders; diff --git a/sdk/iotroborunner/src/types/error/_access_denied_exception.rs b/sdk/iotroborunner/src/types/error/_access_denied_exception.rs deleted file mode 100644 index 17750b21d741..000000000000 --- a/sdk/iotroborunner/src/types/error/_access_denied_exception.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// User does not have sufficient access to perform this action. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct AccessDeniedException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl AccessDeniedException { - /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`. - pub fn retryable_error_kind(&self) -> ::aws_smithy_types::retry::ErrorKind { - ::aws_smithy_types::retry::ErrorKind::ClientError - } - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for AccessDeniedException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "AccessDeniedException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for AccessDeniedException {} -impl ::aws_types::request_id::RequestId for crate::types::error::AccessDeniedException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AccessDeniedException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl AccessDeniedException { - /// Creates a new builder-style object to manufacture [`AccessDeniedException`](crate::types::error::AccessDeniedException). - pub fn builder() -> crate::types::error::builders::AccessDeniedExceptionBuilder { - crate::types::error::builders::AccessDeniedExceptionBuilder::default() - } -} - -/// A builder for [`AccessDeniedException`](crate::types::error::AccessDeniedException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct AccessDeniedExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl AccessDeniedExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`AccessDeniedException`](crate::types::error::AccessDeniedException). - pub fn build(self) -> crate::types::error::AccessDeniedException { - crate::types::error::AccessDeniedException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/_conflict_exception.rs b/sdk/iotroborunner/src/types/error/_conflict_exception.rs deleted file mode 100644 index 152e7911a899..000000000000 --- a/sdk/iotroborunner/src/types/error/_conflict_exception.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Exception thrown if a resource in a create request already exists. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ConflictException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl ConflictException { - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for ConflictException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "ConflictException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for ConflictException {} -impl ::aws_types::request_id::RequestId for crate::types::error::ConflictException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConflictException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl ConflictException { - /// Creates a new builder-style object to manufacture [`ConflictException`](crate::types::error::ConflictException). - pub fn builder() -> crate::types::error::builders::ConflictExceptionBuilder { - crate::types::error::builders::ConflictExceptionBuilder::default() - } -} - -/// A builder for [`ConflictException`](crate::types::error::ConflictException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ConflictExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl ConflictExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`ConflictException`](crate::types::error::ConflictException). - pub fn build(self) -> crate::types::error::ConflictException { - crate::types::error::ConflictException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/_internal_server_exception.rs b/sdk/iotroborunner/src/types/error/_internal_server_exception.rs deleted file mode 100644 index 496408dc0b1a..000000000000 --- a/sdk/iotroborunner/src/types/error/_internal_server_exception.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Exception thrown if something goes wrong within the service. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct InternalServerException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl InternalServerException { - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for InternalServerException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "InternalServerException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for InternalServerException {} -impl ::aws_types::request_id::RequestId for crate::types::error::InternalServerException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InternalServerException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl InternalServerException { - /// Creates a new builder-style object to manufacture [`InternalServerException`](crate::types::error::InternalServerException). - pub fn builder() -> crate::types::error::builders::InternalServerExceptionBuilder { - crate::types::error::builders::InternalServerExceptionBuilder::default() - } -} - -/// A builder for [`InternalServerException`](crate::types::error::InternalServerException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct InternalServerExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl InternalServerExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`InternalServerException`](crate::types::error::InternalServerException). - pub fn build(self) -> crate::types::error::InternalServerException { - crate::types::error::InternalServerException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/_resource_not_found_exception.rs b/sdk/iotroborunner/src/types/error/_resource_not_found_exception.rs deleted file mode 100644 index 1452cbcdfb30..000000000000 --- a/sdk/iotroborunner/src/types/error/_resource_not_found_exception.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Exception thrown if a resource referenced in the request doesn't exist. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ResourceNotFoundException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl ResourceNotFoundException { - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for ResourceNotFoundException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "ResourceNotFoundException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for ResourceNotFoundException {} -impl ::aws_types::request_id::RequestId for crate::types::error::ResourceNotFoundException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResourceNotFoundException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl ResourceNotFoundException { - /// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::types::error::ResourceNotFoundException). - pub fn builder() -> crate::types::error::builders::ResourceNotFoundExceptionBuilder { - crate::types::error::builders::ResourceNotFoundExceptionBuilder::default() - } -} - -/// A builder for [`ResourceNotFoundException`](crate::types::error::ResourceNotFoundException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ResourceNotFoundExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl ResourceNotFoundExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::types::error::ResourceNotFoundException). - pub fn build(self) -> crate::types::error::ResourceNotFoundException { - crate::types::error::ResourceNotFoundException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/_service_quota_exceeded_exception.rs b/sdk/iotroborunner/src/types/error/_service_quota_exceeded_exception.rs deleted file mode 100644 index 75db2b940775..000000000000 --- a/sdk/iotroborunner/src/types/error/_service_quota_exceeded_exception.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Exception thrown if the user's AWS account has reached a service limit and the operation cannot proceed. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ServiceQuotaExceededException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl ServiceQuotaExceededException { - /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`. - pub fn retryable_error_kind(&self) -> ::aws_smithy_types::retry::ErrorKind { - ::aws_smithy_types::retry::ErrorKind::ClientError - } - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for ServiceQuotaExceededException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "ServiceQuotaExceededException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for ServiceQuotaExceededException {} -impl ::aws_types::request_id::RequestId for crate::types::error::ServiceQuotaExceededException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ServiceQuotaExceededException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl ServiceQuotaExceededException { - /// Creates a new builder-style object to manufacture [`ServiceQuotaExceededException`](crate::types::error::ServiceQuotaExceededException). - pub fn builder() -> crate::types::error::builders::ServiceQuotaExceededExceptionBuilder { - crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default() - } -} - -/// A builder for [`ServiceQuotaExceededException`](crate::types::error::ServiceQuotaExceededException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ServiceQuotaExceededExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl ServiceQuotaExceededExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`ServiceQuotaExceededException`](crate::types::error::ServiceQuotaExceededException). - pub fn build(self) -> crate::types::error::ServiceQuotaExceededException { - crate::types::error::ServiceQuotaExceededException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/_throttling_exception.rs b/sdk/iotroborunner/src/types/error/_throttling_exception.rs deleted file mode 100644 index 5ca85e5b7db0..000000000000 --- a/sdk/iotroborunner/src/types/error/_throttling_exception.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Exception thrown if the api has been called too quickly be the client. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ThrottlingException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl ThrottlingException { - /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`. - pub fn retryable_error_kind(&self) -> ::aws_smithy_types::retry::ErrorKind { - ::aws_smithy_types::retry::ErrorKind::ThrottlingError - } - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for ThrottlingException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "ThrottlingException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for ThrottlingException {} -impl ::aws_types::request_id::RequestId for crate::types::error::ThrottlingException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ThrottlingException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl ThrottlingException { - /// Creates a new builder-style object to manufacture [`ThrottlingException`](crate::types::error::ThrottlingException). - pub fn builder() -> crate::types::error::builders::ThrottlingExceptionBuilder { - crate::types::error::builders::ThrottlingExceptionBuilder::default() - } -} - -/// A builder for [`ThrottlingException`](crate::types::error::ThrottlingException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ThrottlingExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl ThrottlingExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`ThrottlingException`](crate::types::error::ThrottlingException). - pub fn build(self) -> crate::types::error::ThrottlingException { - crate::types::error::ThrottlingException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/_validation_exception.rs b/sdk/iotroborunner/src/types/error/_validation_exception.rs deleted file mode 100644 index 8f7b4e07202f..000000000000 --- a/sdk/iotroborunner/src/types/error/_validation_exception.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. - -/// Exception thrown if an invalid parameter is provided to an API. -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -pub struct ValidationException { - #[allow(missing_docs)] // documentation missing in model - pub message: ::std::option::Option<::std::string::String>, - pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata, -} -impl ValidationException { - /// Returns the error message. - pub fn message(&self) -> ::std::option::Option<&str> { - self.message.as_deref() - } -} -impl ::std::fmt::Display for ValidationException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - ::std::write!(f, "ValidationException")?; - if let ::std::option::Option::Some(inner_1) = &self.message { - { - ::std::write!(f, ": {}", inner_1)?; - } - } - Ok(()) - } -} -impl ::std::error::Error for ValidationException {} -impl ::aws_types::request_id::RequestId for crate::types::error::ValidationException { - fn request_id(&self) -> Option<&str> { - use ::aws_smithy_types::error::metadata::ProvideErrorMetadata; - self.meta().request_id() - } -} -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ValidationException { - fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { - &self.meta - } -} -impl ValidationException { - /// Creates a new builder-style object to manufacture [`ValidationException`](crate::types::error::ValidationException). - pub fn builder() -> crate::types::error::builders::ValidationExceptionBuilder { - crate::types::error::builders::ValidationExceptionBuilder::default() - } -} - -/// A builder for [`ValidationException`](crate::types::error::ValidationException). -#[non_exhaustive] -#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] -pub struct ValidationExceptionBuilder { - pub(crate) message: ::std::option::Option<::std::string::String>, - meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -} -impl ValidationExceptionBuilder { - #[allow(missing_docs)] // documentation missing in model - pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { - self.message = ::std::option::Option::Some(input.into()); - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self { - self.message = input; - self - } - #[allow(missing_docs)] // documentation missing in model - pub fn get_message(&self) -> &::std::option::Option<::std::string::String> { - &self.message - } - /// Sets error metadata - pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self { - self.meta = Some(meta); - self - } - - /// Sets error metadata - pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self { - self.meta = meta; - self - } - /// Consumes the builder and constructs a [`ValidationException`](crate::types::error::ValidationException). - pub fn build(self) -> crate::types::error::ValidationException { - crate::types::error::ValidationException { - message: self.message, - meta: self.meta.unwrap_or_default(), - } - } -} diff --git a/sdk/iotroborunner/src/types/error/builders.rs b/sdk/iotroborunner/src/types/error/builders.rs deleted file mode 100644 index 23f8bf1c3339..000000000000 --- a/sdk/iotroborunner/src/types/error/builders.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub use crate::types::error::_validation_exception::ValidationExceptionBuilder; - -pub use crate::types::error::_throttling_exception::ThrottlingExceptionBuilder; - -pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundExceptionBuilder; - -pub use crate::types::error::_internal_server_exception::InternalServerExceptionBuilder; - -pub use crate::types::error::_conflict_exception::ConflictExceptionBuilder; - -pub use crate::types::error::_access_denied_exception::AccessDeniedExceptionBuilder; - -pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededExceptionBuilder; diff --git a/sdk/iotroborunner/tests/endpoint_tests.rs b/sdk/iotroborunner/tests/endpoint_tests.rs deleted file mode 100644 index e0cddc84a781..000000000000 --- a/sdk/iotroborunner/tests/endpoint_tests.rs +++ /dev/null @@ -1,2 +0,0 @@ -// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -#![cfg(feature = "test-util")] diff --git a/sdk/kms/Cargo.toml b/sdk/kms/Cargo.toml index 7b25c5bd33b0..400497514bc9 100644 --- a/sdk/kms/Cargo.toml +++ b/sdk/kms/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-kms" -version = "1.17.0" +version = "1.18.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS Key Management Service" edition = "2021" diff --git a/sdk/kms/README.md b/sdk/kms/README.md index 324ee026d640..817899f346f1 100644 --- a/sdk/kms/README.md +++ b/sdk/kms/README.md @@ -45,7 +45,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-kms = "1.17.0" +aws-sdk-kms = "1.18.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/kms/src/client/get_key_policy.rs b/sdk/kms/src/client/get_key_policy.rs index 262bb76b19ed..2026878ff9aa 100644 --- a/sdk/kms/src/client/get_key_policy.rs +++ b/sdk/kms/src/client/get_key_policy.rs @@ -4,9 +4,10 @@ impl super::Client { /// /// - The fluent builder is configurable: /// - [`key_id(impl Into)`](crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::key_id) / [`set_key_id(Option)`](crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::set_key_id):
                  required: **true**

                  Gets the key policy for the specified KMS key.

                  Specify the key ID or key ARN of the KMS key.

                  For example:

                  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

                  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

                  To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.


                  - /// - [`policy_name(impl Into)`](crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::policy_name) / [`set_policy_name(Option)`](crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::set_policy_name):
                  required: **true**

                  Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.


                  + /// - [`policy_name(impl Into)`](crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::policy_name) / [`set_policy_name(Option)`](crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::set_policy_name):
                  required: **false**

                  Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.


                  /// - On success, responds with [`GetKeyPolicyOutput`](crate::operation::get_key_policy::GetKeyPolicyOutput) with field(s): /// - [`policy(Option)`](crate::operation::get_key_policy::GetKeyPolicyOutput::policy):

                  A key policy document in JSON format.

                  + /// - [`policy_name(Option)`](crate::operation::get_key_policy::GetKeyPolicyOutput::policy_name):

                  The name of the key policy. The only valid value is default.

                  /// - On failure, responds with [`SdkError`](crate::operation::get_key_policy::GetKeyPolicyError) pub fn get_key_policy(&self) -> crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder { crate::operation::get_key_policy::builders::GetKeyPolicyFluentBuilder::new(self.handle.clone()) diff --git a/sdk/kms/src/client/put_key_policy.rs b/sdk/kms/src/client/put_key_policy.rs index 658dff443dd7..a721a484b8ca 100644 --- a/sdk/kms/src/client/put_key_policy.rs +++ b/sdk/kms/src/client/put_key_policy.rs @@ -4,7 +4,7 @@ impl super::Client { /// /// - The fluent builder is configurable: /// - [`key_id(impl Into)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::key_id) / [`set_key_id(Option)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::set_key_id):
                  required: **true**

                  Sets the key policy on the specified KMS key.

                  Specify the key ID or key ARN of the KMS key.

                  For example:

                  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

                  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

                  To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.


                  - /// - [`policy_name(impl Into)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::policy_name) / [`set_policy_name(Option)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::set_policy_name):
                  required: **true**

                  The name of the key policy. The only valid value is default.


                  + /// - [`policy_name(impl Into)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::policy_name) / [`set_policy_name(Option)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::set_policy_name):
                  required: **false**

                  The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.


                  /// - [`policy(impl Into)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::policy) / [`set_policy(Option)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::set_policy):
                  required: **true**

                  The key policy to attach to the KMS key.

                  The key policy must meet the following criteria:

                  • The key policy must allow the calling principal to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Key Management Service Developer Guide. (To omit this condition, set BypassPolicyLockoutSafetyCheck to true.)

                  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal, you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

                  A key policy document can include only the following characters:

                  • Printable ASCII characters from the space character (\u0020) through the end of the ASCII character range.

                  • Printable characters in the Basic Latin and Latin-1 Supplement character set (through \u00FF).

                  • The tab (\u0009), line feed (\u000A), and carriage return (\u000D) special characters

                  For information about key policies, see Key policies in KMS in the Key Management Service Developer Guide.For help writing and formatting a JSON policy document, see the IAM JSON Policy Reference in the Identity and Access Management User Guide .


                  /// - [`bypass_policy_lockout_safety_check(bool)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::bypass_policy_lockout_safety_check) / [`set_bypass_policy_lockout_safety_check(Option)`](crate::operation::put_key_policy::builders::PutKeyPolicyFluentBuilder::set_bypass_policy_lockout_safety_check):
                  required: **false**

                  Skips ("bypasses") the key policy lockout safety check. The default value is false.

                  Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.

                  For more information, see Default key policy in the Key Management Service Developer Guide.

                  Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.


                  /// - On success, responds with [`PutKeyPolicyOutput`](crate::operation::put_key_policy::PutKeyPolicyOutput) diff --git a/sdk/kms/src/lib.rs b/sdk/kms/src/lib.rs index 9c9fca7132df..54aeaadc32cb 100644 --- a/sdk/kms/src/lib.rs +++ b/sdk/kms/src/lib.rs @@ -61,7 +61,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-kms = "1.17.0" +//! aws-sdk-kms = "1.18.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/kms/src/operation/get_key_policy/_get_key_policy_input.rs b/sdk/kms/src/operation/get_key_policy/_get_key_policy_input.rs index 97266efe6424..47d610e8b317 100644 --- a/sdk/kms/src/operation/get_key_policy/_get_key_policy_input.rs +++ b/sdk/kms/src/operation/get_key_policy/_get_key_policy_input.rs @@ -14,7 +14,7 @@ pub struct GetKeyPolicyInput { ///
                ///

                To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

                pub key_id: ::std::option::Option<::std::string::String>, - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub policy_name: ::std::option::Option<::std::string::String>, } impl GetKeyPolicyInput { @@ -31,7 +31,7 @@ impl GetKeyPolicyInput { pub fn key_id(&self) -> ::std::option::Option<&str> { self.key_id.as_deref() } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn policy_name(&self) -> ::std::option::Option<&str> { self.policy_name.as_deref() } @@ -93,18 +93,17 @@ impl GetKeyPolicyInputBuilder { pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { &self.key_id } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                - /// This field is required. + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.policy_name = ::std::option::Option::Some(input.into()); self } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.policy_name = input; self } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> { &self.policy_name } diff --git a/sdk/kms/src/operation/get_key_policy/_get_key_policy_output.rs b/sdk/kms/src/operation/get_key_policy/_get_key_policy_output.rs index 7b0d5362bb87..934ad0b51486 100644 --- a/sdk/kms/src/operation/get_key_policy/_get_key_policy_output.rs +++ b/sdk/kms/src/operation/get_key_policy/_get_key_policy_output.rs @@ -5,6 +5,8 @@ pub struct GetKeyPolicyOutput { ///

                A key policy document in JSON format.

                pub policy: ::std::option::Option<::std::string::String>, + ///

                The name of the key policy. The only valid value is default.

                + pub policy_name: ::std::option::Option<::std::string::String>, _request_id: Option, } impl GetKeyPolicyOutput { @@ -12,6 +14,10 @@ impl GetKeyPolicyOutput { pub fn policy(&self) -> ::std::option::Option<&str> { self.policy.as_deref() } + ///

                The name of the key policy. The only valid value is default.

                + pub fn policy_name(&self) -> ::std::option::Option<&str> { + self.policy_name.as_deref() + } } impl ::aws_types::request_id::RequestId for GetKeyPolicyOutput { fn request_id(&self) -> Option<&str> { @@ -30,6 +36,7 @@ impl GetKeyPolicyOutput { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] pub struct GetKeyPolicyOutputBuilder { pub(crate) policy: ::std::option::Option<::std::string::String>, + pub(crate) policy_name: ::std::option::Option<::std::string::String>, _request_id: Option, } impl GetKeyPolicyOutputBuilder { @@ -47,6 +54,20 @@ impl GetKeyPolicyOutputBuilder { pub fn get_policy(&self) -> &::std::option::Option<::std::string::String> { &self.policy } + ///

                The name of the key policy. The only valid value is default.

                + pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.policy_name = ::std::option::Option::Some(input.into()); + self + } + ///

                The name of the key policy. The only valid value is default.

                + pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.policy_name = input; + self + } + ///

                The name of the key policy. The only valid value is default.

                + pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> { + &self.policy_name + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -60,6 +81,7 @@ impl GetKeyPolicyOutputBuilder { pub fn build(self) -> crate::operation::get_key_policy::GetKeyPolicyOutput { crate::operation::get_key_policy::GetKeyPolicyOutput { policy: self.policy, + policy_name: self.policy_name, _request_id: self._request_id, } } diff --git a/sdk/kms/src/operation/get_key_policy/builders.rs b/sdk/kms/src/operation/get_key_policy/builders.rs index fd61b8c19b0f..05567cc98c04 100644 --- a/sdk/kms/src/operation/get_key_policy/builders.rs +++ b/sdk/kms/src/operation/get_key_policy/builders.rs @@ -153,17 +153,17 @@ impl GetKeyPolicyFluentBuilder { pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_key_id() } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.inner = self.inner.policy_name(input.into()); self } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.inner = self.inner.set_policy_name(input); self } - ///

                Specifies the name of the key policy. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                + ///

                Specifies the name of the key policy. If no policy name is specified, the default value is default. The only valid name is default. To get the names of key policies, use ListKeyPolicies.

                pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_policy_name() } diff --git a/sdk/kms/src/operation/import_key_material/builders.rs b/sdk/kms/src/operation/import_key_material/builders.rs index e9ac098abf1b..e10c4a21e699 100644 --- a/sdk/kms/src/operation/import_key_material/builders.rs +++ b/sdk/kms/src/operation/import_key_material/builders.rs @@ -24,7 +24,7 @@ impl ImportKeyMaterialInputBuilder { /// ///

                Imports or reimports key material into an existing KMS key that was created without key material. ImportKeyMaterial also sets the expiration model and expiration date of the imported key material.

                ///

                By default, KMS keys are created with key material that KMS generates. This operation supports Importing key material, an advanced feature that lets you generate and import the cryptographic key material for a KMS key. For more information about importing key material into KMS, see Importing key material in the Key Management Service Developer Guide.

                -///

                After you successfully import key material into a KMS key, you can reimport the same key material into that KMS key, but you cannot import different key material. You might reimport key material to replace key material that expired or key material that you deleted. You might also reimport key material to change the expiration model or expiration date of the key material. Before reimporting key material, if necessary, call DeleteImportedKeyMaterial to delete the current imported key material.

                +///

                After you successfully import key material into a KMS key, you can reimport the same key material into that KMS key, but you cannot import different key material. You might reimport key material to replace key material that expired or key material that you deleted. You might also reimport key material to change the expiration model or expiration date of the key material.

                ///

                Each time you import key material into KMS, you can determine whether (ExpirationModel) and when (ValidTo) the key material expires. To change the expiration of your key material, you must import it again, either by calling ImportKeyMaterial or using the import features of the KMS console.

                ///

                Before calling ImportKeyMaterial:

                ///
                  diff --git a/sdk/kms/src/operation/put_key_policy/_put_key_policy_input.rs b/sdk/kms/src/operation/put_key_policy/_put_key_policy_input.rs index 6d3930db90dc..ec249dce54e7 100644 --- a/sdk/kms/src/operation/put_key_policy/_put_key_policy_input.rs +++ b/sdk/kms/src/operation/put_key_policy/_put_key_policy_input.rs @@ -14,7 +14,7 @@ pub struct PutKeyPolicyInput { ///
                ///

                To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

                pub key_id: ::std::option::Option<::std::string::String>, - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub policy_name: ::std::option::Option<::std::string::String>, ///

                The key policy to attach to the KMS key.

                ///

                The key policy must meet the following criteria:

                @@ -56,7 +56,7 @@ impl PutKeyPolicyInput { pub fn key_id(&self) -> ::std::option::Option<&str> { self.key_id.as_deref() } - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn policy_name(&self) -> ::std::option::Option<&str> { self.policy_name.as_deref() } @@ -149,18 +149,17 @@ impl PutKeyPolicyInputBuilder { pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { &self.key_id } - ///

                The name of the key policy. The only valid value is default.

                - /// This field is required. + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.policy_name = ::std::option::Option::Some(input.into()); self } - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.policy_name = input; self } - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> { &self.policy_name } diff --git a/sdk/kms/src/operation/put_key_policy/builders.rs b/sdk/kms/src/operation/put_key_policy/builders.rs index 51849321c5bb..d057487a520c 100644 --- a/sdk/kms/src/operation/put_key_policy/builders.rs +++ b/sdk/kms/src/operation/put_key_policy/builders.rs @@ -154,17 +154,17 @@ impl PutKeyPolicyFluentBuilder { pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_key_id() } - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.inner = self.inner.policy_name(input.into()); self } - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.inner = self.inner.set_policy_name(input); self } - ///

                The name of the key policy. The only valid value is default.

                + ///

                The name of the key policy. If no policy name is specified, the default value is default. The only valid value is default.

                pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_policy_name() } diff --git a/sdk/kms/src/operation/revoke_grant/builders.rs b/sdk/kms/src/operation/revoke_grant/builders.rs index 6a79eea3ada3..c76cbd4fafa8 100644 --- a/sdk/kms/src/operation/revoke_grant/builders.rs +++ b/sdk/kms/src/operation/revoke_grant/builders.rs @@ -22,7 +22,7 @@ impl RevokeGrantInputBuilder { } /// Fluent builder constructing a request to `RevokeGrant`. /// -///

                Deletes the specified grant. You revoke a grant to terminate the permissions that the grant allows. For more information, see Retiring and revoking grants in the Key Management Service Developer Guide .

                +///

                Deletes the specified grant. You revoke a grant to terminate the permissions that the grant allows. For more information, see Retiring and revoking grants in the Key Management Service Developer Guide .

                ///

                When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. For details, see Eventual consistency in the Key Management Service Developer Guide .

                ///

                For detailed information about grants, including grant terminology, see Grants in KMS in the Key Management Service Developer Guide . For examples of working with grants in several programming languages, see Programming grants.

                ///

                Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key ARN in the value of the KeyId parameter.

                diff --git a/sdk/kms/src/protocol_serde/shape_get_key_policy.rs b/sdk/kms/src/protocol_serde/shape_get_key_policy.rs index 9f6018141181..31223bbf31e8 100644 --- a/sdk/kms/src/protocol_serde/shape_get_key_policy.rs +++ b/sdk/kms/src/protocol_serde/shape_get_key_policy.rs @@ -140,6 +140,13 @@ pub(crate) fn de_get_key_policy( .transpose()?, ); } + "PolicyName" => { + builder = builder.set_policy_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/mediatailor/Cargo.toml b/sdk/mediatailor/Cargo.toml index ab97f683ea9e..abfb917b8a97 100644 --- a/sdk/mediatailor/Cargo.toml +++ b/sdk/mediatailor/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-mediatailor" -version = "1.18.0" +version = "1.19.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for AWS MediaTailor" edition = "2021" diff --git a/sdk/mediatailor/README.md b/sdk/mediatailor/README.md index 46cde9e9337b..920a8e2304c8 100644 --- a/sdk/mediatailor/README.md +++ b/sdk/mediatailor/README.md @@ -16,7 +16,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-mediatailor = "1.18.0" +aws-sdk-mediatailor = "1.19.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/mediatailor/src/client/create_channel.rs b/sdk/mediatailor/src/client/create_channel.rs index c3dbad1e5509..50fd65f81eff 100644 --- a/sdk/mediatailor/src/client/create_channel.rs +++ b/sdk/mediatailor/src/client/create_channel.rs @@ -10,6 +10,7 @@ impl super::Client { /// - [`tags(impl Into, impl Into)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::set_tags):
                required: **false**

                The tags to assign to the channel. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.


                /// - [`tier(Tier)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::tier) / [`set_tier(Option)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::set_tier):
                required: **false**

                The tier of the channel.


                /// - [`time_shift_configuration(TimeShiftConfiguration)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::time_shift_configuration) / [`set_time_shift_configuration(Option)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::set_time_shift_configuration):
                required: **false**

                The time-shifted viewing configuration you want to associate to the channel.


                + /// - [`audiences(impl Into)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::audiences) / [`set_audiences(Option>)`](crate::operation::create_channel::builders::CreateChannelFluentBuilder::set_audiences):
                required: **false**

                The list of audiences defined in channel.


                /// - On success, responds with [`CreateChannelOutput`](crate::operation::create_channel::CreateChannelOutput) with field(s): /// - [`arn(Option)`](crate::operation::create_channel::CreateChannelOutput::arn):

                The Amazon Resource Name (ARN) to assign to the channel.

                /// - [`channel_name(Option)`](crate::operation::create_channel::CreateChannelOutput::channel_name):

                The name to assign to the channel.

                @@ -22,6 +23,7 @@ impl super::Client { /// - [`tags(Option>)`](crate::operation::create_channel::CreateChannelOutput::tags):

                The tags to assign to the channel. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

                /// - [`tier(Option)`](crate::operation::create_channel::CreateChannelOutput::tier):

                The tier of the channel.

                /// - [`time_shift_configuration(Option)`](crate::operation::create_channel::CreateChannelOutput::time_shift_configuration):

                The time-shifted viewing configuration assigned to the channel.

                + /// - [`audiences(Option>)`](crate::operation::create_channel::CreateChannelOutput::audiences):

                The list of audiences defined in channel.

                /// - On failure, responds with [`SdkError`](crate::operation::create_channel::CreateChannelError) pub fn create_channel(&self) -> crate::operation::create_channel::builders::CreateChannelFluentBuilder { crate::operation::create_channel::builders::CreateChannelFluentBuilder::new(self.handle.clone()) diff --git a/sdk/mediatailor/src/client/create_program.rs b/sdk/mediatailor/src/client/create_program.rs index 0e76d5acf63e..e25d71ab313b 100644 --- a/sdk/mediatailor/src/client/create_program.rs +++ b/sdk/mediatailor/src/client/create_program.rs @@ -10,6 +10,7 @@ impl super::Client { /// - [`schedule_configuration(ScheduleConfiguration)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::schedule_configuration) / [`set_schedule_configuration(Option)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::set_schedule_configuration):
                required: **true**

                The schedule configuration settings.


                /// - [`source_location_name(impl Into)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::source_location_name) / [`set_source_location_name(Option)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::set_source_location_name):
                required: **true**

                The name of the source location.


                /// - [`vod_source_name(impl Into)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::vod_source_name) / [`set_vod_source_name(Option)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::set_vod_source_name):
                required: **false**

                The name that's used to refer to a VOD source.


                + /// - [`audience_media(AudienceMedia)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::audience_media) / [`set_audience_media(Option>)`](crate::operation::create_program::builders::CreateProgramFluentBuilder::set_audience_media):
                required: **false**

                The list of AudienceMedia defined in program.


                /// - On success, responds with [`CreateProgramOutput`](crate::operation::create_program::CreateProgramOutput) with field(s): /// - [`ad_breaks(Option>)`](crate::operation::create_program::CreateProgramOutput::ad_breaks):

                The ad break configuration settings.

                /// - [`arn(Option)`](crate::operation::create_program::CreateProgramOutput::arn):

                The ARN to assign to the program.

                @@ -22,6 +23,7 @@ impl super::Client { /// - [`vod_source_name(Option)`](crate::operation::create_program::CreateProgramOutput::vod_source_name):

                The name that's used to refer to a VOD source.

                /// - [`clip_range(Option)`](crate::operation::create_program::CreateProgramOutput::clip_range):

                The clip range configuration settings.

                /// - [`duration_millis(Option)`](crate::operation::create_program::CreateProgramOutput::duration_millis):

                The duration of the live program in milliseconds.

                + /// - [`audience_media(Option>)`](crate::operation::create_program::CreateProgramOutput::audience_media):

                The list of AudienceMedia defined in program.

                /// - On failure, responds with [`SdkError`](crate::operation::create_program::CreateProgramError) pub fn create_program(&self) -> crate::operation::create_program::builders::CreateProgramFluentBuilder { crate::operation::create_program::builders::CreateProgramFluentBuilder::new(self.handle.clone()) diff --git a/sdk/mediatailor/src/client/describe_channel.rs b/sdk/mediatailor/src/client/describe_channel.rs index 18b4882c81e2..32e004fa6beb 100644 --- a/sdk/mediatailor/src/client/describe_channel.rs +++ b/sdk/mediatailor/src/client/describe_channel.rs @@ -17,6 +17,7 @@ impl super::Client { /// - [`tier(Option)`](crate::operation::describe_channel::DescribeChannelOutput::tier):

                The channel's tier.

                /// - [`log_configuration(Option)`](crate::operation::describe_channel::DescribeChannelOutput::log_configuration):

                The log configuration for the channel.

                /// - [`time_shift_configuration(Option)`](crate::operation::describe_channel::DescribeChannelOutput::time_shift_configuration):

                The time-shifted viewing configuration for the channel.

                + /// - [`audiences(Option>)`](crate::operation::describe_channel::DescribeChannelOutput::audiences):

                The list of audiences defined in channel.

                /// - On failure, responds with [`SdkError`](crate::operation::describe_channel::DescribeChannelError) pub fn describe_channel(&self) -> crate::operation::describe_channel::builders::DescribeChannelFluentBuilder { crate::operation::describe_channel::builders::DescribeChannelFluentBuilder::new(self.handle.clone()) diff --git a/sdk/mediatailor/src/client/describe_program.rs b/sdk/mediatailor/src/client/describe_program.rs index dc73c79ba73c..c10af87ec9b3 100644 --- a/sdk/mediatailor/src/client/describe_program.rs +++ b/sdk/mediatailor/src/client/describe_program.rs @@ -17,6 +17,7 @@ impl super::Client { /// - [`vod_source_name(Option)`](crate::operation::describe_program::DescribeProgramOutput::vod_source_name):

                The name that's used to refer to a VOD source.

                /// - [`clip_range(Option)`](crate::operation::describe_program::DescribeProgramOutput::clip_range):

                The clip range configuration settings.

                /// - [`duration_millis(Option)`](crate::operation::describe_program::DescribeProgramOutput::duration_millis):

                The duration of the live program in milliseconds.

                + /// - [`audience_media(Option>)`](crate::operation::describe_program::DescribeProgramOutput::audience_media):

                The list of AudienceMedia defined in program.

                /// - On failure, responds with [`SdkError`](crate::operation::describe_program::DescribeProgramError) pub fn describe_program(&self) -> crate::operation::describe_program::builders::DescribeProgramFluentBuilder { crate::operation::describe_program::builders::DescribeProgramFluentBuilder::new(self.handle.clone()) diff --git a/sdk/mediatailor/src/client/get_channel_schedule.rs b/sdk/mediatailor/src/client/get_channel_schedule.rs index 5850d9a64af5..4b897973fdf6 100644 --- a/sdk/mediatailor/src/client/get_channel_schedule.rs +++ b/sdk/mediatailor/src/client/get_channel_schedule.rs @@ -8,6 +8,7 @@ impl super::Client { /// - [`duration_minutes(impl Into)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::duration_minutes) / [`set_duration_minutes(Option)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::set_duration_minutes):
                required: **false**

                The duration in minutes of the channel schedule.


                /// - [`max_results(i32)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::max_results) / [`set_max_results(Option)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::set_max_results):
                required: **false**

                The maximum number of channel schedules that you want MediaTailor to return in response to the current request. If there are more than MaxResults channel schedules, use the value of NextToken in the response to get the next page of results.


                /// - [`next_token(impl Into)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::next_token) / [`set_next_token(Option)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::set_next_token):
                required: **false**

                (Optional) If the playback configuration has more than MaxResults channel schedules, use NextToken to get the second and subsequent pages of results.

                For the first GetChannelScheduleRequest request, omit this value.

                For the second and subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request.

                If the previous response didn't include a NextToken element, there are no more channel schedules to get.


                + /// - [`audience(impl Into)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::audience) / [`set_audience(Option)`](crate::operation::get_channel_schedule::builders::GetChannelScheduleFluentBuilder::set_audience):
                required: **false**

                The single audience for GetChannelScheduleRequest.


                /// - On success, responds with [`GetChannelScheduleOutput`](crate::operation::get_channel_schedule::GetChannelScheduleOutput) with field(s): /// - [`items(Option>)`](crate::operation::get_channel_schedule::GetChannelScheduleOutput::items):

                A list of schedule entries for the channel.

                /// - [`next_token(Option)`](crate::operation::get_channel_schedule::GetChannelScheduleOutput::next_token):

                Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

                diff --git a/sdk/mediatailor/src/client/update_channel.rs b/sdk/mediatailor/src/client/update_channel.rs index 731cf096cc18..480147cc6244 100644 --- a/sdk/mediatailor/src/client/update_channel.rs +++ b/sdk/mediatailor/src/client/update_channel.rs @@ -7,6 +7,7 @@ impl super::Client { /// - [`filler_slate(SlateSource)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::filler_slate) / [`set_filler_slate(Option)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::set_filler_slate):
                required: **false**

                The slate used to fill gaps between programs in the schedule. You must configure filler slate if your channel uses the LINEAR PlaybackMode. MediaTailor doesn't support filler slate for channels using the LOOP PlaybackMode.


                /// - [`outputs(RequestOutputItem)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::outputs) / [`set_outputs(Option>)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::set_outputs):
                required: **true**

                The channel's output properties.


                /// - [`time_shift_configuration(TimeShiftConfiguration)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::time_shift_configuration) / [`set_time_shift_configuration(Option)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::set_time_shift_configuration):
                required: **false**

                The time-shifted viewing configuration you want to associate to the channel.


                + /// - [`audiences(impl Into)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::audiences) / [`set_audiences(Option>)`](crate::operation::update_channel::builders::UpdateChannelFluentBuilder::set_audiences):
                required: **false**

                The list of audiences defined in channel.


                /// - On success, responds with [`UpdateChannelOutput`](crate::operation::update_channel::UpdateChannelOutput) with field(s): /// - [`arn(Option)`](crate::operation::update_channel::UpdateChannelOutput::arn):

                The Amazon Resource Name (ARN) associated with the channel.

                /// - [`channel_name(Option)`](crate::operation::update_channel::UpdateChannelOutput::channel_name):

                The name of the channel.

                @@ -19,6 +20,7 @@ impl super::Client { /// - [`tags(Option>)`](crate::operation::update_channel::UpdateChannelOutput::tags):

                The tags to assign to the channel. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

                /// - [`tier(Option)`](crate::operation::update_channel::UpdateChannelOutput::tier):

                The tier associated with this Channel.

                /// - [`time_shift_configuration(Option)`](crate::operation::update_channel::UpdateChannelOutput::time_shift_configuration):

                The time-shifted viewing configuration for the channel.

                + /// - [`audiences(Option>)`](crate::operation::update_channel::UpdateChannelOutput::audiences):

                The list of audiences defined in channel.

                /// - On failure, responds with [`SdkError`](crate::operation::update_channel::UpdateChannelError) pub fn update_channel(&self) -> crate::operation::update_channel::builders::UpdateChannelFluentBuilder { crate::operation::update_channel::builders::UpdateChannelFluentBuilder::new(self.handle.clone()) diff --git a/sdk/mediatailor/src/client/update_program.rs b/sdk/mediatailor/src/client/update_program.rs index 147a70bc6f56..503ee20650ae 100644 --- a/sdk/mediatailor/src/client/update_program.rs +++ b/sdk/mediatailor/src/client/update_program.rs @@ -7,6 +7,7 @@ impl super::Client { /// - [`channel_name(impl Into)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::channel_name) / [`set_channel_name(Option)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::set_channel_name):
                required: **true**

                The name of the channel for this Program.


                /// - [`program_name(impl Into)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::program_name) / [`set_program_name(Option)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::set_program_name):
                required: **true**

                The name of the Program.


                /// - [`schedule_configuration(UpdateProgramScheduleConfiguration)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::schedule_configuration) / [`set_schedule_configuration(Option)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::set_schedule_configuration):
                required: **true**

                The schedule configuration settings.


                + /// - [`audience_media(AudienceMedia)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::audience_media) / [`set_audience_media(Option>)`](crate::operation::update_program::builders::UpdateProgramFluentBuilder::set_audience_media):
                required: **false**

                The list of AudienceMedia defined in program.


                /// - On success, responds with [`UpdateProgramOutput`](crate::operation::update_program::UpdateProgramOutput) with field(s): /// - [`ad_breaks(Option>)`](crate::operation::update_program::UpdateProgramOutput::ad_breaks):

                The ad break configuration settings.

                /// - [`arn(Option)`](crate::operation::update_program::UpdateProgramOutput::arn):

                The ARN to assign to the program.

                @@ -19,6 +20,7 @@ impl super::Client { /// - [`clip_range(Option)`](crate::operation::update_program::UpdateProgramOutput::clip_range):

                The clip range configuration settings.

                /// - [`duration_millis(Option)`](crate::operation::update_program::UpdateProgramOutput::duration_millis):

                The duration of the live program in milliseconds.

                /// - [`scheduled_start_time(Option)`](crate::operation::update_program::UpdateProgramOutput::scheduled_start_time):

                The scheduled start time for this Program.

                + /// - [`audience_media(Option>)`](crate::operation::update_program::UpdateProgramOutput::audience_media):

                The list of AudienceMedia defined in program.

                /// - On failure, responds with [`SdkError`](crate::operation::update_program::UpdateProgramError) pub fn update_program(&self) -> crate::operation::update_program::builders::UpdateProgramFluentBuilder { crate::operation::update_program::builders::UpdateProgramFluentBuilder::new(self.handle.clone()) diff --git a/sdk/mediatailor/src/lib.rs b/sdk/mediatailor/src/lib.rs index c494d1af8625..b0852872168e 100644 --- a/sdk/mediatailor/src/lib.rs +++ b/sdk/mediatailor/src/lib.rs @@ -32,7 +32,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-mediatailor = "1.18.0" +//! aws-sdk-mediatailor = "1.19.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/mediatailor/src/operation/create_channel/_create_channel_input.rs b/sdk/mediatailor/src/operation/create_channel/_create_channel_input.rs index bfb57789fe83..d8f36cacff3f 100644 --- a/sdk/mediatailor/src/operation/create_channel/_create_channel_input.rs +++ b/sdk/mediatailor/src/operation/create_channel/_create_channel_input.rs @@ -19,6 +19,8 @@ pub struct CreateChannelInput { pub tier: ::std::option::Option, ///

                The time-shifted viewing configuration you want to associate to the channel.

                pub time_shift_configuration: ::std::option::Option, + ///

                The list of audiences defined in channel.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl CreateChannelInput { ///

                The name of the channel.

                @@ -53,6 +55,12 @@ impl CreateChannelInput { pub fn time_shift_configuration(&self) -> ::std::option::Option<&crate::types::TimeShiftConfiguration> { self.time_shift_configuration.as_ref() } + ///

                The list of audiences defined in channel.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl CreateChannelInput { /// Creates a new builder-style object to manufacture [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput). @@ -72,6 +80,7 @@ pub struct CreateChannelInputBuilder { pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, pub(crate) tier: ::std::option::Option, pub(crate) time_shift_configuration: ::std::option::Option, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl CreateChannelInputBuilder { ///

                The name of the channel.

                @@ -192,6 +201,26 @@ impl CreateChannelInputBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { &self.time_shift_configuration } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } /// Consumes the builder and constructs a [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput). pub fn build( self, @@ -204,6 +233,7 @@ impl CreateChannelInputBuilder { tags: self.tags, tier: self.tier, time_shift_configuration: self.time_shift_configuration, + audiences: self.audiences, }) } } diff --git a/sdk/mediatailor/src/operation/create_channel/_create_channel_output.rs b/sdk/mediatailor/src/operation/create_channel/_create_channel_output.rs index 9c342751832e..a233c458b2b2 100644 --- a/sdk/mediatailor/src/operation/create_channel/_create_channel_output.rs +++ b/sdk/mediatailor/src/operation/create_channel/_create_channel_output.rs @@ -25,6 +25,8 @@ pub struct CreateChannelOutput { pub tier: ::std::option::Option<::std::string::String>, ///

                The time-shifted viewing configuration assigned to the channel.

                pub time_shift_configuration: ::std::option::Option, + ///

                The list of audiences defined in channel.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, _request_id: Option, } impl CreateChannelOutput { @@ -74,6 +76,12 @@ impl CreateChannelOutput { pub fn time_shift_configuration(&self) -> ::std::option::Option<&crate::types::TimeShiftConfiguration> { self.time_shift_configuration.as_ref() } + ///

                The list of audiences defined in channel.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl ::aws_types::request_id::RequestId for CreateChannelOutput { fn request_id(&self) -> Option<&str> { @@ -102,6 +110,7 @@ pub struct CreateChannelOutputBuilder { pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, pub(crate) tier: ::std::option::Option<::std::string::String>, pub(crate) time_shift_configuration: ::std::option::Option, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, _request_id: Option, } impl CreateChannelOutputBuilder { @@ -271,6 +280,26 @@ impl CreateChannelOutputBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { &self.time_shift_configuration } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -294,6 +323,7 @@ impl CreateChannelOutputBuilder { tags: self.tags, tier: self.tier, time_shift_configuration: self.time_shift_configuration, + audiences: self.audiences, _request_id: self._request_id, } } diff --git a/sdk/mediatailor/src/operation/create_channel/builders.rs b/sdk/mediatailor/src/operation/create_channel/builders.rs index b6d4b8b0fac2..df5dc06b83b4 100644 --- a/sdk/mediatailor/src/operation/create_channel/builders.rs +++ b/sdk/mediatailor/src/operation/create_channel/builders.rs @@ -220,4 +220,22 @@ impl CreateChannelFluentBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { self.inner.get_time_shift_configuration() } + /// Appends an item to `Audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.audiences(input.into()); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_audiences(input); + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_audiences() + } } diff --git a/sdk/mediatailor/src/operation/create_program/_create_program_input.rs b/sdk/mediatailor/src/operation/create_program/_create_program_input.rs index b238a8f0982c..fb8fdf5d6df5 100644 --- a/sdk/mediatailor/src/operation/create_program/_create_program_input.rs +++ b/sdk/mediatailor/src/operation/create_program/_create_program_input.rs @@ -17,6 +17,8 @@ pub struct CreateProgramInput { pub source_location_name: ::std::option::Option<::std::string::String>, ///

                The name that's used to refer to a VOD source.

                pub vod_source_name: ::std::option::Option<::std::string::String>, + ///

                The list of AudienceMedia defined in program.

                + pub audience_media: ::std::option::Option<::std::vec::Vec>, } impl CreateProgramInput { ///

                The ad break configuration settings.

                @@ -49,6 +51,12 @@ impl CreateProgramInput { pub fn vod_source_name(&self) -> ::std::option::Option<&str> { self.vod_source_name.as_deref() } + ///

                The list of AudienceMedia defined in program.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audience_media.is_none()`. + pub fn audience_media(&self) -> &[crate::types::AudienceMedia] { + self.audience_media.as_deref().unwrap_or_default() + } } impl CreateProgramInput { /// Creates a new builder-style object to manufacture [`CreateProgramInput`](crate::operation::create_program::CreateProgramInput). @@ -68,6 +76,7 @@ pub struct CreateProgramInputBuilder { pub(crate) schedule_configuration: ::std::option::Option, pub(crate) source_location_name: ::std::option::Option<::std::string::String>, pub(crate) vod_source_name: ::std::option::Option<::std::string::String>, + pub(crate) audience_media: ::std::option::Option<::std::vec::Vec>, } impl CreateProgramInputBuilder { /// Appends an item to `ad_breaks`. @@ -178,6 +187,26 @@ impl CreateProgramInputBuilder { pub fn get_vod_source_name(&self) -> &::std::option::Option<::std::string::String> { &self.vod_source_name } + /// Appends an item to `audience_media`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + let mut v = self.audience_media.unwrap_or_default(); + v.push(input); + self.audience_media = ::std::option::Option::Some(v); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.audience_media = input; + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.audience_media + } /// Consumes the builder and constructs a [`CreateProgramInput`](crate::operation::create_program::CreateProgramInput). pub fn build( self, @@ -190,6 +219,7 @@ impl CreateProgramInputBuilder { schedule_configuration: self.schedule_configuration, source_location_name: self.source_location_name, vod_source_name: self.vod_source_name, + audience_media: self.audience_media, }) } } diff --git a/sdk/mediatailor/src/operation/create_program/_create_program_output.rs b/sdk/mediatailor/src/operation/create_program/_create_program_output.rs index d8b2fbe0ee4b..2048d93cc36a 100644 --- a/sdk/mediatailor/src/operation/create_program/_create_program_output.rs +++ b/sdk/mediatailor/src/operation/create_program/_create_program_output.rs @@ -25,6 +25,8 @@ pub struct CreateProgramOutput { pub clip_range: ::std::option::Option, ///

                The duration of the live program in milliseconds.

                pub duration_millis: ::std::option::Option, + ///

                The list of AudienceMedia defined in program.

                + pub audience_media: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl CreateProgramOutput { @@ -74,6 +76,12 @@ impl CreateProgramOutput { pub fn duration_millis(&self) -> ::std::option::Option { self.duration_millis } + ///

                The list of AudienceMedia defined in program.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audience_media.is_none()`. + pub fn audience_media(&self) -> &[crate::types::AudienceMedia] { + self.audience_media.as_deref().unwrap_or_default() + } } impl ::aws_types::request_id::RequestId for CreateProgramOutput { fn request_id(&self) -> Option<&str> { @@ -102,6 +110,7 @@ pub struct CreateProgramOutputBuilder { pub(crate) vod_source_name: ::std::option::Option<::std::string::String>, pub(crate) clip_range: ::std::option::Option, pub(crate) duration_millis: ::std::option::Option, + pub(crate) audience_media: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl CreateProgramOutputBuilder { @@ -265,6 +274,26 @@ impl CreateProgramOutputBuilder { pub fn get_duration_millis(&self) -> &::std::option::Option { &self.duration_millis } + /// Appends an item to `audience_media`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + let mut v = self.audience_media.unwrap_or_default(); + v.push(input); + self.audience_media = ::std::option::Option::Some(v); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.audience_media = input; + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.audience_media + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -288,6 +317,7 @@ impl CreateProgramOutputBuilder { vod_source_name: self.vod_source_name, clip_range: self.clip_range, duration_millis: self.duration_millis, + audience_media: self.audience_media, _request_id: self._request_id, } } diff --git a/sdk/mediatailor/src/operation/create_program/builders.rs b/sdk/mediatailor/src/operation/create_program/builders.rs index 3126b61d641f..1ef66974cc4e 100644 --- a/sdk/mediatailor/src/operation/create_program/builders.rs +++ b/sdk/mediatailor/src/operation/create_program/builders.rs @@ -210,4 +210,22 @@ impl CreateProgramFluentBuilder { pub fn get_vod_source_name(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_vod_source_name() } + /// Appends an item to `AudienceMedia`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + self.inner = self.inner.audience_media(input); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_audience_media(input); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_audience_media() + } } diff --git a/sdk/mediatailor/src/operation/describe_channel/_describe_channel_output.rs b/sdk/mediatailor/src/operation/describe_channel/_describe_channel_output.rs index 7961efa92972..20c0e2a39f43 100644 --- a/sdk/mediatailor/src/operation/describe_channel/_describe_channel_output.rs +++ b/sdk/mediatailor/src/operation/describe_channel/_describe_channel_output.rs @@ -27,6 +27,8 @@ pub struct DescribeChannelOutput { pub log_configuration: ::std::option::Option, ///

                The time-shifted viewing configuration for the channel.

                pub time_shift_configuration: ::std::option::Option, + ///

                The list of audiences defined in channel.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, _request_id: Option, } impl DescribeChannelOutput { @@ -80,6 +82,12 @@ impl DescribeChannelOutput { pub fn time_shift_configuration(&self) -> ::std::option::Option<&crate::types::TimeShiftConfiguration> { self.time_shift_configuration.as_ref() } + ///

                The list of audiences defined in channel.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl ::aws_types::request_id::RequestId for DescribeChannelOutput { fn request_id(&self) -> Option<&str> { @@ -109,6 +117,7 @@ pub struct DescribeChannelOutputBuilder { pub(crate) tier: ::std::option::Option<::std::string::String>, pub(crate) log_configuration: ::std::option::Option, pub(crate) time_shift_configuration: ::std::option::Option, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, _request_id: Option, } impl DescribeChannelOutputBuilder { @@ -293,6 +302,26 @@ impl DescribeChannelOutputBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { &self.time_shift_configuration } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -317,6 +346,7 @@ impl DescribeChannelOutputBuilder { tier: self.tier, log_configuration: self.log_configuration, time_shift_configuration: self.time_shift_configuration, + audiences: self.audiences, _request_id: self._request_id, } } diff --git a/sdk/mediatailor/src/operation/describe_program/_describe_program_output.rs b/sdk/mediatailor/src/operation/describe_program/_describe_program_output.rs index 3f2db40901d3..9268b8920a1a 100644 --- a/sdk/mediatailor/src/operation/describe_program/_describe_program_output.rs +++ b/sdk/mediatailor/src/operation/describe_program/_describe_program_output.rs @@ -25,6 +25,8 @@ pub struct DescribeProgramOutput { pub clip_range: ::std::option::Option, ///

                The duration of the live program in milliseconds.

                pub duration_millis: ::std::option::Option, + ///

                The list of AudienceMedia defined in program.

                + pub audience_media: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl DescribeProgramOutput { @@ -74,6 +76,12 @@ impl DescribeProgramOutput { pub fn duration_millis(&self) -> ::std::option::Option { self.duration_millis } + ///

                The list of AudienceMedia defined in program.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audience_media.is_none()`. + pub fn audience_media(&self) -> &[crate::types::AudienceMedia] { + self.audience_media.as_deref().unwrap_or_default() + } } impl ::aws_types::request_id::RequestId for DescribeProgramOutput { fn request_id(&self) -> Option<&str> { @@ -102,6 +110,7 @@ pub struct DescribeProgramOutputBuilder { pub(crate) vod_source_name: ::std::option::Option<::std::string::String>, pub(crate) clip_range: ::std::option::Option, pub(crate) duration_millis: ::std::option::Option, + pub(crate) audience_media: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl DescribeProgramOutputBuilder { @@ -265,6 +274,26 @@ impl DescribeProgramOutputBuilder { pub fn get_duration_millis(&self) -> &::std::option::Option { &self.duration_millis } + /// Appends an item to `audience_media`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + let mut v = self.audience_media.unwrap_or_default(); + v.push(input); + self.audience_media = ::std::option::Option::Some(v); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.audience_media = input; + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.audience_media + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -288,6 +317,7 @@ impl DescribeProgramOutputBuilder { vod_source_name: self.vod_source_name, clip_range: self.clip_range, duration_millis: self.duration_millis, + audience_media: self.audience_media, _request_id: self._request_id, } } diff --git a/sdk/mediatailor/src/operation/get_channel_schedule.rs b/sdk/mediatailor/src/operation/get_channel_schedule.rs index c24a36568683..65e45ca6fc2a 100644 --- a/sdk/mediatailor/src/operation/get_channel_schedule.rs +++ b/sdk/mediatailor/src/operation/get_channel_schedule.rs @@ -212,6 +212,11 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetChannelSc query.push_kv("nextToken", &::aws_smithy_http::query::fmt_string(inner_4)); } } + if let ::std::option::Option::Some(inner_5) = &_input.audience { + { + query.push_kv("audience", &::aws_smithy_http::query::fmt_string(inner_5)); + } + } ::std::result::Result::Ok(()) } #[allow(clippy::unnecessary_wraps)] diff --git a/sdk/mediatailor/src/operation/get_channel_schedule/_get_channel_schedule_input.rs b/sdk/mediatailor/src/operation/get_channel_schedule/_get_channel_schedule_input.rs index fdd822ac0184..13a5321eb9d4 100644 --- a/sdk/mediatailor/src/operation/get_channel_schedule/_get_channel_schedule_input.rs +++ b/sdk/mediatailor/src/operation/get_channel_schedule/_get_channel_schedule_input.rs @@ -14,6 +14,8 @@ pub struct GetChannelScheduleInput { ///

                For the second and subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request.

                ///

                If the previous response didn't include a NextToken element, there are no more channel schedules to get.

                pub next_token: ::std::option::Option<::std::string::String>, + ///

                The single audience for GetChannelScheduleRequest.

                + pub audience: ::std::option::Option<::std::string::String>, } impl GetChannelScheduleInput { ///

                The name of the channel associated with this Channel Schedule.

                @@ -35,6 +37,10 @@ impl GetChannelScheduleInput { pub fn next_token(&self) -> ::std::option::Option<&str> { self.next_token.as_deref() } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn audience(&self) -> ::std::option::Option<&str> { + self.audience.as_deref() + } } impl GetChannelScheduleInput { /// Creates a new builder-style object to manufacture [`GetChannelScheduleInput`](crate::operation::get_channel_schedule::GetChannelScheduleInput). @@ -51,6 +57,7 @@ pub struct GetChannelScheduleInputBuilder { pub(crate) duration_minutes: ::std::option::Option<::std::string::String>, pub(crate) max_results: ::std::option::Option, pub(crate) next_token: ::std::option::Option<::std::string::String>, + pub(crate) audience: ::std::option::Option<::std::string::String>, } impl GetChannelScheduleInputBuilder { ///

                The name of the channel associated with this Channel Schedule.

                @@ -119,6 +126,20 @@ impl GetChannelScheduleInputBuilder { pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { &self.next_token } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn audience(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.audience = ::std::option::Option::Some(input.into()); + self + } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn set_audience(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.audience = input; + self + } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn get_audience(&self) -> &::std::option::Option<::std::string::String> { + &self.audience + } /// Consumes the builder and constructs a [`GetChannelScheduleInput`](crate::operation::get_channel_schedule::GetChannelScheduleInput). pub fn build( self, @@ -129,6 +150,7 @@ impl GetChannelScheduleInputBuilder { duration_minutes: self.duration_minutes, max_results: self.max_results, next_token: self.next_token, + audience: self.audience, }) } } diff --git a/sdk/mediatailor/src/operation/get_channel_schedule/builders.rs b/sdk/mediatailor/src/operation/get_channel_schedule/builders.rs index 447a211f5b63..50b5a3b5f511 100644 --- a/sdk/mediatailor/src/operation/get_channel_schedule/builders.rs +++ b/sdk/mediatailor/src/operation/get_channel_schedule/builders.rs @@ -179,4 +179,18 @@ impl GetChannelScheduleFluentBuilder { pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> { self.inner.get_next_token() } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn audience(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.audience(input.into()); + self + } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn set_audience(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_audience(input); + self + } + ///

                The single audience for GetChannelScheduleRequest.

                + pub fn get_audience(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_audience() + } } diff --git a/sdk/mediatailor/src/operation/update_channel/_update_channel_input.rs b/sdk/mediatailor/src/operation/update_channel/_update_channel_input.rs index 2b4a66e8ebeb..1ab2a3b61b41 100644 --- a/sdk/mediatailor/src/operation/update_channel/_update_channel_input.rs +++ b/sdk/mediatailor/src/operation/update_channel/_update_channel_input.rs @@ -11,6 +11,8 @@ pub struct UpdateChannelInput { pub outputs: ::std::option::Option<::std::vec::Vec>, ///

                The time-shifted viewing configuration you want to associate to the channel.

                pub time_shift_configuration: ::std::option::Option, + ///

                The list of audiences defined in channel.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl UpdateChannelInput { ///

                The name of the channel.

                @@ -31,6 +33,12 @@ impl UpdateChannelInput { pub fn time_shift_configuration(&self) -> ::std::option::Option<&crate::types::TimeShiftConfiguration> { self.time_shift_configuration.as_ref() } + ///

                The list of audiences defined in channel.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl UpdateChannelInput { /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput). @@ -47,6 +55,7 @@ pub struct UpdateChannelInputBuilder { pub(crate) filler_slate: ::std::option::Option, pub(crate) outputs: ::std::option::Option<::std::vec::Vec>, pub(crate) time_shift_configuration: ::std::option::Option, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl UpdateChannelInputBuilder { ///

                The name of the channel.

                @@ -112,6 +121,26 @@ impl UpdateChannelInputBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { &self.time_shift_configuration } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput). pub fn build( self, @@ -121,6 +150,7 @@ impl UpdateChannelInputBuilder { filler_slate: self.filler_slate, outputs: self.outputs, time_shift_configuration: self.time_shift_configuration, + audiences: self.audiences, }) } } diff --git a/sdk/mediatailor/src/operation/update_channel/_update_channel_output.rs b/sdk/mediatailor/src/operation/update_channel/_update_channel_output.rs index 012bbd85fe9c..19176cf1ec33 100644 --- a/sdk/mediatailor/src/operation/update_channel/_update_channel_output.rs +++ b/sdk/mediatailor/src/operation/update_channel/_update_channel_output.rs @@ -27,6 +27,8 @@ pub struct UpdateChannelOutput { pub tier: ::std::option::Option<::std::string::String>, ///

                The time-shifted viewing configuration for the channel.

                pub time_shift_configuration: ::std::option::Option, + ///

                The list of audiences defined in channel.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, _request_id: Option, } impl UpdateChannelOutput { @@ -78,6 +80,12 @@ impl UpdateChannelOutput { pub fn time_shift_configuration(&self) -> ::std::option::Option<&crate::types::TimeShiftConfiguration> { self.time_shift_configuration.as_ref() } + ///

                The list of audiences defined in channel.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl ::aws_types::request_id::RequestId for UpdateChannelOutput { fn request_id(&self) -> Option<&str> { @@ -106,6 +114,7 @@ pub struct UpdateChannelOutputBuilder { pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, pub(crate) tier: ::std::option::Option<::std::string::String>, pub(crate) time_shift_configuration: ::std::option::Option, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, _request_id: Option, } impl UpdateChannelOutputBuilder { @@ -281,6 +290,26 @@ impl UpdateChannelOutputBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { &self.time_shift_configuration } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -304,6 +333,7 @@ impl UpdateChannelOutputBuilder { tags: self.tags, tier: self.tier, time_shift_configuration: self.time_shift_configuration, + audiences: self.audiences, _request_id: self._request_id, } } diff --git a/sdk/mediatailor/src/operation/update_channel/builders.rs b/sdk/mediatailor/src/operation/update_channel/builders.rs index ab3a80f2780e..9b377f6aa4f3 100644 --- a/sdk/mediatailor/src/operation/update_channel/builders.rs +++ b/sdk/mediatailor/src/operation/update_channel/builders.rs @@ -168,4 +168,22 @@ impl UpdateChannelFluentBuilder { pub fn get_time_shift_configuration(&self) -> &::std::option::Option { self.inner.get_time_shift_configuration() } + /// Appends an item to `Audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.audiences(input.into()); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.inner = self.inner.set_audiences(input); + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + self.inner.get_audiences() + } } diff --git a/sdk/mediatailor/src/operation/update_program/_update_program_input.rs b/sdk/mediatailor/src/operation/update_program/_update_program_input.rs index 5077baf89237..01b6f72b4501 100644 --- a/sdk/mediatailor/src/operation/update_program/_update_program_input.rs +++ b/sdk/mediatailor/src/operation/update_program/_update_program_input.rs @@ -11,6 +11,8 @@ pub struct UpdateProgramInput { pub program_name: ::std::option::Option<::std::string::String>, ///

                The schedule configuration settings.

                pub schedule_configuration: ::std::option::Option, + ///

                The list of AudienceMedia defined in program.

                + pub audience_media: ::std::option::Option<::std::vec::Vec>, } impl UpdateProgramInput { ///

                The ad break configuration settings.

                @@ -31,6 +33,12 @@ impl UpdateProgramInput { pub fn schedule_configuration(&self) -> ::std::option::Option<&crate::types::UpdateProgramScheduleConfiguration> { self.schedule_configuration.as_ref() } + ///

                The list of AudienceMedia defined in program.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audience_media.is_none()`. + pub fn audience_media(&self) -> &[crate::types::AudienceMedia] { + self.audience_media.as_deref().unwrap_or_default() + } } impl UpdateProgramInput { /// Creates a new builder-style object to manufacture [`UpdateProgramInput`](crate::operation::update_program::UpdateProgramInput). @@ -47,6 +55,7 @@ pub struct UpdateProgramInputBuilder { pub(crate) channel_name: ::std::option::Option<::std::string::String>, pub(crate) program_name: ::std::option::Option<::std::string::String>, pub(crate) schedule_configuration: ::std::option::Option, + pub(crate) audience_media: ::std::option::Option<::std::vec::Vec>, } impl UpdateProgramInputBuilder { /// Appends an item to `ad_breaks`. @@ -114,6 +123,26 @@ impl UpdateProgramInputBuilder { pub fn get_schedule_configuration(&self) -> &::std::option::Option { &self.schedule_configuration } + /// Appends an item to `audience_media`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + let mut v = self.audience_media.unwrap_or_default(); + v.push(input); + self.audience_media = ::std::option::Option::Some(v); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.audience_media = input; + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.audience_media + } /// Consumes the builder and constructs a [`UpdateProgramInput`](crate::operation::update_program::UpdateProgramInput). pub fn build( self, @@ -123,6 +152,7 @@ impl UpdateProgramInputBuilder { channel_name: self.channel_name, program_name: self.program_name, schedule_configuration: self.schedule_configuration, + audience_media: self.audience_media, }) } } diff --git a/sdk/mediatailor/src/operation/update_program/_update_program_output.rs b/sdk/mediatailor/src/operation/update_program/_update_program_output.rs index 6685c113cad5..f131a8e446bc 100644 --- a/sdk/mediatailor/src/operation/update_program/_update_program_output.rs +++ b/sdk/mediatailor/src/operation/update_program/_update_program_output.rs @@ -25,6 +25,8 @@ pub struct UpdateProgramOutput { pub duration_millis: ::std::option::Option, ///

                The scheduled start time for this Program.

                pub scheduled_start_time: ::std::option::Option<::aws_smithy_types::DateTime>, + ///

                The list of AudienceMedia defined in program.

                + pub audience_media: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl UpdateProgramOutput { @@ -74,6 +76,12 @@ impl UpdateProgramOutput { pub fn scheduled_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { self.scheduled_start_time.as_ref() } + ///

                The list of AudienceMedia defined in program.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audience_media.is_none()`. + pub fn audience_media(&self) -> &[crate::types::AudienceMedia] { + self.audience_media.as_deref().unwrap_or_default() + } } impl ::aws_types::request_id::RequestId for UpdateProgramOutput { fn request_id(&self) -> Option<&str> { @@ -102,6 +110,7 @@ pub struct UpdateProgramOutputBuilder { pub(crate) clip_range: ::std::option::Option, pub(crate) duration_millis: ::std::option::Option, pub(crate) scheduled_start_time: ::std::option::Option<::aws_smithy_types::DateTime>, + pub(crate) audience_media: ::std::option::Option<::std::vec::Vec>, _request_id: Option, } impl UpdateProgramOutputBuilder { @@ -265,6 +274,26 @@ impl UpdateProgramOutputBuilder { pub fn get_scheduled_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.scheduled_start_time } + /// Appends an item to `audience_media`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + let mut v = self.audience_media.unwrap_or_default(); + v.push(input); + self.audience_media = ::std::option::Option::Some(v); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.audience_media = input; + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.audience_media + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -288,6 +317,7 @@ impl UpdateProgramOutputBuilder { clip_range: self.clip_range, duration_millis: self.duration_millis, scheduled_start_time: self.scheduled_start_time, + audience_media: self.audience_media, _request_id: self._request_id, } } diff --git a/sdk/mediatailor/src/operation/update_program/builders.rs b/sdk/mediatailor/src/operation/update_program/builders.rs index fb38f397c3d3..b37f5397313f 100644 --- a/sdk/mediatailor/src/operation/update_program/builders.rs +++ b/sdk/mediatailor/src/operation/update_program/builders.rs @@ -168,4 +168,22 @@ impl UpdateProgramFluentBuilder { pub fn get_schedule_configuration(&self) -> &::std::option::Option { self.inner.get_schedule_configuration() } + /// Appends an item to `AudienceMedia`. + /// + /// To override the contents of this collection use [`set_audience_media`](Self::set_audience_media). + /// + ///

                The list of AudienceMedia defined in program.

                + pub fn audience_media(mut self, input: crate::types::AudienceMedia) -> Self { + self.inner = self.inner.audience_media(input); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn set_audience_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.inner = self.inner.set_audience_media(input); + self + } + ///

                The list of AudienceMedia defined in program.

                + pub fn get_audience_media(&self) -> &::std::option::Option<::std::vec::Vec> { + self.inner.get_audience_media() + } } diff --git a/sdk/mediatailor/src/protocol_serde.rs b/sdk/mediatailor/src/protocol_serde.rs index 4f8adcb88396..9f98fb83a854 100644 --- a/sdk/mediatailor/src/protocol_serde.rs +++ b/sdk/mediatailor/src/protocol_serde.rs @@ -161,6 +161,10 @@ pub(crate) mod shape_ad_break; pub(crate) mod shape_ad_break_opportunities; +pub(crate) mod shape_audience_media; + +pub(crate) mod shape_audiences; + pub(crate) mod shape_avail_suppression; pub(crate) mod shape_bumper; @@ -189,6 +193,8 @@ pub(crate) mod shape_list_of_ad_break; pub(crate) mod shape_list_of_alert; +pub(crate) mod shape_list_of_audience_media; + pub(crate) mod shape_list_of_channel; pub(crate) mod shape_list_of_live_source; @@ -241,6 +247,8 @@ pub(crate) mod shape_ad_marker_passthrough; pub(crate) mod shape_alert; +pub(crate) mod shape_alternate_media; + pub(crate) mod shape_avail_matching_criteria; pub(crate) mod shape_channel; @@ -279,6 +287,8 @@ pub(crate) mod shape_vod_source; pub(crate) mod shape_ad_break_metadata_list; +pub(crate) mod shape_list_of_alternate_media; + pub(crate) mod shape_list_of_schedule_ad_break; pub(crate) mod shape_list_of_string; diff --git a/sdk/mediatailor/src/protocol_serde/shape_alternate_media.rs b/sdk/mediatailor/src/protocol_serde/shape_alternate_media.rs new file mode 100644 index 000000000000..5ba679990387 --- /dev/null +++ b/sdk/mediatailor/src/protocol_serde/shape_alternate_media.rs @@ -0,0 +1,120 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_alternate_media( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::AlternateMedia, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.source_location_name { + object.key("SourceLocationName").string(var_1.as_str()); + } + if let Some(var_2) = &input.live_source_name { + object.key("LiveSourceName").string(var_2.as_str()); + } + if let Some(var_3) = &input.vod_source_name { + object.key("VodSourceName").string(var_3.as_str()); + } + if let Some(var_4) = &input.clip_range { + #[allow(unused_mut)] + let mut object_5 = object.key("ClipRange").start_object(); + crate::protocol_serde::shape_clip_range::ser_clip_range(&mut object_5, var_4)?; + object_5.finish(); + } + if let Some(var_6) = &input.scheduled_start_time_millis { + object.key("ScheduledStartTimeMillis").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_6).into()), + ); + } + if let Some(var_7) = &input.ad_breaks { + let mut array_8 = object.key("AdBreaks").start_array(); + for item_9 in var_7 { + { + #[allow(unused_mut)] + let mut object_10 = array_8.value().start_object(); + crate::protocol_serde::shape_ad_break::ser_ad_break(&mut object_10, item_9)?; + object_10.finish(); + } + } + array_8.finish(); + } + if let Some(var_11) = &input.duration_millis { + object.key("DurationMillis").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_11).into()), + ); + } + Ok(()) +} + +pub(crate) fn de_alternate_media<'a, I>( + tokens: &mut ::std::iter::Peekable, +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +where + I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, +{ + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), + Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { + #[allow(unused_mut)] + let mut builder = crate::types::builders::AlternateMediaBuilder::default(); + loop { + match tokens.next().transpose()? { + Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, + Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { + "SourceLocationName" => { + builder = builder.set_source_location_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "LiveSourceName" => { + builder = builder.set_live_source_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "VodSourceName" => { + builder = builder.set_vod_source_name( + ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?, + ); + } + "ClipRange" => { + builder = builder.set_clip_range(crate::protocol_serde::shape_clip_range::de_clip_range(tokens)?); + } + "ScheduledStartTimeMillis" => { + builder = builder.set_scheduled_start_time_millis( + ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? + .map(i64::try_from) + .transpose()?, + ); + } + "AdBreaks" => { + builder = builder.set_ad_breaks(crate::protocol_serde::shape_list_of_ad_break::de_list_of_ad_break(tokens)?); + } + "DurationMillis" => { + builder = builder.set_duration_millis( + ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? + .map(i64::try_from) + .transpose()?, + ); + } + _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, + }, + other => { + return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!( + "expected object key or end object, found: {:?}", + other + ))) + } + } + } + Ok(Some(builder.build())) + } + _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( + "expected start object or null", + )), + } +} diff --git a/sdk/iotroborunner/src/protocol_serde/shape_site.rs b/sdk/mediatailor/src/protocol_serde/shape_audience_media.rs similarity index 50% rename from sdk/iotroborunner/src/protocol_serde/shape_site.rs rename to sdk/mediatailor/src/protocol_serde/shape_audience_media.rs index adefdb0f4bc1..5d92084c1619 100644 --- a/sdk/iotroborunner/src/protocol_serde/shape_site.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_audience_media.rs @@ -1,7 +1,29 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_site<'a, I>( +pub fn ser_audience_media( + object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, + input: &crate::types::AudienceMedia, +) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { + if let Some(var_1) = &input.audience { + object.key("Audience").string(var_1.as_str()); + } + if let Some(var_2) = &input.alternate_media { + let mut array_3 = object.key("AlternateMedia").start_array(); + for item_4 in var_2 { + { + #[allow(unused_mut)] + let mut object_5 = array_3.value().start_object(); + crate::protocol_serde::shape_alternate_media::ser_alternate_media(&mut object_5, item_4)?; + object_5.finish(); + } + } + array_3.finish(); + } + Ok(()) +} + +pub(crate) fn de_audience_media<'a, I>( tokens: &mut ::std::iter::Peekable, -) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> +) -> Result, ::aws_smithy_json::deserialize::error::DeserializeError> where I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, { @@ -9,37 +31,21 @@ where Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] - let mut builder = crate::types::builders::SiteBuilder::default(); + let mut builder = crate::types::builders::AudienceMediaBuilder::default(); loop { match tokens.next().transpose()? { Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break, Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() { - "arn" => { - builder = builder.set_arn( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "name" => { - builder = builder.set_name( - ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? - .map(|s| s.to_unescaped().map(|u| u.into_owned())) - .transpose()?, - ); - } - "countryCode" => { - builder = builder.set_country_code( + "Audience" => { + builder = builder.set_audience( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } - "createdAt" => { - builder = builder.set_created_at(::aws_smithy_json::deserialize::token::expect_timestamp_or_null( - tokens.next(), - ::aws_smithy_types::date_time::Format::EpochSeconds, - )?); + "AlternateMedia" => { + builder = builder + .set_alternate_media(crate::protocol_serde::shape_list_of_alternate_media::de_list_of_alternate_media(tokens)?); } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, @@ -51,9 +57,7 @@ where } } } - Ok(Some(crate::serde_util::site_correct_errors(builder).build().map_err(|err| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) - })?)) + Ok(Some(builder.build())) } _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( "expected start object or null", diff --git a/sdk/iotroborunner/src/protocol_serde/shape_destinations.rs b/sdk/mediatailor/src/protocol_serde/shape_audiences.rs similarity index 74% rename from sdk/iotroborunner/src/protocol_serde/shape_destinations.rs rename to sdk/mediatailor/src/protocol_serde/shape_audiences.rs index b3d3249828dc..6b0f5d4632f8 100644 --- a/sdk/iotroborunner/src/protocol_serde/shape_destinations.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_audiences.rs @@ -1,7 +1,7 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_destinations<'a, I>( +pub(crate) fn de_audiences<'a, I>( tokens: &mut ::std::iter::Peekable, -) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> where I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, { @@ -16,7 +16,9 @@ where break; } _ => { - let value = crate::protocol_serde::shape_destination::de_destination(tokens)?; + let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? + .map(|s| s.to_unescaped().map(|u| u.into_owned())) + .transpose()?; if let Some(value) = value { items.push(value); } diff --git a/sdk/mediatailor/src/protocol_serde/shape_channel.rs b/sdk/mediatailor/src/protocol_serde/shape_channel.rs index dc64ca02b742..a4c15bc9e4d2 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_channel.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_channel.rs @@ -75,6 +75,9 @@ where crate::protocol_serde::shape_log_configuration_for_channel::de_log_configuration_for_channel(tokens)?, ); } + "Audiences" => { + builder = builder.set_audiences(crate::protocol_serde::shape_audiences::de_audiences(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/mediatailor/src/protocol_serde/shape_clip_range.rs b/sdk/mediatailor/src/protocol_serde/shape_clip_range.rs index cfc7801d70ff..d99ac6118046 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_clip_range.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_clip_range.rs @@ -21,6 +21,13 @@ where .transpose()?, ); } + "StartOffsetMillis" => { + builder = builder.set_start_offset_millis( + ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())? + .map(i64::try_from) + .transpose()?, + ); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { @@ -31,9 +38,7 @@ where } } } - Ok(Some(crate::serde_util::clip_range_correct_errors(builder).build().map_err(|err| { - ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err) - })?)) + Ok(Some(builder.build())) } _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom( "expected start object or null", @@ -45,11 +50,17 @@ pub fn ser_clip_range( object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::types::ClipRange, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - { + if input.end_offset_millis != 0 { object.key("EndOffsetMillis").number( #[allow(clippy::useless_conversion)] ::aws_smithy_types::Number::NegInt((input.end_offset_millis).into()), ); } + if let Some(var_1) = &input.start_offset_millis { + object.key("StartOffsetMillis").number( + #[allow(clippy::useless_conversion)] + ::aws_smithy_types::Number::NegInt((*var_1).into()), + ); + } Ok(()) } diff --git a/sdk/mediatailor/src/protocol_serde/shape_create_channel.rs b/sdk/mediatailor/src/protocol_serde/shape_create_channel.rs index a83949345d9c..55fe645bedba 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_create_channel.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_create_channel.rs @@ -57,6 +57,9 @@ pub(crate) fn de_create_channel( .transpose()?, ); } + "Audiences" => { + builder = builder.set_audiences(crate::protocol_serde::shape_audiences::de_audiences(tokens)?); + } "ChannelName" => { builder = builder.set_channel_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/mediatailor/src/protocol_serde/shape_create_channel_input.rs b/sdk/mediatailor/src/protocol_serde/shape_create_channel_input.rs index 427d288e4f10..5184a08c7df0 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_create_channel_input.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_create_channel_input.rs @@ -3,45 +3,54 @@ pub fn ser_create_channel_input_input( object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::operation::create_channel::CreateChannelInput, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.filler_slate { + if let Some(var_1) = &input.audiences { + let mut array_2 = object.key("Audiences").start_array(); + for item_3 in var_1 { + { + array_2.value().string(item_3.as_str()); + } + } + array_2.finish(); + } + if let Some(var_4) = &input.filler_slate { #[allow(unused_mut)] - let mut object_2 = object.key("FillerSlate").start_object(); - crate::protocol_serde::shape_slate_source::ser_slate_source(&mut object_2, var_1)?; - object_2.finish(); + let mut object_5 = object.key("FillerSlate").start_object(); + crate::protocol_serde::shape_slate_source::ser_slate_source(&mut object_5, var_4)?; + object_5.finish(); } - if let Some(var_3) = &input.outputs { - let mut array_4 = object.key("Outputs").start_array(); - for item_5 in var_3 { + if let Some(var_6) = &input.outputs { + let mut array_7 = object.key("Outputs").start_array(); + for item_8 in var_6 { { #[allow(unused_mut)] - let mut object_6 = array_4.value().start_object(); - crate::protocol_serde::shape_request_output_item::ser_request_output_item(&mut object_6, item_5)?; - object_6.finish(); + let mut object_9 = array_7.value().start_object(); + crate::protocol_serde::shape_request_output_item::ser_request_output_item(&mut object_9, item_8)?; + object_9.finish(); } } - array_4.finish(); + array_7.finish(); } - if let Some(var_7) = &input.playback_mode { - object.key("PlaybackMode").string(var_7.as_str()); + if let Some(var_10) = &input.playback_mode { + object.key("PlaybackMode").string(var_10.as_str()); } - if let Some(var_8) = &input.tags { + if let Some(var_11) = &input.tags { #[allow(unused_mut)] - let mut object_9 = object.key("tags").start_object(); - for (key_10, value_11) in var_8 { + let mut object_12 = object.key("tags").start_object(); + for (key_13, value_14) in var_11 { { - object_9.key(key_10.as_str()).string(value_11.as_str()); + object_12.key(key_13.as_str()).string(value_14.as_str()); } } - object_9.finish(); + object_12.finish(); } - if let Some(var_12) = &input.tier { - object.key("Tier").string(var_12.as_str()); + if let Some(var_15) = &input.tier { + object.key("Tier").string(var_15.as_str()); } - if let Some(var_13) = &input.time_shift_configuration { + if let Some(var_16) = &input.time_shift_configuration { #[allow(unused_mut)] - let mut object_14 = object.key("TimeShiftConfiguration").start_object(); - crate::protocol_serde::shape_time_shift_configuration::ser_time_shift_configuration(&mut object_14, var_13)?; - object_14.finish(); + let mut object_17 = object.key("TimeShiftConfiguration").start_object(); + crate::protocol_serde::shape_time_shift_configuration::ser_time_shift_configuration(&mut object_17, var_16)?; + object_17.finish(); } Ok(()) } diff --git a/sdk/mediatailor/src/protocol_serde/shape_create_program.rs b/sdk/mediatailor/src/protocol_serde/shape_create_program.rs index 1c0e868f7d00..763c804352f8 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_create_program.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_create_program.rs @@ -60,6 +60,9 @@ pub(crate) fn de_create_program( .transpose()?, ); } + "AudienceMedia" => { + builder = builder.set_audience_media(crate::protocol_serde::shape_list_of_audience_media::de_list_of_audience_media(tokens)?); + } "ChannelName" => { builder = builder.set_channel_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/mediatailor/src/protocol_serde/shape_create_program_input.rs b/sdk/mediatailor/src/protocol_serde/shape_create_program_input.rs index 7894f201c047..68e1df63f26f 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_create_program_input.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_create_program_input.rs @@ -15,20 +15,32 @@ pub fn ser_create_program_input_input( } array_2.finish(); } - if let Some(var_5) = &input.live_source_name { - object.key("LiveSourceName").string(var_5.as_str()); + if let Some(var_5) = &input.audience_media { + let mut array_6 = object.key("AudienceMedia").start_array(); + for item_7 in var_5 { + { + #[allow(unused_mut)] + let mut object_8 = array_6.value().start_object(); + crate::protocol_serde::shape_audience_media::ser_audience_media(&mut object_8, item_7)?; + object_8.finish(); + } + } + array_6.finish(); + } + if let Some(var_9) = &input.live_source_name { + object.key("LiveSourceName").string(var_9.as_str()); } - if let Some(var_6) = &input.schedule_configuration { + if let Some(var_10) = &input.schedule_configuration { #[allow(unused_mut)] - let mut object_7 = object.key("ScheduleConfiguration").start_object(); - crate::protocol_serde::shape_schedule_configuration::ser_schedule_configuration(&mut object_7, var_6)?; - object_7.finish(); + let mut object_11 = object.key("ScheduleConfiguration").start_object(); + crate::protocol_serde::shape_schedule_configuration::ser_schedule_configuration(&mut object_11, var_10)?; + object_11.finish(); } - if let Some(var_8) = &input.source_location_name { - object.key("SourceLocationName").string(var_8.as_str()); + if let Some(var_12) = &input.source_location_name { + object.key("SourceLocationName").string(var_12.as_str()); } - if let Some(var_9) = &input.vod_source_name { - object.key("VodSourceName").string(var_9.as_str()); + if let Some(var_13) = &input.vod_source_name { + object.key("VodSourceName").string(var_13.as_str()); } Ok(()) } diff --git a/sdk/mediatailor/src/protocol_serde/shape_describe_channel.rs b/sdk/mediatailor/src/protocol_serde/shape_describe_channel.rs index 81103abfd1ab..74498c5912f8 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_describe_channel.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_describe_channel.rs @@ -47,6 +47,9 @@ pub(crate) fn de_describe_channel( .transpose()?, ); } + "Audiences" => { + builder = builder.set_audiences(crate::protocol_serde::shape_audiences::de_audiences(tokens)?); + } "ChannelName" => { builder = builder.set_channel_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/mediatailor/src/protocol_serde/shape_describe_program.rs b/sdk/mediatailor/src/protocol_serde/shape_describe_program.rs index ae5d3dc7049c..b4040b97af38 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_describe_program.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_describe_program.rs @@ -50,6 +50,9 @@ pub(crate) fn de_describe_program( .transpose()?, ); } + "AudienceMedia" => { + builder = builder.set_audience_media(crate::protocol_serde::shape_list_of_audience_media::de_list_of_audience_media(tokens)?); + } "ChannelName" => { builder = builder.set_channel_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/iotroborunner/src/protocol_serde/shape_sites.rs b/sdk/mediatailor/src/protocol_serde/shape_list_of_alternate_media.rs similarity index 84% rename from sdk/iotroborunner/src/protocol_serde/shape_sites.rs rename to sdk/mediatailor/src/protocol_serde/shape_list_of_alternate_media.rs index d0cdb4852424..32d1b5a4a720 100644 --- a/sdk/iotroborunner/src/protocol_serde/shape_sites.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_list_of_alternate_media.rs @@ -1,7 +1,7 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_sites<'a, I>( +pub(crate) fn de_list_of_alternate_media<'a, I>( tokens: &mut ::std::iter::Peekable, -) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> where I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, { @@ -16,7 +16,7 @@ where break; } _ => { - let value = crate::protocol_serde::shape_site::de_site(tokens)?; + let value = crate::protocol_serde::shape_alternate_media::de_alternate_media(tokens)?; if let Some(value) = value { items.push(value); } diff --git a/sdk/iotroborunner/src/protocol_serde/shape_workers.rs b/sdk/mediatailor/src/protocol_serde/shape_list_of_audience_media.rs similarity index 84% rename from sdk/iotroborunner/src/protocol_serde/shape_workers.rs rename to sdk/mediatailor/src/protocol_serde/shape_list_of_audience_media.rs index cd042acf1b82..1fc47f0864d1 100644 --- a/sdk/iotroborunner/src/protocol_serde/shape_workers.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_list_of_audience_media.rs @@ -1,7 +1,7 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -pub(crate) fn de_workers<'a, I>( +pub(crate) fn de_list_of_audience_media<'a, I>( tokens: &mut ::std::iter::Peekable, -) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> +) -> Result>, ::aws_smithy_json::deserialize::error::DeserializeError> where I: Iterator, ::aws_smithy_json::deserialize::error::DeserializeError>>, { @@ -16,7 +16,7 @@ where break; } _ => { - let value = crate::protocol_serde::shape_worker::de_worker(tokens)?; + let value = crate::protocol_serde::shape_audience_media::de_audience_media(tokens)?; if let Some(value) = value { items.push(value); } diff --git a/sdk/mediatailor/src/protocol_serde/shape_schedule_entry.rs b/sdk/mediatailor/src/protocol_serde/shape_schedule_entry.rs index 37f0061483a8..153ae0379685 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_schedule_entry.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_schedule_entry.rs @@ -81,6 +81,9 @@ where .transpose()?, ); } + "Audiences" => { + builder = builder.set_audiences(crate::protocol_serde::shape_audiences::de_audiences(tokens)?); + } _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, }, other => { diff --git a/sdk/mediatailor/src/protocol_serde/shape_update_channel.rs b/sdk/mediatailor/src/protocol_serde/shape_update_channel.rs index d38012a787a0..f07808e76d05 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_update_channel.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_update_channel.rs @@ -57,6 +57,9 @@ pub(crate) fn de_update_channel( .transpose()?, ); } + "Audiences" => { + builder = builder.set_audiences(crate::protocol_serde::shape_audiences::de_audiences(tokens)?); + } "ChannelName" => { builder = builder.set_channel_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/mediatailor/src/protocol_serde/shape_update_channel_input.rs b/sdk/mediatailor/src/protocol_serde/shape_update_channel_input.rs index 6f5c55559ea1..0f3a12a9f543 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_update_channel_input.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_update_channel_input.rs @@ -3,29 +3,38 @@ pub fn ser_update_channel_input_input( object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, input: &crate::operation::update_channel::UpdateChannelInput, ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { - if let Some(var_1) = &input.filler_slate { + if let Some(var_1) = &input.audiences { + let mut array_2 = object.key("Audiences").start_array(); + for item_3 in var_1 { + { + array_2.value().string(item_3.as_str()); + } + } + array_2.finish(); + } + if let Some(var_4) = &input.filler_slate { #[allow(unused_mut)] - let mut object_2 = object.key("FillerSlate").start_object(); - crate::protocol_serde::shape_slate_source::ser_slate_source(&mut object_2, var_1)?; - object_2.finish(); + let mut object_5 = object.key("FillerSlate").start_object(); + crate::protocol_serde::shape_slate_source::ser_slate_source(&mut object_5, var_4)?; + object_5.finish(); } - if let Some(var_3) = &input.outputs { - let mut array_4 = object.key("Outputs").start_array(); - for item_5 in var_3 { + if let Some(var_6) = &input.outputs { + let mut array_7 = object.key("Outputs").start_array(); + for item_8 in var_6 { { #[allow(unused_mut)] - let mut object_6 = array_4.value().start_object(); - crate::protocol_serde::shape_request_output_item::ser_request_output_item(&mut object_6, item_5)?; - object_6.finish(); + let mut object_9 = array_7.value().start_object(); + crate::protocol_serde::shape_request_output_item::ser_request_output_item(&mut object_9, item_8)?; + object_9.finish(); } } - array_4.finish(); + array_7.finish(); } - if let Some(var_7) = &input.time_shift_configuration { + if let Some(var_10) = &input.time_shift_configuration { #[allow(unused_mut)] - let mut object_8 = object.key("TimeShiftConfiguration").start_object(); - crate::protocol_serde::shape_time_shift_configuration::ser_time_shift_configuration(&mut object_8, var_7)?; - object_8.finish(); + let mut object_11 = object.key("TimeShiftConfiguration").start_object(); + crate::protocol_serde::shape_time_shift_configuration::ser_time_shift_configuration(&mut object_11, var_10)?; + object_11.finish(); } Ok(()) } diff --git a/sdk/mediatailor/src/protocol_serde/shape_update_program.rs b/sdk/mediatailor/src/protocol_serde/shape_update_program.rs index 726b3165e301..f3c53bb2eb9d 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_update_program.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_update_program.rs @@ -60,6 +60,9 @@ pub(crate) fn de_update_program( .transpose()?, ); } + "AudienceMedia" => { + builder = builder.set_audience_media(crate::protocol_serde::shape_list_of_audience_media::de_list_of_audience_media(tokens)?); + } "ChannelName" => { builder = builder.set_channel_name( ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())? diff --git a/sdk/mediatailor/src/protocol_serde/shape_update_program_input.rs b/sdk/mediatailor/src/protocol_serde/shape_update_program_input.rs index 751ed9017646..b8b1891770ee 100644 --- a/sdk/mediatailor/src/protocol_serde/shape_update_program_input.rs +++ b/sdk/mediatailor/src/protocol_serde/shape_update_program_input.rs @@ -15,11 +15,23 @@ pub fn ser_update_program_input_input( } array_2.finish(); } - if let Some(var_5) = &input.schedule_configuration { + if let Some(var_5) = &input.audience_media { + let mut array_6 = object.key("AudienceMedia").start_array(); + for item_7 in var_5 { + { + #[allow(unused_mut)] + let mut object_8 = array_6.value().start_object(); + crate::protocol_serde::shape_audience_media::ser_audience_media(&mut object_8, item_7)?; + object_8.finish(); + } + } + array_6.finish(); + } + if let Some(var_9) = &input.schedule_configuration { #[allow(unused_mut)] - let mut object_6 = object.key("ScheduleConfiguration").start_object(); - crate::protocol_serde::shape_update_program_schedule_configuration::ser_update_program_schedule_configuration(&mut object_6, var_5)?; - object_6.finish(); + let mut object_10 = object.key("ScheduleConfiguration").start_object(); + crate::protocol_serde::shape_update_program_schedule_configuration::ser_update_program_schedule_configuration(&mut object_10, var_9)?; + object_10.finish(); } Ok(()) } diff --git a/sdk/mediatailor/src/serde_util.rs b/sdk/mediatailor/src/serde_util.rs index 99222c0b86b4..4bc32d692810 100644 --- a/sdk/mediatailor/src/serde_util.rs +++ b/sdk/mediatailor/src/serde_util.rs @@ -20,13 +20,6 @@ pub(crate) fn describe_channel_output_output_correct_errors( builder } -pub(crate) fn clip_range_correct_errors(mut builder: crate::types::builders::ClipRangeBuilder) -> crate::types::builders::ClipRangeBuilder { - if builder.end_offset_millis.is_none() { - builder.end_offset_millis = Some(Default::default()) - } - builder -} - pub(crate) fn http_configuration_correct_errors( mut builder: crate::types::builders::HttpConfigurationBuilder, ) -> crate::types::builders::HttpConfigurationBuilder { diff --git a/sdk/mediatailor/src/types.rs b/sdk/mediatailor/src/types.rs index 0ef0eb2fee46..39e1596f7825 100644 --- a/sdk/mediatailor/src/types.rs +++ b/sdk/mediatailor/src/types.rs @@ -93,7 +93,9 @@ pub use crate::types::_log_configuration_for_channel::LogConfigurationForChannel pub use crate::types::_channel::Channel; -pub use crate::types::_clip_range::ClipRange; +pub use crate::types::_audience_media::AudienceMedia; + +pub use crate::types::_alternate_media::AlternateMedia; pub use crate::types::_ad_break::AdBreak; @@ -107,6 +109,8 @@ pub use crate::types::_splice_insert_message::SpliceInsertMessage; pub use crate::types::_message_type::MessageType; +pub use crate::types::_clip_range::ClipRange; + pub use crate::types::_update_program_schedule_configuration::UpdateProgramScheduleConfiguration; pub use crate::types::_update_program_transition::UpdateProgramTransition; @@ -137,6 +141,10 @@ mod _alert; mod _alert_category; +mod _alternate_media; + +mod _audience_media; + mod _avail_matching_criteria; mod _avail_suppression; diff --git a/sdk/mediatailor/src/types/_alternate_media.rs b/sdk/mediatailor/src/types/_alternate_media.rs new file mode 100644 index 000000000000..883826dd6fad --- /dev/null +++ b/sdk/mediatailor/src/types/_alternate_media.rs @@ -0,0 +1,190 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

                A playlist of media (VOD and/or live) to be played instead of the default media on a particular program.

                +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct AlternateMedia { + ///

                The name of the source location for alternateMedia.

                + pub source_location_name: ::std::option::Option<::std::string::String>, + ///

                The name of the live source for alternateMedia.

                + pub live_source_name: ::std::option::Option<::std::string::String>, + ///

                The name of the VOD source for alternateMedia.

                + pub vod_source_name: ::std::option::Option<::std::string::String>, + ///

                Clip range configuration for the VOD source associated with the program.

                + pub clip_range: ::std::option::Option, + ///

                The date and time that the alternateMedia is scheduled to start, in epoch milliseconds.

                + pub scheduled_start_time_millis: ::std::option::Option, + ///

                Ad break configuration parameters defined in AlternateMedia.

                + pub ad_breaks: ::std::option::Option<::std::vec::Vec>, + ///

                The duration of the alternateMedia in milliseconds.

                + pub duration_millis: ::std::option::Option, +} +impl AlternateMedia { + ///

                The name of the source location for alternateMedia.

                + pub fn source_location_name(&self) -> ::std::option::Option<&str> { + self.source_location_name.as_deref() + } + ///

                The name of the live source for alternateMedia.

                + pub fn live_source_name(&self) -> ::std::option::Option<&str> { + self.live_source_name.as_deref() + } + ///

                The name of the VOD source for alternateMedia.

                + pub fn vod_source_name(&self) -> ::std::option::Option<&str> { + self.vod_source_name.as_deref() + } + ///

                Clip range configuration for the VOD source associated with the program.

                + pub fn clip_range(&self) -> ::std::option::Option<&crate::types::ClipRange> { + self.clip_range.as_ref() + } + ///

                The date and time that the alternateMedia is scheduled to start, in epoch milliseconds.

                + pub fn scheduled_start_time_millis(&self) -> ::std::option::Option { + self.scheduled_start_time_millis + } + ///

                Ad break configuration parameters defined in AlternateMedia.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ad_breaks.is_none()`. + pub fn ad_breaks(&self) -> &[crate::types::AdBreak] { + self.ad_breaks.as_deref().unwrap_or_default() + } + ///

                The duration of the alternateMedia in milliseconds.

                + pub fn duration_millis(&self) -> ::std::option::Option { + self.duration_millis + } +} +impl AlternateMedia { + /// Creates a new builder-style object to manufacture [`AlternateMedia`](crate::types::AlternateMedia). + pub fn builder() -> crate::types::builders::AlternateMediaBuilder { + crate::types::builders::AlternateMediaBuilder::default() + } +} + +/// A builder for [`AlternateMedia`](crate::types::AlternateMedia). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct AlternateMediaBuilder { + pub(crate) source_location_name: ::std::option::Option<::std::string::String>, + pub(crate) live_source_name: ::std::option::Option<::std::string::String>, + pub(crate) vod_source_name: ::std::option::Option<::std::string::String>, + pub(crate) clip_range: ::std::option::Option, + pub(crate) scheduled_start_time_millis: ::std::option::Option, + pub(crate) ad_breaks: ::std::option::Option<::std::vec::Vec>, + pub(crate) duration_millis: ::std::option::Option, +} +impl AlternateMediaBuilder { + ///

                The name of the source location for alternateMedia.

                + pub fn source_location_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.source_location_name = ::std::option::Option::Some(input.into()); + self + } + ///

                The name of the source location for alternateMedia.

                + pub fn set_source_location_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.source_location_name = input; + self + } + ///

                The name of the source location for alternateMedia.

                + pub fn get_source_location_name(&self) -> &::std::option::Option<::std::string::String> { + &self.source_location_name + } + ///

                The name of the live source for alternateMedia.

                + pub fn live_source_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.live_source_name = ::std::option::Option::Some(input.into()); + self + } + ///

                The name of the live source for alternateMedia.

                + pub fn set_live_source_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.live_source_name = input; + self + } + ///

                The name of the live source for alternateMedia.

                + pub fn get_live_source_name(&self) -> &::std::option::Option<::std::string::String> { + &self.live_source_name + } + ///

                The name of the VOD source for alternateMedia.

                + pub fn vod_source_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.vod_source_name = ::std::option::Option::Some(input.into()); + self + } + ///

                The name of the VOD source for alternateMedia.

                + pub fn set_vod_source_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.vod_source_name = input; + self + } + ///

                The name of the VOD source for alternateMedia.

                + pub fn get_vod_source_name(&self) -> &::std::option::Option<::std::string::String> { + &self.vod_source_name + } + ///

                Clip range configuration for the VOD source associated with the program.

                + pub fn clip_range(mut self, input: crate::types::ClipRange) -> Self { + self.clip_range = ::std::option::Option::Some(input); + self + } + ///

                Clip range configuration for the VOD source associated with the program.

                + pub fn set_clip_range(mut self, input: ::std::option::Option) -> Self { + self.clip_range = input; + self + } + ///

                Clip range configuration for the VOD source associated with the program.

                + pub fn get_clip_range(&self) -> &::std::option::Option { + &self.clip_range + } + ///

                The date and time that the alternateMedia is scheduled to start, in epoch milliseconds.

                + pub fn scheduled_start_time_millis(mut self, input: i64) -> Self { + self.scheduled_start_time_millis = ::std::option::Option::Some(input); + self + } + ///

                The date and time that the alternateMedia is scheduled to start, in epoch milliseconds.

                + pub fn set_scheduled_start_time_millis(mut self, input: ::std::option::Option) -> Self { + self.scheduled_start_time_millis = input; + self + } + ///

                The date and time that the alternateMedia is scheduled to start, in epoch milliseconds.

                + pub fn get_scheduled_start_time_millis(&self) -> &::std::option::Option { + &self.scheduled_start_time_millis + } + /// Appends an item to `ad_breaks`. + /// + /// To override the contents of this collection use [`set_ad_breaks`](Self::set_ad_breaks). + /// + ///

                Ad break configuration parameters defined in AlternateMedia.

                + pub fn ad_breaks(mut self, input: crate::types::AdBreak) -> Self { + let mut v = self.ad_breaks.unwrap_or_default(); + v.push(input); + self.ad_breaks = ::std::option::Option::Some(v); + self + } + ///

                Ad break configuration parameters defined in AlternateMedia.

                + pub fn set_ad_breaks(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.ad_breaks = input; + self + } + ///

                Ad break configuration parameters defined in AlternateMedia.

                + pub fn get_ad_breaks(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.ad_breaks + } + ///

                The duration of the alternateMedia in milliseconds.

                + pub fn duration_millis(mut self, input: i64) -> Self { + self.duration_millis = ::std::option::Option::Some(input); + self + } + ///

                The duration of the alternateMedia in milliseconds.

                + pub fn set_duration_millis(mut self, input: ::std::option::Option) -> Self { + self.duration_millis = input; + self + } + ///

                The duration of the alternateMedia in milliseconds.

                + pub fn get_duration_millis(&self) -> &::std::option::Option { + &self.duration_millis + } + /// Consumes the builder and constructs a [`AlternateMedia`](crate::types::AlternateMedia). + pub fn build(self) -> crate::types::AlternateMedia { + crate::types::AlternateMedia { + source_location_name: self.source_location_name, + live_source_name: self.live_source_name, + vod_source_name: self.vod_source_name, + clip_range: self.clip_range, + scheduled_start_time_millis: self.scheduled_start_time_millis, + ad_breaks: self.ad_breaks, + duration_millis: self.duration_millis, + } + } +} diff --git a/sdk/mediatailor/src/types/_audience_media.rs b/sdk/mediatailor/src/types/_audience_media.rs new file mode 100644 index 000000000000..505328975ef4 --- /dev/null +++ b/sdk/mediatailor/src/types/_audience_media.rs @@ -0,0 +1,80 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

                An AudienceMedia object contains an Audience and a list of AlternateMedia.

                +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct AudienceMedia { + ///

                The Audience defined in AudienceMedia.

                + pub audience: ::std::option::Option<::std::string::String>, + ///

                The list of AlternateMedia defined in AudienceMedia.

                + pub alternate_media: ::std::option::Option<::std::vec::Vec>, +} +impl AudienceMedia { + ///

                The Audience defined in AudienceMedia.

                + pub fn audience(&self) -> ::std::option::Option<&str> { + self.audience.as_deref() + } + ///

                The list of AlternateMedia defined in AudienceMedia.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.alternate_media.is_none()`. + pub fn alternate_media(&self) -> &[crate::types::AlternateMedia] { + self.alternate_media.as_deref().unwrap_or_default() + } +} +impl AudienceMedia { + /// Creates a new builder-style object to manufacture [`AudienceMedia`](crate::types::AudienceMedia). + pub fn builder() -> crate::types::builders::AudienceMediaBuilder { + crate::types::builders::AudienceMediaBuilder::default() + } +} + +/// A builder for [`AudienceMedia`](crate::types::AudienceMedia). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct AudienceMediaBuilder { + pub(crate) audience: ::std::option::Option<::std::string::String>, + pub(crate) alternate_media: ::std::option::Option<::std::vec::Vec>, +} +impl AudienceMediaBuilder { + ///

                The Audience defined in AudienceMedia.

                + pub fn audience(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.audience = ::std::option::Option::Some(input.into()); + self + } + ///

                The Audience defined in AudienceMedia.

                + pub fn set_audience(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.audience = input; + self + } + ///

                The Audience defined in AudienceMedia.

                + pub fn get_audience(&self) -> &::std::option::Option<::std::string::String> { + &self.audience + } + /// Appends an item to `alternate_media`. + /// + /// To override the contents of this collection use [`set_alternate_media`](Self::set_alternate_media). + /// + ///

                The list of AlternateMedia defined in AudienceMedia.

                + pub fn alternate_media(mut self, input: crate::types::AlternateMedia) -> Self { + let mut v = self.alternate_media.unwrap_or_default(); + v.push(input); + self.alternate_media = ::std::option::Option::Some(v); + self + } + ///

                The list of AlternateMedia defined in AudienceMedia.

                + pub fn set_alternate_media(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.alternate_media = input; + self + } + ///

                The list of AlternateMedia defined in AudienceMedia.

                + pub fn get_alternate_media(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.alternate_media + } + /// Consumes the builder and constructs a [`AudienceMedia`](crate::types::AudienceMedia). + pub fn build(self) -> crate::types::AudienceMedia { + crate::types::AudienceMedia { + audience: self.audience, + alternate_media: self.alternate_media, + } + } +} diff --git a/sdk/mediatailor/src/types/_channel.rs b/sdk/mediatailor/src/types/_channel.rs index 03cf4117b3ec..e4b8ecb78aa4 100644 --- a/sdk/mediatailor/src/types/_channel.rs +++ b/sdk/mediatailor/src/types/_channel.rs @@ -28,6 +28,8 @@ pub struct Channel { pub tier: ::std::string::String, ///

                The log configuration.

                pub log_configuration: ::std::option::Option, + ///

                The list of audiences defined in channel.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl Channel { ///

                The ARN of the channel.

                @@ -82,6 +84,12 @@ impl Channel { pub fn log_configuration(&self) -> ::std::option::Option<&crate::types::LogConfigurationForChannel> { self.log_configuration.as_ref() } + ///

                The list of audiences defined in channel.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl Channel { /// Creates a new builder-style object to manufacture [`Channel`](crate::types::Channel). @@ -105,6 +113,7 @@ pub struct ChannelBuilder { pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, pub(crate) tier: ::std::option::Option<::std::string::String>, pub(crate) log_configuration: ::std::option::Option, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl ChannelBuilder { ///

                The ARN of the channel.

                @@ -285,6 +294,26 @@ impl ChannelBuilder { pub fn get_log_configuration(&self) -> &::std::option::Option { &self.log_configuration } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in channel.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in channel.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in channel.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } /// Consumes the builder and constructs a [`Channel`](crate::types::Channel). /// This method will fail if any of the following fields are not set: /// - [`arn`](crate::types::builders::ChannelBuilder::arn) @@ -336,6 +365,7 @@ impl ChannelBuilder { ) })?, log_configuration: self.log_configuration, + audiences: self.audiences, }) } } diff --git a/sdk/mediatailor/src/types/_clip_range.rs b/sdk/mediatailor/src/types/_clip_range.rs index 625eb4784186..787c6784032c 100644 --- a/sdk/mediatailor/src/types/_clip_range.rs +++ b/sdk/mediatailor/src/types/_clip_range.rs @@ -6,12 +6,18 @@ pub struct ClipRange { ///

                The end offset of the clip range, in milliseconds, starting from the beginning of the VOD source associated with the program.

                pub end_offset_millis: i64, + ///

                The start offset of the clip range, in milliseconds. This offset truncates the start at the number of milliseconds into the duration of the VOD source.

                + pub start_offset_millis: ::std::option::Option, } impl ClipRange { ///

                The end offset of the clip range, in milliseconds, starting from the beginning of the VOD source associated with the program.

                pub fn end_offset_millis(&self) -> i64 { self.end_offset_millis } + ///

                The start offset of the clip range, in milliseconds. This offset truncates the start at the number of milliseconds into the duration of the VOD source.

                + pub fn start_offset_millis(&self) -> ::std::option::Option { + self.start_offset_millis + } } impl ClipRange { /// Creates a new builder-style object to manufacture [`ClipRange`](crate::types::ClipRange). @@ -25,10 +31,10 @@ impl ClipRange { #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] pub struct ClipRangeBuilder { pub(crate) end_offset_millis: ::std::option::Option, + pub(crate) start_offset_millis: ::std::option::Option, } impl ClipRangeBuilder { ///

                The end offset of the clip range, in milliseconds, starting from the beginning of the VOD source associated with the program.

                - /// This field is required. pub fn end_offset_millis(mut self, input: i64) -> Self { self.end_offset_millis = ::std::option::Option::Some(input); self @@ -42,17 +48,25 @@ impl ClipRangeBuilder { pub fn get_end_offset_millis(&self) -> &::std::option::Option { &self.end_offset_millis } + ///

                The start offset of the clip range, in milliseconds. This offset truncates the start at the number of milliseconds into the duration of the VOD source.

                + pub fn start_offset_millis(mut self, input: i64) -> Self { + self.start_offset_millis = ::std::option::Option::Some(input); + self + } + ///

                The start offset of the clip range, in milliseconds. This offset truncates the start at the number of milliseconds into the duration of the VOD source.

                + pub fn set_start_offset_millis(mut self, input: ::std::option::Option) -> Self { + self.start_offset_millis = input; + self + } + ///

                The start offset of the clip range, in milliseconds. This offset truncates the start at the number of milliseconds into the duration of the VOD source.

                + pub fn get_start_offset_millis(&self) -> &::std::option::Option { + &self.start_offset_millis + } /// Consumes the builder and constructs a [`ClipRange`](crate::types::ClipRange). - /// This method will fail if any of the following fields are not set: - /// - [`end_offset_millis`](crate::types::builders::ClipRangeBuilder::end_offset_millis) - pub fn build(self) -> ::std::result::Result { - ::std::result::Result::Ok(crate::types::ClipRange { - end_offset_millis: self.end_offset_millis.ok_or_else(|| { - ::aws_smithy_types::error::operation::BuildError::missing_field( - "end_offset_millis", - "end_offset_millis was not specified but it is required when building ClipRange", - ) - })?, - }) + pub fn build(self) -> crate::types::ClipRange { + crate::types::ClipRange { + end_offset_millis: self.end_offset_millis.unwrap_or_default(), + start_offset_millis: self.start_offset_millis, + } } } diff --git a/sdk/mediatailor/src/types/_schedule_entry.rs b/sdk/mediatailor/src/types/_schedule_entry.rs index 892599ebea4e..e14bb8d228cf 100644 --- a/sdk/mediatailor/src/types/_schedule_entry.rs +++ b/sdk/mediatailor/src/types/_schedule_entry.rs @@ -24,6 +24,8 @@ pub struct ScheduleEntry { pub source_location_name: ::std::string::String, ///

                The name of the VOD source.

                pub vod_source_name: ::std::option::Option<::std::string::String>, + ///

                The list of audiences defined in ScheduleEntry.

                + pub audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl ScheduleEntry { ///

                The approximate duration of this program, in seconds.

                @@ -72,6 +74,12 @@ impl ScheduleEntry { pub fn vod_source_name(&self) -> ::std::option::Option<&str> { self.vod_source_name.as_deref() } + ///

                The list of audiences defined in ScheduleEntry.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audiences.is_none()`. + pub fn audiences(&self) -> &[::std::string::String] { + self.audiences.as_deref().unwrap_or_default() + } } impl ScheduleEntry { /// Creates a new builder-style object to manufacture [`ScheduleEntry`](crate::types::ScheduleEntry). @@ -94,6 +102,7 @@ pub struct ScheduleEntryBuilder { pub(crate) schedule_entry_type: ::std::option::Option, pub(crate) source_location_name: ::std::option::Option<::std::string::String>, pub(crate) vod_source_name: ::std::option::Option<::std::string::String>, + pub(crate) audiences: ::std::option::Option<::std::vec::Vec<::std::string::String>>, } impl ScheduleEntryBuilder { ///

                The approximate duration of this program, in seconds.

                @@ -246,6 +255,26 @@ impl ScheduleEntryBuilder { pub fn get_vod_source_name(&self) -> &::std::option::Option<::std::string::String> { &self.vod_source_name } + /// Appends an item to `audiences`. + /// + /// To override the contents of this collection use [`set_audiences`](Self::set_audiences). + /// + ///

                The list of audiences defined in ScheduleEntry.

                + pub fn audiences(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + let mut v = self.audiences.unwrap_or_default(); + v.push(input.into()); + self.audiences = ::std::option::Option::Some(v); + self + } + ///

                The list of audiences defined in ScheduleEntry.

                + pub fn set_audiences(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self { + self.audiences = input; + self + } + ///

                The list of audiences defined in ScheduleEntry.

                + pub fn get_audiences(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> { + &self.audiences + } /// Consumes the builder and constructs a [`ScheduleEntry`](crate::types::ScheduleEntry). /// This method will fail if any of the following fields are not set: /// - [`arn`](crate::types::builders::ScheduleEntryBuilder::arn) @@ -284,6 +313,7 @@ impl ScheduleEntryBuilder { ) })?, vod_source_name: self.vod_source_name, + audiences: self.audiences, }) } } diff --git a/sdk/mediatailor/src/types/_schedule_entry_type.rs b/sdk/mediatailor/src/types/_schedule_entry_type.rs index 28bfcadbcbe0..99514b11b477 100644 --- a/sdk/mediatailor/src/types/_schedule_entry_type.rs +++ b/sdk/mediatailor/src/types/_schedule_entry_type.rs @@ -12,6 +12,7 @@ /// ```text /// # let scheduleentrytype = unimplemented!(); /// match scheduleentrytype { +/// ScheduleEntryType::AlternateMedia => { /* ... */ }, /// ScheduleEntryType::FillerSlate => { /* ... */ }, /// ScheduleEntryType::Program => { /* ... */ }, /// other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ }, @@ -41,6 +42,8 @@ ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash, )] pub enum ScheduleEntryType { + #[allow(missing_docs)] // documentation missing in model + AlternateMedia, #[allow(missing_docs)] // documentation missing in model FillerSlate, #[allow(missing_docs)] // documentation missing in model @@ -52,6 +55,7 @@ pub enum ScheduleEntryType { impl ::std::convert::From<&str> for ScheduleEntryType { fn from(s: &str) -> Self { match s { + "ALTERNATE_MEDIA" => ScheduleEntryType::AlternateMedia, "FILLER_SLATE" => ScheduleEntryType::FillerSlate, "PROGRAM" => ScheduleEntryType::Program, other => ScheduleEntryType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())), @@ -69,6 +73,7 @@ impl ScheduleEntryType { /// Returns the `&str` value of the enum member. pub fn as_str(&self) -> &str { match self { + ScheduleEntryType::AlternateMedia => "ALTERNATE_MEDIA", ScheduleEntryType::FillerSlate => "FILLER_SLATE", ScheduleEntryType::Program => "PROGRAM", ScheduleEntryType::Unknown(value) => value.as_str(), @@ -76,7 +81,7 @@ impl ScheduleEntryType { } /// Returns all the `&str` representations of the enum members. pub const fn values() -> &'static [&'static str] { - &["FILLER_SLATE", "PROGRAM"] + &["ALTERNATE_MEDIA", "FILLER_SLATE", "PROGRAM"] } } impl ::std::convert::AsRef for ScheduleEntryType { @@ -99,6 +104,7 @@ impl ScheduleEntryType { impl ::std::fmt::Display for ScheduleEntryType { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { match self { + ScheduleEntryType::AlternateMedia => write!(f, "ALTERNATE_MEDIA"), ScheduleEntryType::FillerSlate => write!(f, "FILLER_SLATE"), ScheduleEntryType::Program => write!(f, "PROGRAM"), ScheduleEntryType::Unknown(value) => write!(f, "{}", value), diff --git a/sdk/mediatailor/src/types/builders.rs b/sdk/mediatailor/src/types/builders.rs index 3aa7f26e8888..947979bc0423 100644 --- a/sdk/mediatailor/src/types/builders.rs +++ b/sdk/mediatailor/src/types/builders.rs @@ -69,7 +69,9 @@ pub use crate::types::_log_configuration_for_channel::LogConfigurationForChannel pub use crate::types::_channel::ChannelBuilder; -pub use crate::types::_clip_range::ClipRangeBuilder; +pub use crate::types::_audience_media::AudienceMediaBuilder; + +pub use crate::types::_alternate_media::AlternateMediaBuilder; pub use crate::types::_ad_break::AdBreakBuilder; @@ -81,6 +83,8 @@ pub use crate::types::_segmentation_descriptor::SegmentationDescriptorBuilder; pub use crate::types::_splice_insert_message::SpliceInsertMessageBuilder; +pub use crate::types::_clip_range::ClipRangeBuilder; + pub use crate::types::_update_program_schedule_configuration::UpdateProgramScheduleConfigurationBuilder; pub use crate::types::_update_program_transition::UpdateProgramTransitionBuilder; diff --git a/sdk/rds/Cargo.toml b/sdk/rds/Cargo.toml index 99fa4cdb3999..4d92b81618b0 100644 --- a/sdk/rds/Cargo.toml +++ b/sdk/rds/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-rds" -version = "1.23.0" +version = "1.24.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for Amazon Relational Database Service" edition = "2021" diff --git a/sdk/rds/README.md b/sdk/rds/README.md index fd2269e77254..de0e5941eee1 100644 --- a/sdk/rds/README.md +++ b/sdk/rds/README.md @@ -28,7 +28,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-rds = "1.23.0" +aws-sdk-rds = "1.24.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/rds/src/client.rs b/sdk/rds/src/client.rs index f09f94e22af5..6d521a85e272 100644 --- a/sdk/rds/src/client.rs +++ b/sdk/rds/src/client.rs @@ -415,6 +415,8 @@ mod modify_event_subscription; mod modify_global_cluster; +mod modify_integration; + mod modify_option_group; mod modify_tenant_database; diff --git a/sdk/rds/src/client/create_integration.rs b/sdk/rds/src/client/create_integration.rs index af9fa6773cab..7102c6eea16d 100644 --- a/sdk/rds/src/client/create_integration.rs +++ b/sdk/rds/src/client/create_integration.rs @@ -9,6 +9,8 @@ impl super::Client { /// - [`kms_key_id(impl Into)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::kms_key_id) / [`set_kms_key_id(Option)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::set_kms_key_id):
                required: **false**

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key.


                /// - [`additional_encryption_context(impl Into, impl Into)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::additional_encryption_context) / [`set_additional_encryption_context(Option>)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::set_additional_encryption_context):
                required: **false**

                An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                You can only include this parameter if you specify the KMSKeyId parameter.


                /// - [`tags(Tag)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::tags) / [`set_tags(Option>)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::set_tags):
                required: **false**

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.


                + /// - [`data_filter(impl Into)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::data_filter) / [`set_data_filter(Option)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::set_data_filter):
                required: **false**

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                Valid for: Integrations with Aurora MySQL source DB clusters only


                + /// - [`description(impl Into)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::description) / [`set_description(Option)`](crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::set_description):
                required: **false**

                A description of the integration.


                /// - On success, responds with [`CreateIntegrationOutput`](crate::operation::create_integration::CreateIntegrationOutput) with field(s): /// - [`source_arn(Option)`](crate::operation::create_integration::CreateIntegrationOutput::source_arn):

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                /// - [`target_arn(Option)`](crate::operation::create_integration::CreateIntegrationOutput::target_arn):

                The ARN of the Redshift data warehouse used as the target for replication.

                @@ -20,6 +22,8 @@ impl super::Client { /// - [`tags(Option>)`](crate::operation::create_integration::CreateIntegrationOutput::tags):

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                /// - [`create_time(Option)`](crate::operation::create_integration::CreateIntegrationOutput::create_time):

                The time when the integration was created, in Universal Coordinated Time (UTC).

                /// - [`errors(Option>)`](crate::operation::create_integration::CreateIntegrationOutput::errors):

                Any errors associated with the integration.

                + /// - [`data_filter(Option)`](crate::operation::create_integration::CreateIntegrationOutput::data_filter):

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + /// - [`description(Option)`](crate::operation::create_integration::CreateIntegrationOutput::description):

                A description of the integration.

                /// - On failure, responds with [`SdkError`](crate::operation::create_integration::CreateIntegrationError) pub fn create_integration(&self) -> crate::operation::create_integration::builders::CreateIntegrationFluentBuilder { crate::operation::create_integration::builders::CreateIntegrationFluentBuilder::new(self.handle.clone()) diff --git a/sdk/rds/src/client/delete_integration.rs b/sdk/rds/src/client/delete_integration.rs index a6f3eaedec16..bdead131cf1b 100644 --- a/sdk/rds/src/client/delete_integration.rs +++ b/sdk/rds/src/client/delete_integration.rs @@ -15,6 +15,8 @@ impl super::Client { /// - [`tags(Option>)`](crate::operation::delete_integration::DeleteIntegrationOutput::tags):

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                /// - [`create_time(Option)`](crate::operation::delete_integration::DeleteIntegrationOutput::create_time):

                The time when the integration was created, in Universal Coordinated Time (UTC).

                /// - [`errors(Option>)`](crate::operation::delete_integration::DeleteIntegrationOutput::errors):

                Any errors associated with the integration.

                + /// - [`data_filter(Option)`](crate::operation::delete_integration::DeleteIntegrationOutput::data_filter):

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + /// - [`description(Option)`](crate::operation::delete_integration::DeleteIntegrationOutput::description):

                A description of the integration.

                /// - On failure, responds with [`SdkError`](crate::operation::delete_integration::DeleteIntegrationError) pub fn delete_integration(&self) -> crate::operation::delete_integration::builders::DeleteIntegrationFluentBuilder { crate::operation::delete_integration::builders::DeleteIntegrationFluentBuilder::new(self.handle.clone()) diff --git a/sdk/rds/src/client/modify_integration.rs b/sdk/rds/src/client/modify_integration.rs new file mode 100644 index 000000000000..374fd3cb896f --- /dev/null +++ b/sdk/rds/src/client/modify_integration.rs @@ -0,0 +1,27 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +impl super::Client { + /// Constructs a fluent builder for the [`ModifyIntegration`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder) operation. + /// + /// - The fluent builder is configurable: + /// - [`integration_identifier(impl Into)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::integration_identifier) / [`set_integration_identifier(Option)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::set_integration_identifier):
                required: **true**

                The unique identifier of the integration to modify.


                + /// - [`integration_name(impl Into)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::integration_name) / [`set_integration_name(Option)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::set_integration_name):
                required: **false**

                A new name for the integration.


                + /// - [`data_filter(impl Into)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::data_filter) / [`set_data_filter(Option)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::set_data_filter):
                required: **false**

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.


                + /// - [`description(impl Into)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::description) / [`set_description(Option)`](crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::set_description):
                required: **false**

                A new description for the integration.


                + /// - On success, responds with [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput) with field(s): + /// - [`source_arn(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::source_arn):

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                + /// - [`target_arn(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::target_arn):

                The ARN of the Redshift data warehouse used as the target for replication.

                + /// - [`integration_name(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::integration_name):

                The name of the integration.

                + /// - [`integration_arn(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::integration_arn):

                The ARN of the integration.

                + /// - [`kms_key_id(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::kms_key_id):

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key used to to encrypt the integration.

                + /// - [`additional_encryption_context(Option>)`](crate::operation::modify_integration::ModifyIntegrationOutput::additional_encryption_context):

                The encryption context for the integration. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                + /// - [`status(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::status):

                The current status of the integration.

                + /// - [`tags(Option>)`](crate::operation::modify_integration::ModifyIntegrationOutput::tags):

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                + /// - [`create_time(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::create_time):

                The time when the integration was created, in Universal Coordinated Time (UTC).

                + /// - [`errors(Option>)`](crate::operation::modify_integration::ModifyIntegrationOutput::errors):

                Any errors associated with the integration.

                + /// - [`data_filter(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::data_filter):

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + /// - [`description(Option)`](crate::operation::modify_integration::ModifyIntegrationOutput::description):

                A description of the integration.

                + /// - On failure, responds with [`SdkError`](crate::operation::modify_integration::ModifyIntegrationError) + pub fn modify_integration(&self) -> crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder { + crate::operation::modify_integration::builders::ModifyIntegrationFluentBuilder::new(self.handle.clone()) + } +} diff --git a/sdk/rds/src/error_meta.rs b/sdk/rds/src/error_meta.rs index cbb7f1909f55..b947ce1478b5 100644 --- a/sdk/rds/src/error_meta.rs +++ b/sdk/rds/src/error_meta.rs @@ -4761,6 +4761,34 @@ impl From for } } } +impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error +where + R: Send + Sync + std::fmt::Debug + 'static, +{ + fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> Self { + match err { + ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()), + _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled { + meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(), + source: err.into(), + }), + } + } +} +impl From for Error { + fn from(err: crate::operation::modify_integration::ModifyIntegrationError) -> Self { + match err { + crate::operation::modify_integration::ModifyIntegrationError::IntegrationConflictOperationFault(inner) => { + Error::IntegrationConflictOperationFault(inner) + } + crate::operation::modify_integration::ModifyIntegrationError::IntegrationNotFoundFault(inner) => Error::IntegrationNotFoundFault(inner), + crate::operation::modify_integration::ModifyIntegrationError::InvalidIntegrationStateFault(inner) => { + Error::InvalidIntegrationStateFault(inner) + } + crate::operation::modify_integration::ModifyIntegrationError::Unhandled(inner) => Error::Unhandled(inner), + } + } +} impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error where R: Send + Sync + std::fmt::Debug + 'static, diff --git a/sdk/rds/src/lib.rs b/sdk/rds/src/lib.rs index a2a6310c3e42..2d546614f870 100644 --- a/sdk/rds/src/lib.rs +++ b/sdk/rds/src/lib.rs @@ -44,7 +44,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-rds = "1.23.0" +//! aws-sdk-rds = "1.24.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/rds/src/operation.rs b/sdk/rds/src/operation.rs index 2222509824a6..86c8ec412966 100644 --- a/sdk/rds/src/operation.rs +++ b/sdk/rds/src/operation.rs @@ -379,6 +379,9 @@ pub mod modify_event_subscription; /// Types for the `ModifyGlobalCluster` operation. pub mod modify_global_cluster; +/// Types for the `ModifyIntegration` operation. +pub mod modify_integration; + /// Types for the `ModifyOptionGroup` operation. pub mod modify_option_group; diff --git a/sdk/rds/src/operation/create_integration/_create_integration_input.rs b/sdk/rds/src/operation/create_integration/_create_integration_input.rs index 8de0a0b0d318..22412ea0ea97 100644 --- a/sdk/rds/src/operation/create_integration/_create_integration_input.rs +++ b/sdk/rds/src/operation/create_integration/_create_integration_input.rs @@ -16,6 +16,11 @@ pub struct CreateIntegrationInput { pub additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, ///

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                pub tags: ::std::option::Option<::std::vec::Vec>, + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub data_filter: ::std::option::Option<::std::string::String>, + ///

                A description of the integration.

                + pub description: ::std::option::Option<::std::string::String>, } impl CreateIntegrationInput { ///

                The Amazon Resource Name (ARN) of the database to use as the source for replication.

                @@ -45,6 +50,15 @@ impl CreateIntegrationInput { pub fn tags(&self) -> &[crate::types::Tag] { self.tags.as_deref().unwrap_or_default() } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn data_filter(&self) -> ::std::option::Option<&str> { + self.data_filter.as_deref() + } + ///

                A description of the integration.

                + pub fn description(&self) -> ::std::option::Option<&str> { + self.description.as_deref() + } } impl CreateIntegrationInput { /// Creates a new builder-style object to manufacture [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput). @@ -63,6 +77,8 @@ pub struct CreateIntegrationInputBuilder { pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, pub(crate) tags: ::std::option::Option<::std::vec::Vec>, + pub(crate) data_filter: ::std::option::Option<::std::string::String>, + pub(crate) description: ::std::option::Option<::std::string::String>, } impl CreateIntegrationInputBuilder { ///

                The Amazon Resource Name (ARN) of the database to use as the source for replication.

                @@ -176,6 +192,37 @@ impl CreateIntegrationInputBuilder { pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { &self.tags } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.data_filter = ::std::option::Option::Some(input.into()); + self + } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.data_filter = input; + self + } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + &self.data_filter + } + ///

                A description of the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.description = ::std::option::Option::Some(input.into()); + self + } + ///

                A description of the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.description = input; + self + } + ///

                A description of the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + &self.description + } /// Consumes the builder and constructs a [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput). pub fn build( self, @@ -187,6 +234,8 @@ impl CreateIntegrationInputBuilder { kms_key_id: self.kms_key_id, additional_encryption_context: self.additional_encryption_context, tags: self.tags, + data_filter: self.data_filter, + description: self.description, }) } } diff --git a/sdk/rds/src/operation/create_integration/_create_integration_output.rs b/sdk/rds/src/operation/create_integration/_create_integration_output.rs index 05e0f4c1e03a..68b312d9e7a1 100644 --- a/sdk/rds/src/operation/create_integration/_create_integration_output.rs +++ b/sdk/rds/src/operation/create_integration/_create_integration_output.rs @@ -24,6 +24,10 @@ pub struct CreateIntegrationOutput { pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>, ///

                Any errors associated with the integration.

                pub errors: ::std::option::Option<::std::vec::Vec>, + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub data_filter: ::std::option::Option<::std::string::String>, + ///

                A description of the integration.

                + pub description: ::std::option::Option<::std::string::String>, _request_id: Option, } impl CreateIntegrationOutput { @@ -71,6 +75,14 @@ impl CreateIntegrationOutput { pub fn errors(&self) -> &[crate::types::IntegrationError] { self.errors.as_deref().unwrap_or_default() } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(&self) -> ::std::option::Option<&str> { + self.data_filter.as_deref() + } + ///

                A description of the integration.

                + pub fn description(&self) -> ::std::option::Option<&str> { + self.description.as_deref() + } } impl ::aws_types::request_id::RequestId for CreateIntegrationOutput { fn request_id(&self) -> Option<&str> { @@ -98,6 +110,8 @@ pub struct CreateIntegrationOutputBuilder { pub(crate) tags: ::std::option::Option<::std::vec::Vec>, pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) errors: ::std::option::Option<::std::vec::Vec>, + pub(crate) data_filter: ::std::option::Option<::std::string::String>, + pub(crate) description: ::std::option::Option<::std::string::String>, _request_id: Option, } impl CreateIntegrationOutputBuilder { @@ -268,6 +282,34 @@ impl CreateIntegrationOutputBuilder { pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec> { &self.errors } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.data_filter = ::std::option::Option::Some(input.into()); + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.data_filter = input; + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + &self.data_filter + } + ///

                A description of the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.description = ::std::option::Option::Some(input.into()); + self + } + ///

                A description of the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.description = input; + self + } + ///

                A description of the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + &self.description + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -290,6 +332,8 @@ impl CreateIntegrationOutputBuilder { tags: self.tags, create_time: self.create_time, errors: self.errors, + data_filter: self.data_filter, + description: self.description, _request_id: self._request_id, } } diff --git a/sdk/rds/src/operation/create_integration/builders.rs b/sdk/rds/src/operation/create_integration/builders.rs index c71c654ef4bc..6cc9e0e3baec 100644 --- a/sdk/rds/src/operation/create_integration/builders.rs +++ b/sdk/rds/src/operation/create_integration/builders.rs @@ -212,4 +212,35 @@ impl CreateIntegrationFluentBuilder { pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { self.inner.get_tags() } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.data_filter(input.into()); + self + } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_data_filter(input); + self + } + ///

                Data filtering options for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + ///

                Valid for: Integrations with Aurora MySQL source DB clusters only

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_data_filter() + } + ///

                A description of the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.description(input.into()); + self + } + ///

                A description of the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_description(input); + self + } + ///

                A description of the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_description() + } } diff --git a/sdk/rds/src/operation/delete_integration/_delete_integration_output.rs b/sdk/rds/src/operation/delete_integration/_delete_integration_output.rs index e22415e9b924..aa79d15520ae 100644 --- a/sdk/rds/src/operation/delete_integration/_delete_integration_output.rs +++ b/sdk/rds/src/operation/delete_integration/_delete_integration_output.rs @@ -24,6 +24,10 @@ pub struct DeleteIntegrationOutput { pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>, ///

                Any errors associated with the integration.

                pub errors: ::std::option::Option<::std::vec::Vec>, + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub data_filter: ::std::option::Option<::std::string::String>, + ///

                A description of the integration.

                + pub description: ::std::option::Option<::std::string::String>, _request_id: Option, } impl DeleteIntegrationOutput { @@ -71,6 +75,14 @@ impl DeleteIntegrationOutput { pub fn errors(&self) -> &[crate::types::IntegrationError] { self.errors.as_deref().unwrap_or_default() } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(&self) -> ::std::option::Option<&str> { + self.data_filter.as_deref() + } + ///

                A description of the integration.

                + pub fn description(&self) -> ::std::option::Option<&str> { + self.description.as_deref() + } } impl ::aws_types::request_id::RequestId for DeleteIntegrationOutput { fn request_id(&self) -> Option<&str> { @@ -98,6 +110,8 @@ pub struct DeleteIntegrationOutputBuilder { pub(crate) tags: ::std::option::Option<::std::vec::Vec>, pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) errors: ::std::option::Option<::std::vec::Vec>, + pub(crate) data_filter: ::std::option::Option<::std::string::String>, + pub(crate) description: ::std::option::Option<::std::string::String>, _request_id: Option, } impl DeleteIntegrationOutputBuilder { @@ -268,6 +282,34 @@ impl DeleteIntegrationOutputBuilder { pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec> { &self.errors } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.data_filter = ::std::option::Option::Some(input.into()); + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.data_filter = input; + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + &self.data_filter + } + ///

                A description of the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.description = ::std::option::Option::Some(input.into()); + self + } + ///

                A description of the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.description = input; + self + } + ///

                A description of the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + &self.description + } pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { self._request_id = Some(request_id.into()); self @@ -290,6 +332,8 @@ impl DeleteIntegrationOutputBuilder { tags: self.tags, create_time: self.create_time, errors: self.errors, + data_filter: self.data_filter, + description: self.description, _request_id: self._request_id, } } diff --git a/sdk/iotroborunner/src/operation/update_worker.rs b/sdk/rds/src/operation/modify_integration.rs similarity index 64% rename from sdk/iotroborunner/src/operation/update_worker.rs rename to sdk/rds/src/operation/modify_integration.rs index 0dac4ff9a35b..9f38618ae5d2 100644 --- a/sdk/iotroborunner/src/operation/update_worker.rs +++ b/sdk/rds/src/operation/modify_integration.rs @@ -1,20 +1,20 @@ // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -/// Orchestration and serialization glue logic for `UpdateWorker`. +/// Orchestration and serialization glue logic for `ModifyIntegration`. #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] -pub struct UpdateWorker; -impl UpdateWorker { - /// Creates a new `UpdateWorker` +pub struct ModifyIntegration; +impl ModifyIntegration { + /// Creates a new `ModifyIntegration` pub fn new() -> Self { Self } pub(crate) async fn orchestrate( runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_worker::UpdateWorkerInput, + input: crate::operation::modify_integration::ModifyIntegrationInput, ) -> ::std::result::Result< - crate::operation::update_worker::UpdateWorkerOutput, + crate::operation::modify_integration::ModifyIntegrationOutput, ::aws_smithy_runtime_api::client::result::SdkError< - crate::operation::update_worker::UpdateWorkerError, + crate::operation::modify_integration::ModifyIntegrationError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, >, > { @@ -23,7 +23,7 @@ impl UpdateWorker { ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, >| { err.map_service_error(|err| { - err.downcast::() + err.downcast::() .expect("correct error type") }) }; @@ -33,14 +33,14 @@ impl UpdateWorker { let output = context.finalize().map_err(map_err)?; ::std::result::Result::Ok( output - .downcast::() + .downcast::() .expect("correct output type"), ) } pub(crate) async fn orchestrate_with_stop_point( runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins, - input: crate::operation::update_worker::UpdateWorkerInput, + input: crate::operation::modify_integration::ModifyIntegrationInput, stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint, ) -> ::std::result::Result< ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, @@ -50,7 +50,7 @@ impl UpdateWorker { >, > { let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input); - ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("iotroborunner", "UpdateWorker", input, runtime_plugins, stop_point).await + ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("rds", "ModifyIntegration", input, runtime_plugins, stop_point).await } pub(crate) fn operation_runtime_plugins( @@ -75,25 +75,22 @@ impl UpdateWorker { runtime_plugins } } -impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateWorker { +impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ModifyIntegration { fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> { - let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateWorker"); + let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ModifyIntegration"); cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new( - UpdateWorkerRequestSerializer, + ModifyIntegrationRequestSerializer, )); cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new( - UpdateWorkerResponseDeserializer, + ModifyIntegrationResponseDeserializer, )); cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new( ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(), )); - cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new( - "UpdateWorker", - "iotroborunner", - )); + cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ModifyIntegration", "rds")); let mut signing_options = ::aws_runtime::auth::SigningOptions::default(); signing_options.double_uri_encode = true; signing_options.content_sha256_header = false; @@ -113,21 +110,21 @@ impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateW _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder, ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> { #[allow(unused_mut)] - let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateWorker") + let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ModifyIntegration") .with_interceptor( ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::new( ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptorKind::ResponseBody, ), ) - .with_interceptor(UpdateWorkerEndpointParamsInterceptor) + .with_interceptor(ModifyIntegrationEndpointParamsInterceptor) .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::< - crate::operation::update_worker::UpdateWorkerError, + crate::operation::modify_integration::ModifyIntegrationError, >::new()) .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::< - crate::operation::update_worker::UpdateWorkerError, + crate::operation::modify_integration::ModifyIntegrationError, >::new()) .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::< - crate::operation::update_worker::UpdateWorkerError, + crate::operation::modify_integration::ModifyIntegrationError, >::new()); ::std::borrow::Cow::Owned(rcb) @@ -135,8 +132,8 @@ impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateW } #[derive(Debug)] -struct UpdateWorkerResponseDeserializer; -impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateWorkerResponseDeserializer { +struct ModifyIntegrationResponseDeserializer; +impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ModifyIntegrationResponseDeserializer { fn deserialize_nonstreaming( &self, response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, @@ -148,16 +145,16 @@ impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateWor let mut force_error = false; ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response)); let parse_result = if !success && status != 200 || force_error { - crate::protocol_serde::shape_update_worker::de_update_worker_http_error(status, headers, body) + crate::protocol_serde::shape_modify_integration::de_modify_integration_http_error(status, headers, body) } else { - crate::protocol_serde::shape_update_worker::de_update_worker_http_response(status, headers, body) + crate::protocol_serde::shape_modify_integration::de_modify_integration_http_response(status, headers, body) }; crate::protocol_serde::type_erase_result(parse_result) } } #[derive(Debug)] -struct UpdateWorkerRequestSerializer; -impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateWorkerRequestSerializer { +struct ModifyIntegrationRequestSerializer; +impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ModifyIntegrationRequestSerializer { #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)] fn serialize_input( &self, @@ -165,7 +162,7 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateWorker _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag, ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> { let input = input - .downcast::() + .downcast::() .expect("correct type"); let _header_serialization_settings = _cfg .load::() @@ -173,16 +170,16 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateWorker .unwrap_or_default(); let mut request_builder = { fn uri_base( - _input: &crate::operation::update_worker::UpdateWorkerInput, + _input: &crate::operation::modify_integration::ModifyIntegrationInput, output: &mut ::std::string::String, ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> { use ::std::fmt::Write as _; - ::std::write!(output, "/updateWorker").expect("formatting should succeed"); + ::std::write!(output, "/").expect("formatting should succeed"); ::std::result::Result::Ok(()) } #[allow(clippy::unnecessary_wraps)] fn update_http_builder( - input: &crate::operation::update_worker::UpdateWorkerInput, + input: &crate::operation::modify_integration::ModifyIntegrationInput, builder: ::http::request::Builder, ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> { let mut uri = ::std::string::String::new(); @@ -190,10 +187,12 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateWorker ::std::result::Result::Ok(builder.method("POST").uri(uri)) } let mut builder = update_http_builder(&input, ::http::request::Builder::new())?; - builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json"); + builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded"); builder }; - let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_worker::ser_update_worker_input(&input)?); + let body = ::aws_smithy_types::body::SdkBody::from( + crate::protocol_serde::shape_modify_integration_input::ser_modify_integration_input_input_input(&input)?, + ); if let Some(content_length) = body.content_length() { let content_length = content_length.to_string(); request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length); @@ -202,11 +201,11 @@ impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateWorker } } #[derive(Debug)] -struct UpdateWorkerEndpointParamsInterceptor; +struct ModifyIntegrationEndpointParamsInterceptor; -impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateWorkerEndpointParamsInterceptor { +impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ModifyIntegrationEndpointParamsInterceptor { fn name(&self) -> &'static str { - "UpdateWorkerEndpointParamsInterceptor" + "ModifyIntegrationEndpointParamsInterceptor" } fn read_before_execution( @@ -221,8 +220,8 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateWorkerE ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> { let _input = context .input() - .downcast_ref::() - .ok_or("failed to downcast to UpdateWorkerInput")?; + .downcast_ref::() + .ok_or("failed to downcast to ModifyIntegrationInput")?; let params = crate::config::endpoint::Params::builder() .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned())) @@ -239,31 +238,27 @@ impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateWorkerE } } -/// Error type for the `UpdateWorkerError` operation. +/// Error type for the `ModifyIntegrationError` operation. #[non_exhaustive] #[derive(::std::fmt::Debug)] -pub enum UpdateWorkerError { - /// User does not have sufficient access to perform this action. - AccessDeniedException(crate::types::error::AccessDeniedException), - /// Exception thrown if something goes wrong within the service. - InternalServerException(crate::types::error::InternalServerException), - /// Exception thrown if a resource referenced in the request doesn't exist. - ResourceNotFoundException(crate::types::error::ResourceNotFoundException), - /// Exception thrown if the api has been called too quickly be the client. - ThrottlingException(crate::types::error::ThrottlingException), - /// Exception thrown if an invalid parameter is provided to an API. - ValidationException(crate::types::error::ValidationException), +pub enum ModifyIntegrationError { + ///

                A conflicting conditional operation is currently in progress against this resource. Typically occurs when there are multiple requests being made to the same resource at the same time, and these requests conflict with each other.

                + IntegrationConflictOperationFault(crate::types::error::IntegrationConflictOperationFault), + ///

                The specified integration could not be found.

                + IntegrationNotFoundFault(crate::types::error::IntegrationNotFoundFault), + ///

                The integration is in an invalid state and can't perform the requested operation.

                + InvalidIntegrationStateFault(crate::types::error::InvalidIntegrationStateFault), /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ variable wildcard pattern and check `.code()`: \    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` \ - See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateWorkerError) for what information is available for the error.")] + See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ModifyIntegrationError) for what information is available for the error.")] Unhandled(crate::error::sealed_unhandled::Unhandled), } -impl UpdateWorkerError { - /// Creates the `UpdateWorkerError::Unhandled` variant from any error type. +impl ModifyIntegrationError { + /// Creates the `ModifyIntegrationError::Unhandled` variant from any error type. pub fn unhandled( err: impl ::std::convert::Into<::std::boxed::Box>, ) -> Self { @@ -273,7 +268,7 @@ impl UpdateWorkerError { }) } - /// Creates the `UpdateWorkerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). + /// Creates the `ModifyIntegrationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source: err.clone().into(), @@ -286,55 +281,41 @@ impl UpdateWorkerError { /// pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { - Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), - Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::IntegrationConflictOperationFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::IntegrationNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), + Self::InvalidIntegrationStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e), Self::Unhandled(e) => &e.meta, } } - /// Returns `true` if the error kind is `UpdateWorkerError::AccessDeniedException`. - pub fn is_access_denied_exception(&self) -> bool { - matches!(self, Self::AccessDeniedException(_)) - } - /// Returns `true` if the error kind is `UpdateWorkerError::InternalServerException`. - pub fn is_internal_server_exception(&self) -> bool { - matches!(self, Self::InternalServerException(_)) - } - /// Returns `true` if the error kind is `UpdateWorkerError::ResourceNotFoundException`. - pub fn is_resource_not_found_exception(&self) -> bool { - matches!(self, Self::ResourceNotFoundException(_)) + /// Returns `true` if the error kind is `ModifyIntegrationError::IntegrationConflictOperationFault`. + pub fn is_integration_conflict_operation_fault(&self) -> bool { + matches!(self, Self::IntegrationConflictOperationFault(_)) } - /// Returns `true` if the error kind is `UpdateWorkerError::ThrottlingException`. - pub fn is_throttling_exception(&self) -> bool { - matches!(self, Self::ThrottlingException(_)) + /// Returns `true` if the error kind is `ModifyIntegrationError::IntegrationNotFoundFault`. + pub fn is_integration_not_found_fault(&self) -> bool { + matches!(self, Self::IntegrationNotFoundFault(_)) } - /// Returns `true` if the error kind is `UpdateWorkerError::ValidationException`. - pub fn is_validation_exception(&self) -> bool { - matches!(self, Self::ValidationException(_)) + /// Returns `true` if the error kind is `ModifyIntegrationError::InvalidIntegrationStateFault`. + pub fn is_invalid_integration_state_fault(&self) -> bool { + matches!(self, Self::InvalidIntegrationStateFault(_)) } } -impl ::std::error::Error for UpdateWorkerError { +impl ::std::error::Error for ModifyIntegrationError { fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { match self { - Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner), - Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner), - Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner), - Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner), - Self::ValidationException(_inner) => ::std::option::Option::Some(_inner), + Self::IntegrationConflictOperationFault(_inner) => ::std::option::Option::Some(_inner), + Self::IntegrationNotFoundFault(_inner) => ::std::option::Option::Some(_inner), + Self::InvalidIntegrationStateFault(_inner) => ::std::option::Option::Some(_inner), Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), } } } -impl ::std::fmt::Display for UpdateWorkerError { +impl ::std::fmt::Display for ModifyIntegrationError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { match self { - Self::AccessDeniedException(_inner) => _inner.fmt(f), - Self::InternalServerException(_inner) => _inner.fmt(f), - Self::ResourceNotFoundException(_inner) => _inner.fmt(f), - Self::ThrottlingException(_inner) => _inner.fmt(f), - Self::ValidationException(_inner) => _inner.fmt(f), + Self::IntegrationConflictOperationFault(_inner) => _inner.fmt(f), + Self::IntegrationNotFoundFault(_inner) => _inner.fmt(f), + Self::InvalidIntegrationStateFault(_inner) => _inner.fmt(f), Self::Unhandled(_inner) => { if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) { write!(f, "unhandled error ({code})") @@ -345,31 +326,25 @@ impl ::std::fmt::Display for UpdateWorkerError { } } } -impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateWorkerError { +impl ::aws_smithy_types::retry::ProvideErrorKind for ModifyIntegrationError { fn code(&self) -> ::std::option::Option<&str> { ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) } fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { - match self { - Self::AccessDeniedException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - Self::ThrottlingException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()), - _ => ::std::option::Option::None, - } + ::std::option::Option::None } } -impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateWorkerError { +impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ModifyIntegrationError { fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { match self { - Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), - Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::IntegrationConflictOperationFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::IntegrationNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), + Self::InvalidIntegrationStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner), Self::Unhandled(_inner) => &_inner.meta, } } } -impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateWorkerError { +impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ModifyIntegrationError { fn create_unhandled_error( source: ::std::boxed::Box, meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, @@ -380,19 +355,19 @@ impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateWo }) } } -impl ::aws_types::request_id::RequestId for crate::operation::update_worker::UpdateWorkerError { +impl ::aws_types::request_id::RequestId for crate::operation::modify_integration::ModifyIntegrationError { fn request_id(&self) -> Option<&str> { self.meta().request_id() } } -pub use crate::operation::update_worker::_update_worker_output::UpdateWorkerOutput; +pub use crate::operation::modify_integration::_modify_integration_output::ModifyIntegrationOutput; -pub use crate::operation::update_worker::_update_worker_input::UpdateWorkerInput; +pub use crate::operation::modify_integration::_modify_integration_input::ModifyIntegrationInput; -mod _update_worker_input; +mod _modify_integration_input; -mod _update_worker_output; +mod _modify_integration_output; /// Builders pub mod builders; diff --git a/sdk/rds/src/operation/modify_integration/_modify_integration_input.rs b/sdk/rds/src/operation/modify_integration/_modify_integration_input.rs new file mode 100644 index 000000000000..27ee3bcf02f9 --- /dev/null +++ b/sdk/rds/src/operation/modify_integration/_modify_integration_input.rs @@ -0,0 +1,118 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(missing_docs)] // documentation missing in model +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ModifyIntegrationInput { + ///

                The unique identifier of the integration to modify.

                + pub integration_identifier: ::std::option::Option<::std::string::String>, + ///

                A new name for the integration.

                + pub integration_name: ::std::option::Option<::std::string::String>, + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub data_filter: ::std::option::Option<::std::string::String>, + ///

                A new description for the integration.

                + pub description: ::std::option::Option<::std::string::String>, +} +impl ModifyIntegrationInput { + ///

                The unique identifier of the integration to modify.

                + pub fn integration_identifier(&self) -> ::std::option::Option<&str> { + self.integration_identifier.as_deref() + } + ///

                A new name for the integration.

                + pub fn integration_name(&self) -> ::std::option::Option<&str> { + self.integration_name.as_deref() + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn data_filter(&self) -> ::std::option::Option<&str> { + self.data_filter.as_deref() + } + ///

                A new description for the integration.

                + pub fn description(&self) -> ::std::option::Option<&str> { + self.description.as_deref() + } +} +impl ModifyIntegrationInput { + /// Creates a new builder-style object to manufacture [`ModifyIntegrationInput`](crate::operation::modify_integration::ModifyIntegrationInput). + pub fn builder() -> crate::operation::modify_integration::builders::ModifyIntegrationInputBuilder { + crate::operation::modify_integration::builders::ModifyIntegrationInputBuilder::default() + } +} + +/// A builder for [`ModifyIntegrationInput`](crate::operation::modify_integration::ModifyIntegrationInput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ModifyIntegrationInputBuilder { + pub(crate) integration_identifier: ::std::option::Option<::std::string::String>, + pub(crate) integration_name: ::std::option::Option<::std::string::String>, + pub(crate) data_filter: ::std::option::Option<::std::string::String>, + pub(crate) description: ::std::option::Option<::std::string::String>, +} +impl ModifyIntegrationInputBuilder { + ///

                The unique identifier of the integration to modify.

                + /// This field is required. + pub fn integration_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.integration_identifier = ::std::option::Option::Some(input.into()); + self + } + ///

                The unique identifier of the integration to modify.

                + pub fn set_integration_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.integration_identifier = input; + self + } + ///

                The unique identifier of the integration to modify.

                + pub fn get_integration_identifier(&self) -> &::std::option::Option<::std::string::String> { + &self.integration_identifier + } + ///

                A new name for the integration.

                + pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.integration_name = ::std::option::Option::Some(input.into()); + self + } + ///

                A new name for the integration.

                + pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.integration_name = input; + self + } + ///

                A new name for the integration.

                + pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> { + &self.integration_name + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.data_filter = ::std::option::Option::Some(input.into()); + self + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.data_filter = input; + self + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + &self.data_filter + } + ///

                A new description for the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.description = ::std::option::Option::Some(input.into()); + self + } + ///

                A new description for the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.description = input; + self + } + ///

                A new description for the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + &self.description + } + /// Consumes the builder and constructs a [`ModifyIntegrationInput`](crate::operation::modify_integration::ModifyIntegrationInput). + pub fn build( + self, + ) -> ::std::result::Result { + ::std::result::Result::Ok(crate::operation::modify_integration::ModifyIntegrationInput { + integration_identifier: self.integration_identifier, + integration_name: self.integration_name, + data_filter: self.data_filter, + description: self.description, + }) + } +} diff --git a/sdk/rds/src/operation/modify_integration/_modify_integration_output.rs b/sdk/rds/src/operation/modify_integration/_modify_integration_output.rs new file mode 100644 index 000000000000..5a5c500aa423 --- /dev/null +++ b/sdk/rds/src/operation/modify_integration/_modify_integration_output.rs @@ -0,0 +1,340 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +///

                A zero-ETL integration with Amazon Redshift.

                +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] +pub struct ModifyIntegrationOutput { + ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                + pub source_arn: ::std::option::Option<::std::string::String>, + ///

                The ARN of the Redshift data warehouse used as the target for replication.

                + pub target_arn: ::std::option::Option<::std::string::String>, + ///

                The name of the integration.

                + pub integration_name: ::std::option::Option<::std::string::String>, + ///

                The ARN of the integration.

                + pub integration_arn: ::std::option::Option<::std::string::String>, + ///

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key used to to encrypt the integration.

                + pub kms_key_id: ::std::option::Option<::std::string::String>, + ///

                The encryption context for the integration. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                + pub additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + ///

                The current status of the integration.

                + pub status: ::std::option::Option, + ///

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                + pub tags: ::std::option::Option<::std::vec::Vec>, + ///

                The time when the integration was created, in Universal Coordinated Time (UTC).

                + pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>, + ///

                Any errors associated with the integration.

                + pub errors: ::std::option::Option<::std::vec::Vec>, + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub data_filter: ::std::option::Option<::std::string::String>, + ///

                A description of the integration.

                + pub description: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl ModifyIntegrationOutput { + ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                + pub fn source_arn(&self) -> ::std::option::Option<&str> { + self.source_arn.as_deref() + } + ///

                The ARN of the Redshift data warehouse used as the target for replication.

                + pub fn target_arn(&self) -> ::std::option::Option<&str> { + self.target_arn.as_deref() + } + ///

                The name of the integration.

                + pub fn integration_name(&self) -> ::std::option::Option<&str> { + self.integration_name.as_deref() + } + ///

                The ARN of the integration.

                + pub fn integration_arn(&self) -> ::std::option::Option<&str> { + self.integration_arn.as_deref() + } + ///

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key used to to encrypt the integration.

                + pub fn kms_key_id(&self) -> ::std::option::Option<&str> { + self.kms_key_id.as_deref() + } + ///

                The encryption context for the integration. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                + pub fn additional_encryption_context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> { + self.additional_encryption_context.as_ref() + } + ///

                The current status of the integration.

                + pub fn status(&self) -> ::std::option::Option<&crate::types::IntegrationStatus> { + self.status.as_ref() + } + ///

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`. + pub fn tags(&self) -> &[crate::types::Tag] { + self.tags.as_deref().unwrap_or_default() + } + ///

                The time when the integration was created, in Universal Coordinated Time (UTC).

                + pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { + self.create_time.as_ref() + } + ///

                Any errors associated with the integration.

                + /// + /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.errors.is_none()`. + pub fn errors(&self) -> &[crate::types::IntegrationError] { + self.errors.as_deref().unwrap_or_default() + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(&self) -> ::std::option::Option<&str> { + self.data_filter.as_deref() + } + ///

                A description of the integration.

                + pub fn description(&self) -> ::std::option::Option<&str> { + self.description.as_deref() + } +} +impl ::aws_types::request_id::RequestId for ModifyIntegrationOutput { + fn request_id(&self) -> Option<&str> { + self._request_id.as_deref() + } +} +impl ModifyIntegrationOutput { + /// Creates a new builder-style object to manufacture [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput). + pub fn builder() -> crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder { + crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::default() + } +} + +/// A builder for [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput). +#[non_exhaustive] +#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] +pub struct ModifyIntegrationOutputBuilder { + pub(crate) source_arn: ::std::option::Option<::std::string::String>, + pub(crate) target_arn: ::std::option::Option<::std::string::String>, + pub(crate) integration_name: ::std::option::Option<::std::string::String>, + pub(crate) integration_arn: ::std::option::Option<::std::string::String>, + pub(crate) kms_key_id: ::std::option::Option<::std::string::String>, + pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + pub(crate) status: ::std::option::Option, + pub(crate) tags: ::std::option::Option<::std::vec::Vec>, + pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>, + pub(crate) errors: ::std::option::Option<::std::vec::Vec>, + pub(crate) data_filter: ::std::option::Option<::std::string::String>, + pub(crate) description: ::std::option::Option<::std::string::String>, + _request_id: Option, +} +impl ModifyIntegrationOutputBuilder { + ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                + pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.source_arn = ::std::option::Option::Some(input.into()); + self + } + ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                + pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.source_arn = input; + self + } + ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                + pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.source_arn + } + ///

                The ARN of the Redshift data warehouse used as the target for replication.

                + pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.target_arn = ::std::option::Option::Some(input.into()); + self + } + ///

                The ARN of the Redshift data warehouse used as the target for replication.

                + pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.target_arn = input; + self + } + ///

                The ARN of the Redshift data warehouse used as the target for replication.

                + pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.target_arn + } + ///

                The name of the integration.

                + pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.integration_name = ::std::option::Option::Some(input.into()); + self + } + ///

                The name of the integration.

                + pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.integration_name = input; + self + } + ///

                The name of the integration.

                + pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> { + &self.integration_name + } + ///

                The ARN of the integration.

                + pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.integration_arn = ::std::option::Option::Some(input.into()); + self + } + ///

                The ARN of the integration.

                + pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.integration_arn = input; + self + } + ///

                The ARN of the integration.

                + pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> { + &self.integration_arn + } + ///

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key used to to encrypt the integration.

                + pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.kms_key_id = ::std::option::Option::Some(input.into()); + self + } + ///

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key used to to encrypt the integration.

                + pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.kms_key_id = input; + self + } + ///

                The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key used to to encrypt the integration.

                + pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> { + &self.kms_key_id + } + /// Adds a key-value pair to `additional_encryption_context`. + /// + /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context). + /// + ///

                The encryption context for the integration. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                + pub fn additional_encryption_context( + mut self, + k: impl ::std::convert::Into<::std::string::String>, + v: impl ::std::convert::Into<::std::string::String>, + ) -> Self { + let mut hash_map = self.additional_encryption_context.unwrap_or_default(); + hash_map.insert(k.into(), v.into()); + self.additional_encryption_context = ::std::option::Option::Some(hash_map); + self + } + ///

                The encryption context for the integration. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                + pub fn set_additional_encryption_context( + mut self, + input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, + ) -> Self { + self.additional_encryption_context = input; + self + } + ///

                The encryption context for the integration. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

                + pub fn get_additional_encryption_context( + &self, + ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> { + &self.additional_encryption_context + } + ///

                The current status of the integration.

                + pub fn status(mut self, input: crate::types::IntegrationStatus) -> Self { + self.status = ::std::option::Option::Some(input); + self + } + ///

                The current status of the integration.

                + pub fn set_status(mut self, input: ::std::option::Option) -> Self { + self.status = input; + self + } + ///

                The current status of the integration.

                + pub fn get_status(&self) -> &::std::option::Option { + &self.status + } + /// Appends an item to `tags`. + /// + /// To override the contents of this collection use [`set_tags`](Self::set_tags). + /// + ///

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                + pub fn tags(mut self, input: crate::types::Tag) -> Self { + let mut v = self.tags.unwrap_or_default(); + v.push(input); + self.tags = ::std::option::Option::Some(v); + self + } + ///

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                + pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.tags = input; + self + } + ///

                A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

                + pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.tags + } + ///

                The time when the integration was created, in Universal Coordinated Time (UTC).

                + pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self { + self.create_time = ::std::option::Option::Some(input); + self + } + ///

                The time when the integration was created, in Universal Coordinated Time (UTC).

                + pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { + self.create_time = input; + self + } + ///

                The time when the integration was created, in Universal Coordinated Time (UTC).

                + pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { + &self.create_time + } + /// Appends an item to `errors`. + /// + /// To override the contents of this collection use [`set_errors`](Self::set_errors). + /// + ///

                Any errors associated with the integration.

                + pub fn errors(mut self, input: crate::types::IntegrationError) -> Self { + let mut v = self.errors.unwrap_or_default(); + v.push(input); + self.errors = ::std::option::Option::Some(v); + self + } + ///

                Any errors associated with the integration.

                + pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec>) -> Self { + self.errors = input; + self + } + ///

                Any errors associated with the integration.

                + pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec> { + &self.errors + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.data_filter = ::std::option::Option::Some(input.into()); + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.data_filter = input; + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + &self.data_filter + } + ///

                A description of the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.description = ::std::option::Option::Some(input.into()); + self + } + ///

                A description of the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.description = input; + self + } + ///

                A description of the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + &self.description + } + pub(crate) fn _request_id(mut self, request_id: impl Into) -> Self { + self._request_id = Some(request_id.into()); + self + } + + pub(crate) fn _set_request_id(&mut self, request_id: Option) -> &mut Self { + self._request_id = request_id; + self + } + /// Consumes the builder and constructs a [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput). + pub fn build(self) -> crate::operation::modify_integration::ModifyIntegrationOutput { + crate::operation::modify_integration::ModifyIntegrationOutput { + source_arn: self.source_arn, + target_arn: self.target_arn, + integration_name: self.integration_name, + integration_arn: self.integration_arn, + kms_key_id: self.kms_key_id, + additional_encryption_context: self.additional_encryption_context, + status: self.status, + tags: self.tags, + create_time: self.create_time, + errors: self.errors, + data_filter: self.data_filter, + description: self.description, + _request_id: self._request_id, + } + } +} diff --git a/sdk/rds/src/operation/modify_integration/builders.rs b/sdk/rds/src/operation/modify_integration/builders.rs new file mode 100644 index 000000000000..6e7cb1ae4d93 --- /dev/null +++ b/sdk/rds/src/operation/modify_integration/builders.rs @@ -0,0 +1,169 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub use crate::operation::modify_integration::_modify_integration_output::ModifyIntegrationOutputBuilder; + +pub use crate::operation::modify_integration::_modify_integration_input::ModifyIntegrationInputBuilder; + +impl ModifyIntegrationInputBuilder { + /// Sends a request with this input using the given client. + pub async fn send_with( + self, + client: &crate::Client, + ) -> ::std::result::Result< + crate::operation::modify_integration::ModifyIntegrationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::modify_integration::ModifyIntegrationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let mut fluent_builder = client.modify_integration(); + fluent_builder.inner = self; + fluent_builder.send().await + } +} +/// Fluent builder constructing a request to `ModifyIntegration`. +/// +///

                Modifies a zero-ETL integration with Amazon Redshift.

                +///

                Currently, you can only modify integrations that have Aurora MySQL source DB clusters. Integrations with Aurora PostgreSQL and RDS sources currently don't support modifying the integration.

                +///
                +#[derive(::std::clone::Clone, ::std::fmt::Debug)] +pub struct ModifyIntegrationFluentBuilder { + handle: ::std::sync::Arc, + inner: crate::operation::modify_integration::builders::ModifyIntegrationInputBuilder, + config_override: ::std::option::Option, +} +impl + crate::client::customize::internal::CustomizableSend< + crate::operation::modify_integration::ModifyIntegrationOutput, + crate::operation::modify_integration::ModifyIntegrationError, + > for ModifyIntegrationFluentBuilder +{ + fn send( + self, + config_override: crate::config::Builder, + ) -> crate::client::customize::internal::BoxFuture< + crate::client::customize::internal::SendResult< + crate::operation::modify_integration::ModifyIntegrationOutput, + crate::operation::modify_integration::ModifyIntegrationError, + >, + > { + ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await }) + } +} +impl ModifyIntegrationFluentBuilder { + /// Creates a new `ModifyIntegration`. + pub(crate) fn new(handle: ::std::sync::Arc) -> Self { + Self { + handle, + inner: ::std::default::Default::default(), + config_override: ::std::option::Option::None, + } + } + /// Access the ModifyIntegration as a reference. + pub fn as_input(&self) -> &crate::operation::modify_integration::builders::ModifyIntegrationInputBuilder { + &self.inner + } + /// Sends the request and returns the response. + /// + /// If an error occurs, an `SdkError` will be returned with additional details that + /// can be matched against. + /// + /// By default, any retryable failures will be retried twice. Retry behavior + /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be + /// set when configuring the client. + pub async fn send( + self, + ) -> ::std::result::Result< + crate::operation::modify_integration::ModifyIntegrationOutput, + ::aws_smithy_runtime_api::client::result::SdkError< + crate::operation::modify_integration::ModifyIntegrationError, + ::aws_smithy_runtime_api::client::orchestrator::HttpResponse, + >, + > { + let input = self + .inner + .build() + .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?; + let runtime_plugins = crate::operation::modify_integration::ModifyIntegration::operation_runtime_plugins( + self.handle.runtime_plugins.clone(), + &self.handle.conf, + self.config_override, + ); + crate::operation::modify_integration::ModifyIntegration::orchestrate(&runtime_plugins, input).await + } + + /// Consumes this builder, creating a customizable operation that can be modified before being sent. + pub fn customize( + self, + ) -> crate::client::customize::CustomizableOperation< + crate::operation::modify_integration::ModifyIntegrationOutput, + crate::operation::modify_integration::ModifyIntegrationError, + Self, + > { + crate::client::customize::CustomizableOperation::new(self) + } + pub(crate) fn config_override(mut self, config_override: impl Into) -> Self { + self.set_config_override(Some(config_override.into())); + self + } + + pub(crate) fn set_config_override(&mut self, config_override: Option) -> &mut Self { + self.config_override = config_override; + self + } + ///

                The unique identifier of the integration to modify.

                + pub fn integration_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.integration_identifier(input.into()); + self + } + ///

                The unique identifier of the integration to modify.

                + pub fn set_integration_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_integration_identifier(input); + self + } + ///

                The unique identifier of the integration to modify.

                + pub fn get_integration_identifier(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_integration_identifier() + } + ///

                A new name for the integration.

                + pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.integration_name(input.into()); + self + } + ///

                A new name for the integration.

                + pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_integration_name(input); + self + } + ///

                A new name for the integration.

                + pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_integration_name() + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.data_filter(input.into()); + self + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_data_filter(input); + self + } + ///

                A new data filter for the integration. For more information, see Data filtering for Aurora zero-ETL integrations with Amazon Redshift.

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_data_filter() + } + ///

                A new description for the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.inner = self.inner.description(input.into()); + self + } + ///

                A new description for the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.inner = self.inner.set_description(input); + self + } + ///

                A new description for the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + self.inner.get_description() + } +} diff --git a/sdk/rds/src/protocol_serde.rs b/sdk/rds/src/protocol_serde.rs index 153c32996456..0b7f116f82e5 100644 --- a/sdk/rds/src/protocol_serde.rs +++ b/sdk/rds/src/protocol_serde.rs @@ -527,6 +527,10 @@ pub(crate) mod shape_modify_global_cluster; pub(crate) mod shape_modify_global_cluster_input; +pub(crate) mod shape_modify_integration; + +pub(crate) mod shape_modify_integration_input; + pub(crate) mod shape_modify_option_group; pub(crate) mod shape_modify_option_group_input; diff --git a/sdk/rds/src/protocol_serde/shape_create_integration.rs b/sdk/rds/src/protocol_serde/shape_create_integration.rs index e6064b0a0d23..ecc0201f44bf 100644 --- a/sdk/rds/src/protocol_serde/shape_create_integration.rs +++ b/sdk/rds/src/protocol_serde/shape_create_integration.rs @@ -288,6 +288,32 @@ pub fn de_create_integration( builder = builder.set_errors(var_10); } , + s if s.matches("DataFilter") /* DataFilter com.amazonaws.rds.synthetic#CreateIntegrationOutput$DataFilter */ => { + let var_11 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_data_filter(var_11); + } + , + s if s.matches("Description") /* Description com.amazonaws.rds.synthetic#CreateIntegrationOutput$Description */ => { + let var_12 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_description(var_12); + } + , _ => {} } } diff --git a/sdk/rds/src/protocol_serde/shape_create_integration_input.rs b/sdk/rds/src/protocol_serde/shape_create_integration_input.rs index 48ded234ceea..0f39472a65cb 100644 --- a/sdk/rds/src/protocol_serde/shape_create_integration_input.rs +++ b/sdk/rds/src/protocol_serde/shape_create_integration_input.rs @@ -49,6 +49,16 @@ pub fn ser_create_integration_input_input_input( } list_18.finish(); } + #[allow(unused_mut)] + let mut scope_20 = writer.prefix("DataFilter"); + if let Some(var_21) = &input.data_filter { + scope_20.string(var_21); + } + #[allow(unused_mut)] + let mut scope_22 = writer.prefix("Description"); + if let Some(var_23) = &input.description { + scope_22.string(var_23); + } writer.finish(); Ok(::aws_smithy_types::body::SdkBody::from(out)) } diff --git a/sdk/rds/src/protocol_serde/shape_delete_integration.rs b/sdk/rds/src/protocol_serde/shape_delete_integration.rs index d6b4f928a556..2836496405fb 100644 --- a/sdk/rds/src/protocol_serde/shape_delete_integration.rs +++ b/sdk/rds/src/protocol_serde/shape_delete_integration.rs @@ -238,6 +238,32 @@ pub fn de_delete_integration( builder = builder.set_errors(var_10); } , + s if s.matches("DataFilter") /* DataFilter com.amazonaws.rds.synthetic#DeleteIntegrationOutput$DataFilter */ => { + let var_11 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_data_filter(var_11); + } + , + s if s.matches("Description") /* Description com.amazonaws.rds.synthetic#DeleteIntegrationOutput$Description */ => { + let var_12 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_description(var_12); + } + , _ => {} } } diff --git a/sdk/rds/src/protocol_serde/shape_integration.rs b/sdk/rds/src/protocol_serde/shape_integration.rs index 20d75f01b811..b89d2c3719cc 100644 --- a/sdk/rds/src/protocol_serde/shape_integration.rs +++ b/sdk/rds/src/protocol_serde/shape_integration.rs @@ -130,6 +130,32 @@ pub fn de_integration( builder = builder.set_errors(var_10); } , + s if s.matches("DataFilter") /* DataFilter com.amazonaws.rds#Integration$DataFilter */ => { + let var_11 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_data_filter(var_11); + } + , + s if s.matches("Description") /* Description com.amazonaws.rds#Integration$Description */ => { + let var_12 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_description(var_12); + } + , _ => {} } } diff --git a/sdk/rds/src/protocol_serde/shape_modify_integration.rs b/sdk/rds/src/protocol_serde/shape_modify_integration.rs new file mode 100644 index 000000000000..0d872ee8ff3f --- /dev/null +++ b/sdk/rds/src/protocol_serde/shape_modify_integration.rs @@ -0,0 +1,274 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +#[allow(clippy::unnecessary_wraps)] +pub fn de_modify_integration_http_error( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result +{ + #[allow(unused_mut)] + let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body) + .map_err(crate::operation::modify_integration::ModifyIntegrationError::unhandled)?; + generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers); + let generic = generic_builder.build(); + let error_code = match generic.code() { + Some(code) => code, + None => return Err(crate::operation::modify_integration::ModifyIntegrationError::unhandled(generic)), + }; + + let _error_message = generic.message().map(|msg| msg.to_owned()); + Err(match error_code { + "IntegrationConflictOperationFault" => crate::operation::modify_integration::ModifyIntegrationError::IntegrationConflictOperationFault({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::IntegrationConflictOperationFaultBuilder::default(); + output = crate::protocol_serde::shape_integration_conflict_operation_fault::de_integration_conflict_operation_fault_xml_err( + _response_body, + output, + ) + .map_err(crate::operation::modify_integration::ModifyIntegrationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "IntegrationNotFoundFault" => crate::operation::modify_integration::ModifyIntegrationError::IntegrationNotFoundFault({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::IntegrationNotFoundFaultBuilder::default(); + output = crate::protocol_serde::shape_integration_not_found_fault::de_integration_not_found_fault_xml_err(_response_body, output) + .map_err(crate::operation::modify_integration::ModifyIntegrationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + "InvalidIntegrationStateFault" => crate::operation::modify_integration::ModifyIntegrationError::InvalidIntegrationStateFault({ + #[allow(unused_mut)] + let mut tmp = { + #[allow(unused_mut)] + let mut output = crate::types::error::builders::InvalidIntegrationStateFaultBuilder::default(); + output = + crate::protocol_serde::shape_invalid_integration_state_fault::de_invalid_integration_state_fault_xml_err(_response_body, output) + .map_err(crate::operation::modify_integration::ModifyIntegrationError::unhandled)?; + let output = output.meta(generic); + output.build() + }; + if tmp.message.is_none() { + tmp.message = _error_message; + } + tmp + }), + _ => crate::operation::modify_integration::ModifyIntegrationError::generic(generic), + }) +} + +#[allow(clippy::unnecessary_wraps)] +pub fn de_modify_integration_http_response( + _response_status: u16, + _response_headers: &::aws_smithy_runtime_api::http::Headers, + _response_body: &[u8], +) -> std::result::Result +{ + Ok({ + #[allow(unused_mut)] + let mut output = crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::default(); + output = crate::protocol_serde::shape_modify_integration::de_modify_integration(_response_body, output) + .map_err(crate::operation::modify_integration::ModifyIntegrationError::unhandled)?; + output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string)); + output.build() + }) +} + +#[allow(unused_mut)] +pub fn de_modify_integration( + inp: &[u8], + mut builder: crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder, +) -> Result { + let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?; + + #[allow(unused_mut)] + let mut decoder = doc.root_element()?; + #[allow(unused_variables)] + let start_el = decoder.start_el(); + if !(start_el.matches("ModifyIntegrationResponse")) { + return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!( + "invalid root, expected ModifyIntegrationResponse got {:?}", + start_el + ))); + } + if let Some(mut result_tag) = decoder.next_tag() { + let start_el = result_tag.start_el(); + if !(start_el.matches("ModifyIntegrationResult")) { + return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!( + "invalid result, expected ModifyIntegrationResult got {:?}", + start_el + ))); + } + while let Some(mut tag) = result_tag.next_tag() { + match tag.start_el() { + s if s.matches("SourceArn") /* SourceArn com.amazonaws.rds.synthetic#ModifyIntegrationOutput$SourceArn */ => { + let var_1 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_source_arn(var_1); + } + , + s if s.matches("TargetArn") /* TargetArn com.amazonaws.rds.synthetic#ModifyIntegrationOutput$TargetArn */ => { + let var_2 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_target_arn(var_2); + } + , + s if s.matches("IntegrationName") /* IntegrationName com.amazonaws.rds.synthetic#ModifyIntegrationOutput$IntegrationName */ => { + let var_3 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_integration_name(var_3); + } + , + s if s.matches("IntegrationArn") /* IntegrationArn com.amazonaws.rds.synthetic#ModifyIntegrationOutput$IntegrationArn */ => { + let var_4 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_integration_arn(var_4); + } + , + s if s.matches("KMSKeyId") /* KMSKeyId com.amazonaws.rds.synthetic#ModifyIntegrationOutput$KMSKeyId */ => { + let var_5 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_kms_key_id(var_5); + } + , + s if s.matches("AdditionalEncryptionContext") /* AdditionalEncryptionContext com.amazonaws.rds.synthetic#ModifyIntegrationOutput$AdditionalEncryptionContext */ => { + let var_6 = + Some( + crate::protocol_serde::shape_encryption_context_map::de_encryption_context_map(&mut tag) + ? + ) + ; + builder = builder.set_additional_encryption_context(var_6); + } + , + s if s.matches("Status") /* Status com.amazonaws.rds.synthetic#ModifyIntegrationOutput$Status */ => { + let var_7 = + Some( + Result::::Ok( + crate::types::IntegrationStatus::from( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + ) + ) + ? + ) + ; + builder = builder.set_status(var_7); + } + , + s if s.matches("Tags") /* Tags com.amazonaws.rds.synthetic#ModifyIntegrationOutput$Tags */ => { + let var_8 = + Some( + crate::protocol_serde::shape_tag_list::de_tag_list(&mut tag) + ? + ) + ; + builder = builder.set_tags(var_8); + } + , + s if s.matches("CreateTime") /* CreateTime com.amazonaws.rds.synthetic#ModifyIntegrationOutput$CreateTime */ => { + let var_9 = + Some( + ::aws_smithy_types::DateTime::from_str( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + , ::aws_smithy_types::date_time::Format::DateTimeWithOffset + ) + .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.rds#TStamp`)")) + ? + ) + ; + builder = builder.set_create_time(var_9); + } + , + s if s.matches("Errors") /* Errors com.amazonaws.rds.synthetic#ModifyIntegrationOutput$Errors */ => { + let var_10 = + Some( + crate::protocol_serde::shape_integration_error_list::de_integration_error_list(&mut tag) + ? + ) + ; + builder = builder.set_errors(var_10); + } + , + s if s.matches("DataFilter") /* DataFilter com.amazonaws.rds.synthetic#ModifyIntegrationOutput$DataFilter */ => { + let var_11 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_data_filter(var_11); + } + , + s if s.matches("Description") /* Description com.amazonaws.rds.synthetic#ModifyIntegrationOutput$Description */ => { + let var_12 = + Some( + Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok( + ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref() + .into() + ) + ? + ) + ; + builder = builder.set_description(var_12); + } + , + _ => {} + } + } + } else { + return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("expected ModifyIntegrationResult tag")); + }; + Ok(builder) +} diff --git a/sdk/rds/src/protocol_serde/shape_modify_integration_input.rs b/sdk/rds/src/protocol_serde/shape_modify_integration_input.rs new file mode 100644 index 000000000000..7b5868d50420 --- /dev/null +++ b/sdk/rds/src/protocol_serde/shape_modify_integration_input.rs @@ -0,0 +1,30 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub fn ser_modify_integration_input_input_input( + input: &crate::operation::modify_integration::ModifyIntegrationInput, +) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> { + let mut out = String::new(); + #[allow(unused_mut)] + let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "ModifyIntegration", "2014-10-31"); + #[allow(unused_mut)] + let mut scope_1 = writer.prefix("IntegrationIdentifier"); + if let Some(var_2) = &input.integration_identifier { + scope_1.string(var_2); + } + #[allow(unused_mut)] + let mut scope_3 = writer.prefix("IntegrationName"); + if let Some(var_4) = &input.integration_name { + scope_3.string(var_4); + } + #[allow(unused_mut)] + let mut scope_5 = writer.prefix("DataFilter"); + if let Some(var_6) = &input.data_filter { + scope_5.string(var_6); + } + #[allow(unused_mut)] + let mut scope_7 = writer.prefix("Description"); + if let Some(var_8) = &input.description { + scope_7.string(var_8); + } + writer.finish(); + Ok(::aws_smithy_types::body::SdkBody::from(out)) +} diff --git a/sdk/rds/src/types.rs b/sdk/rds/src/types.rs index 3b388dd0efb8..6931acbc8063 100644 --- a/sdk/rds/src/types.rs +++ b/sdk/rds/src/types.rs @@ -141,6 +141,10 @@ pub use crate::types::_option_setting::OptionSetting; pub use crate::types::_option_configuration::OptionConfiguration; +pub use crate::types::_integration_error::IntegrationError; + +pub use crate::types::_integration_status::IntegrationStatus; + pub use crate::types::_db_snapshot_attributes_result::DbSnapshotAttributesResult; pub use crate::types::_db_snapshot_attribute::DbSnapshotAttribute; @@ -255,10 +259,6 @@ pub use crate::types::_minimum_engine_version_per_allowed_value::MinimumEngineVe pub use crate::types::_integration::Integration; -pub use crate::types::_integration_error::IntegrationError; - -pub use crate::types::_integration_status::IntegrationStatus; - pub use crate::types::_export_task::ExportTask; pub use crate::types::_event::Event; diff --git a/sdk/rds/src/types/_integration.rs b/sdk/rds/src/types/_integration.rs index b5497adc563a..75fb01c12965 100644 --- a/sdk/rds/src/types/_integration.rs +++ b/sdk/rds/src/types/_integration.rs @@ -24,6 +24,10 @@ pub struct Integration { pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>, ///

                Any errors associated with the integration.

                pub errors: ::std::option::Option<::std::vec::Vec>, + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub data_filter: ::std::option::Option<::std::string::String>, + ///

                A description of the integration.

                + pub description: ::std::option::Option<::std::string::String>, } impl Integration { ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                @@ -70,6 +74,14 @@ impl Integration { pub fn errors(&self) -> &[crate::types::IntegrationError] { self.errors.as_deref().unwrap_or_default() } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(&self) -> ::std::option::Option<&str> { + self.data_filter.as_deref() + } + ///

                A description of the integration.

                + pub fn description(&self) -> ::std::option::Option<&str> { + self.description.as_deref() + } } impl Integration { /// Creates a new builder-style object to manufacture [`Integration`](crate::types::Integration). @@ -92,6 +104,8 @@ pub struct IntegrationBuilder { pub(crate) tags: ::std::option::Option<::std::vec::Vec>, pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) errors: ::std::option::Option<::std::vec::Vec>, + pub(crate) data_filter: ::std::option::Option<::std::string::String>, + pub(crate) description: ::std::option::Option<::std::string::String>, } impl IntegrationBuilder { ///

                The Amazon Resource Name (ARN) of the database used as the source for replication.

                @@ -261,6 +275,34 @@ impl IntegrationBuilder { pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec> { &self.errors } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.data_filter = ::std::option::Option::Some(input.into()); + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.data_filter = input; + self + } + ///

                Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.

                + pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> { + &self.data_filter + } + ///

                A description of the integration.

                + pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { + self.description = ::std::option::Option::Some(input.into()); + self + } + ///

                A description of the integration.

                + pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self { + self.description = input; + self + } + ///

                A description of the integration.

                + pub fn get_description(&self) -> &::std::option::Option<::std::string::String> { + &self.description + } /// Consumes the builder and constructs a [`Integration`](crate::types::Integration). pub fn build(self) -> crate::types::Integration { crate::types::Integration { @@ -274,6 +316,8 @@ impl IntegrationBuilder { tags: self.tags, create_time: self.create_time, errors: self.errors, + data_filter: self.data_filter, + description: self.description, } } } diff --git a/sdk/rds/src/types/builders.rs b/sdk/rds/src/types/builders.rs index 84a4e909de8f..245e8a94ba28 100644 --- a/sdk/rds/src/types/builders.rs +++ b/sdk/rds/src/types/builders.rs @@ -109,6 +109,8 @@ pub use crate::types::_option_setting::OptionSettingBuilder; pub use crate::types::_option_configuration::OptionConfigurationBuilder; +pub use crate::types::_integration_error::IntegrationErrorBuilder; + pub use crate::types::_db_snapshot_attributes_result::DbSnapshotAttributesResultBuilder; pub use crate::types::_db_snapshot_attribute::DbSnapshotAttributeBuilder; @@ -207,8 +209,6 @@ pub use crate::types::_minimum_engine_version_per_allowed_value::MinimumEngineVe pub use crate::types::_integration::IntegrationBuilder; -pub use crate::types::_integration_error::IntegrationErrorBuilder; - pub use crate::types::_export_task::ExportTaskBuilder; pub use crate::types::_event::EventBuilder; diff --git a/sdk/rds/src/types/error.rs b/sdk/rds/src/types/error.rs index ba5eff863eb7..fe6bebff4177 100644 --- a/sdk/rds/src/types/error.rs +++ b/sdk/rds/src/types/error.rs @@ -143,6 +143,10 @@ pub use crate::types::error::_tenant_database_already_exists_fault::TenantDataba pub use crate::types::error::_invalid_option_group_state_fault::InvalidOptionGroupStateFault; +pub use crate::types::error::_invalid_integration_state_fault::InvalidIntegrationStateFault; + +pub use crate::types::error::_integration_conflict_operation_fault::IntegrationConflictOperationFault; + pub use crate::types::error::_subscription_category_not_found_fault::SubscriptionCategoryNotFoundFault; pub use crate::types::error::_sns_topic_arn_not_found_fault::SnsTopicArnNotFoundFault; @@ -199,10 +203,6 @@ pub use crate::types::error::_db_proxy_target_not_found_fault::DbProxyTargetNotF pub use crate::types::error::_db_cluster_backtrack_not_found_fault::DbClusterBacktrackNotFoundFault; -pub use crate::types::error::_invalid_integration_state_fault::InvalidIntegrationStateFault; - -pub use crate::types::error::_integration_conflict_operation_fault::IntegrationConflictOperationFault; - pub use crate::types::error::_invalid_event_subscription_state_fault::InvalidEventSubscriptionStateFault; pub use crate::types::error::_invalid_db_subnet_state_fault::InvalidDbSubnetStateFault; diff --git a/sdk/rds/src/types/error/builders.rs b/sdk/rds/src/types/error/builders.rs index 9b8c64b27fd8..02a1fbb7fe89 100644 --- a/sdk/rds/src/types/error/builders.rs +++ b/sdk/rds/src/types/error/builders.rs @@ -143,6 +143,10 @@ pub use crate::types::error::_tenant_database_already_exists_fault::TenantDataba pub use crate::types::error::_invalid_option_group_state_fault::InvalidOptionGroupStateFaultBuilder; +pub use crate::types::error::_invalid_integration_state_fault::InvalidIntegrationStateFaultBuilder; + +pub use crate::types::error::_integration_conflict_operation_fault::IntegrationConflictOperationFaultBuilder; + pub use crate::types::error::_subscription_category_not_found_fault::SubscriptionCategoryNotFoundFaultBuilder; pub use crate::types::error::_sns_topic_arn_not_found_fault::SnsTopicArnNotFoundFaultBuilder; @@ -199,10 +203,6 @@ pub use crate::types::error::_db_proxy_target_not_found_fault::DbProxyTargetNotF pub use crate::types::error::_db_cluster_backtrack_not_found_fault::DbClusterBacktrackNotFoundFaultBuilder; -pub use crate::types::error::_invalid_integration_state_fault::InvalidIntegrationStateFaultBuilder; - -pub use crate::types::error::_integration_conflict_operation_fault::IntegrationConflictOperationFaultBuilder; - pub use crate::types::error::_invalid_event_subscription_state_fault::InvalidEventSubscriptionStateFaultBuilder; pub use crate::types::error::_invalid_db_subnet_state_fault::InvalidDbSubnetStateFaultBuilder; diff --git a/sdk/s3/Cargo.toml b/sdk/s3/Cargo.toml index c0299659c6d8..0ce2c8dbfadb 100644 --- a/sdk/s3/Cargo.toml +++ b/sdk/s3/Cargo.toml @@ -1,7 +1,7 @@ # Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. [package] name = "aws-sdk-s3" -version = "1.19.1" +version = "1.20.0" authors = ["AWS Rust SDK Team ", "Russell Cohen "] description = "AWS SDK for Amazon Simple Storage Service" edition = "2021" diff --git a/sdk/s3/README.md b/sdk/s3/README.md index 781b09f897d5..5c3b98f3d0ba 100644 --- a/sdk/s3/README.md +++ b/sdk/s3/README.md @@ -12,7 +12,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-s3 = "1.19.1" +aws-sdk-s3 = "1.20.0" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/s3/src/lib.rs b/sdk/s3/src/lib.rs index 5eb509cd2e38..37aff3f82a29 100644 --- a/sdk/s3/src/lib.rs +++ b/sdk/s3/src/lib.rs @@ -28,7 +28,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-s3 = "1.19.1" +//! aws-sdk-s3 = "1.20.0" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/s3/src/protocol_serde/shape_get_object_legal_hold_output.rs b/sdk/s3/src/protocol_serde/shape_get_object_legal_hold_output.rs index 9d6433f9bd0b..349a38a02f39 100644 --- a/sdk/s3/src/protocol_serde/shape_get_object_legal_hold_output.rs +++ b/sdk/s3/src/protocol_serde/shape_get_object_legal_hold_output.rs @@ -15,9 +15,9 @@ pub fn de_legal_hold(inp: &[u8]) -> Result Result", "Russell Cohen "] description = "AWS SDK for Amazon Timestream Query" edition = "2021" diff --git a/sdk/timestreamquery/README.md b/sdk/timestreamquery/README.md index 226ac7b4ce20..1f74236f0f91 100644 --- a/sdk/timestreamquery/README.md +++ b/sdk/timestreamquery/README.md @@ -12,7 +12,7 @@ your project, add the following to your **Cargo.toml** file: ```toml [dependencies] aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-timestreamquery = "1.17.0" +aws-sdk-timestreamquery = "1.17.1" tokio = { version = "1", features = ["full"] } ``` diff --git a/sdk/timestreamquery/src/lib.rs b/sdk/timestreamquery/src/lib.rs index 5f395bc76e1b..259af9dc2746 100644 --- a/sdk/timestreamquery/src/lib.rs +++ b/sdk/timestreamquery/src/lib.rs @@ -28,7 +28,7 @@ //! ```toml //! [dependencies] //! aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -//! aws-sdk-timestreamquery = "1.17.0" +//! aws-sdk-timestreamquery = "1.17.1" //! tokio = { version = "1", features = ["full"] } //! ``` //! diff --git a/sdk/timestreamquery/src/operation/prepare_query/builders.rs b/sdk/timestreamquery/src/operation/prepare_query/builders.rs index d3618eaba83d..842354a6ee72 100644 --- a/sdk/timestreamquery/src/operation/prepare_query/builders.rs +++ b/sdk/timestreamquery/src/operation/prepare_query/builders.rs @@ -22,7 +22,7 @@ impl PrepareQueryInputBuilder { } /// Fluent builder constructing a request to `PrepareQuery`. /// -///

                A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running. Timestream only supports using this operation with the PrepareQueryRequest$ValidateOnly set to true.

                +///

                A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running. Timestream only supports using this operation with ValidateOnly set to true.

                #[derive(::std::clone::Clone, ::std::fmt::Debug)] pub struct PrepareQueryFluentBuilder { handle: ::std::sync::Arc, diff --git a/sdk/timestreamquery/src/types/_type_.rs b/sdk/timestreamquery/src/types/_type_.rs index 871242df7bb3..ad1da87d07df 100644 --- a/sdk/timestreamquery/src/types/_type_.rs +++ b/sdk/timestreamquery/src/types/_type_.rs @@ -4,7 +4,7 @@ #[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct Type { - ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

                + ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time. For more information, see Supported data types.

                pub scalar_type: ::std::option::Option, ///

                Indicates if the column is an array.

                pub array_column_info: ::std::option::Option, @@ -14,7 +14,7 @@ pub struct Type { pub row_column_info: ::std::option::Option<::std::vec::Vec>, } impl Type { - ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

                + ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time. For more information, see Supported data types.

                pub fn scalar_type(&self) -> ::std::option::Option<&crate::types::ScalarType> { self.scalar_type.as_ref() } @@ -50,17 +50,17 @@ pub struct TypeBuilder { pub(crate) row_column_info: ::std::option::Option<::std::vec::Vec>, } impl TypeBuilder { - ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

                + ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time. For more information, see Supported data types.

                pub fn scalar_type(mut self, input: crate::types::ScalarType) -> Self { self.scalar_type = ::std::option::Option::Some(input); self } - ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

                + ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time. For more information, see Supported data types.

                pub fn set_scalar_type(mut self, input: ::std::option::Option) -> Self { self.scalar_type = input; self } - ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

                + ///

                Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time. For more information, see Supported data types.

                pub fn get_scalar_type(&self) -> &::std::option::Option { &self.scalar_type } diff --git a/tests/no-default-features/Cargo.toml b/tests/no-default-features/Cargo.toml index 21cc87cbf7d0..84db5dbf13ea 100644 --- a/tests/no-default-features/Cargo.toml +++ b/tests/no-default-features/Cargo.toml @@ -21,7 +21,7 @@ version = "1.1.8" [dev-dependencies.aws-sdk-s3] path = "../../sdk/s3" default-features = false -version = "1.19.1" +version = "1.20.0" [dev-dependencies.aws-smithy-async] path = "../../sdk/aws-smithy-async" diff --git a/versions.toml b/versions.toml index befbf4e223f0..13fecb5ce956 100644 --- a/versions.toml +++ b/versions.toml @@ -2,7 +2,7 @@ smithy_rs_revision = 'b43c7ad2e7733f0e1d62b8c959ac7ff47045804d' aws_doc_sdk_examples_revision = '67b3e390ad91f2c10235ae5f3ce3b297d0f325b4' [manual_interventions] -crates_to_remove = ["aws-sdk-iotroborunner"] +crates_to_remove = [] [crates.aws-config] category = 'AwsRuntime' version = '1.1.8' @@ -376,9 +376,9 @@ model_hash = '3efd089f35a2a1b2bb697823c0e3438b63bb82f419d7aa21c622d872d14eef8f' [crates.aws-sdk-cloudformation] category = 'AwsSdk' -version = '1.20.0' -source_hash = '5349f3cebe69bde550e5ea0c2f6a5f378aa87f4318ce955d474d6cfc7fe479a6' -model_hash = '3db7a93e381273dee86f4861dd51c58e001c0c21c24809ba75bb4a7af153a3ac' +version = '1.21.0' +source_hash = '25ce401f5de2b230a6160df87339bae637f9df9e12ffe5ac4b3b3d37c0d471be' +model_hash = '37c2ef3f4d28341be99b01c06cc64db95b39bb6e721653ddc740c168387e1ea1' [crates.aws-sdk-cloudfront] category = 'AwsSdk' @@ -1100,12 +1100,6 @@ version = '1.17.0' source_hash = '39437018a62d4de8fbe95b6aa63f2358c76193512afa5f853965b186271f5276' model_hash = '3d077de4462602736c84fad7a2296c47b72b438bb462f5fed750378ad992059e' -[crates.aws-sdk-iotroborunner] -category = 'AwsSdk' -version = '1.17.0' -source_hash = '9c4f585a33fa7ac4ed9b33d435aa87ebd06c929dabec0dc12d59fe4b679e9204' -model_hash = '513e793b66ba6389799134f998489dd2c3fbe723550b5de7e0127121c971a071' - [crates.aws-sdk-iotsecuretunneling] category = 'AwsSdk' version = '1.17.0' @@ -1234,9 +1228,9 @@ model_hash = 'e0280cb2e8d6dc367391712cb856c061a0c6189fe3dd84bb23ed3bd1c090dac0' [crates.aws-sdk-kms] category = 'AwsSdk' -version = '1.17.0' -source_hash = 'c3d65aefbefd6b0bd41672a59114f77341a87ed77f9f5abe14ae8b1a018c2af1' -model_hash = 'd6a0eceff5392e6d93eb7925b070725c0933c1b1b0cdae0cc70f59889d0343a8' +version = '1.18.0' +source_hash = 'cd2b56259035a23500373363df6744da2dc31b435ce249e44a8192497a0bf650' +model_hash = 'b5b344578b15a4d5fbc98349d7bccfe87ce2ea198cc60d6f471e9c45292ba3ef' [crates.aws-sdk-lakeformation] category = 'AwsSdk' @@ -1444,9 +1438,9 @@ model_hash = '5f37ca20e94fbb48d218b6a952a3b36c008b645c17f4eb2aee562342137b4d51' [crates.aws-sdk-mediatailor] category = 'AwsSdk' -version = '1.18.0' -source_hash = '844931e64f4936db3d8de7585372c5fc55d3a8d502e38322513d0dbfb5ca000d' -model_hash = '494f523c12cd14a90b53ae2f23ae59f43fa05876676fec3d55b4b00561e45223' +version = '1.19.0' +source_hash = 'f7f27f2fdaf24a27261e0bf9f0656caa6f42c114a988b4a4b1c094b88cf072ea' +model_hash = '3778e992cafc984405ba3f22b527a8a53be2661d0e3677562334a572c01ea9ac' [crates.aws-sdk-medicalimaging] category = 'AwsSdk' @@ -1762,9 +1756,9 @@ model_hash = '33137a772550764a4312631b5ad37b61e0232d622a5d0bca86b20efd5bb76105' [crates.aws-sdk-rds] category = 'AwsSdk' -version = '1.23.0' -source_hash = '45d4f6833fc000e311597364465577c0a0a13e42639124ff84b57ca3c1d2234c' -model_hash = 'e35a72a415cf4a4db8c4304e8639568dbc70ab605076c296af0e9af36a70670b' +version = '1.24.0' +source_hash = 'e113c358b037ad59ca7aff3595bfb5bbb204e90fcae396d2c6d07257567433f5' +model_hash = '514d46b7ca57442ef50e7df93754c45c5cd8a776ad87e25d0c51d44a91a4b1b1' [crates.aws-sdk-rdsdata] category = 'AwsSdk' @@ -1882,9 +1876,9 @@ model_hash = '34648839402316ab9da4bef0fe11beb9bc3ec1d05b3ff7d09664ab74c0cb3d2b' [crates.aws-sdk-s3] category = 'AwsSdk' -version = '1.19.1' -source_hash = '887b66117df882b45d1418b688807a2b8b870571e581f84f1138404e2089e316' -model_hash = '09de482bd432abd965c8dc1c7456f75ea5fe9f8402ecf127c9e219a23f4647d2' +version = '1.20.0' +source_hash = '78b9e1a351791b93ab543a48528e81861a1fd82256db0198a4c2d05e697d53b4' +model_hash = 'd4cf9f91188e26ca9b296ddc7177d3035cd9e87c5e0e7976d9cd65de5b649d53' [crates.aws-sdk-s3control] category = 'AwsSdk' @@ -2170,9 +2164,9 @@ model_hash = '68af5db97b128f878677b80742e2adf78602fc4016c9807db28a3d0469e02d9a' [crates.aws-sdk-timestreamquery] category = 'AwsSdk' -version = '1.17.0' -source_hash = '1277acba005ee81fe216b5887166a65e86cd82880e103a5b404f72959c35fd5c' -model_hash = '5da0125b16b35356c55344243bf75a6210e1e923a979f6a60312f74dc9106e03' +version = '1.17.1' +source_hash = '9bf2f688cef7dbb8570b4abe29ced36c656453ad5e790c54b6a7c8349da537c3' +model_hash = 'b6aa68594f71078f60bab4e4841f569dcab2d7f991bed316f65821dd0d7bc26a' [crates.aws-sdk-timestreamwrite] category = 'AwsSdk' @@ -2441,16 +2435,10 @@ source_hash = 'd6ea8e07b94101a2c092315bb0258933080e366cbd1ef6f34e6c089aa8535738' category = 'AwsRuntime' version = '0.0.0' source_hash = '314dce251860de25f6f49bcea9bd7168ec2bf2f94eeb524e859963fd48e96487' - -[release] -tag = 'release-2024-03-15' - [release.crates] -aws-sdk-backup = '1.19.0' -aws-sdk-codebuild = '1.20.0' -aws-sdk-connect = '1.27.0' -aws-sdk-ec2 = '1.26.0' -aws-sdk-kinesisanalyticsv2 = '1.18.0' -aws-sdk-s3 = '1.19.1' -aws-sdk-sagemaker = '1.28.0' -aws-sdk-workspacesthinclient = '1.16.0' +aws-sdk-cloudformation = '1.21.0' +aws-sdk-kms = '1.18.0' +aws-sdk-mediatailor = '1.19.0' +aws-sdk-rds = '1.24.0' +aws-sdk-s3 = '1.20.0' +aws-sdk-timestreamquery = '1.17.1'