├── .cargo └── config.toml ├── .github ├── ISSUE_TEMPLATE │ └── 1_bug_report_template.yml ├── dependabot.yml ├── media │ ├── amazon-q-cli-features.jpeg │ └── amazon-q-logo.avif └── workflows │ ├── check-merge-conflicts.yml │ ├── mdbook.yml │ ├── rust.yml │ └── typos.yml ├── .gitignore ├── .rustfmt.toml ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── Cross.toml ├── LICENSE.APACHE ├── LICENSE.MIT ├── README.md ├── SECURITY.md ├── book.toml ├── codebase-summary.md ├── crates ├── amzn-codewhisperer-client │ ├── Cargo.toml │ ├── LICENSE │ └── src │ │ ├── auth_plugin.rs │ │ ├── client.rs │ │ ├── client │ │ ├── create_artifact_upload_url.rs │ │ ├── create_subscription_token.rs │ │ ├── create_task_assist_conversation.rs │ │ ├── create_upload_url.rs │ │ ├── create_user_memory_entry.rs │ │ ├── create_workspace.rs │ │ ├── customize.rs │ │ ├── customize │ │ │ └── internal.rs │ │ ├── delete_task_assist_conversation.rs │ │ ├── delete_user_memory_entry.rs │ │ ├── delete_workspace.rs │ │ ├── generate_completions.rs │ │ ├── get_code_analysis.rs │ │ ├── get_code_fix_job.rs │ │ ├── get_task_assist_code_generation.rs │ │ ├── get_test_generation.rs │ │ ├── get_transformation.rs │ │ ├── get_transformation_plan.rs │ │ ├── get_usage_limits.rs │ │ ├── list_available_customizations.rs │ │ ├── list_available_profiles.rs │ │ ├── list_code_analysis_findings.rs │ │ ├── list_events.rs │ │ ├── list_feature_evaluations.rs │ │ ├── list_user_memory_entries.rs │ │ ├── list_workspace_metadata.rs │ │ ├── push_telemetry_event.rs │ │ ├── resume_transformation.rs │ │ ├── send_telemetry_event.rs │ │ ├── start_code_analysis.rs │ │ ├── start_code_fix_job.rs │ │ ├── start_task_assist_code_generation.rs │ │ ├── start_test_generation.rs │ │ ├── start_transformation.rs │ │ ├── stop_transformation.rs │ │ └── update_usage_limits.rs │ │ ├── client_idempotency_token.rs │ │ ├── config.rs │ │ ├── config │ │ ├── endpoint.rs │ │ ├── http.rs │ │ ├── interceptors.rs │ │ ├── retry.rs │ │ └── timeout.rs │ │ ├── error.rs │ │ ├── error │ │ └── sealed_unhandled.rs │ │ ├── error_meta.rs │ │ ├── idempotency_token.rs │ │ ├── json_errors.rs │ │ ├── lens.rs │ │ ├── lib.rs │ │ ├── meta.rs │ │ ├── operation.rs │ │ ├── operation │ │ ├── create_artifact_upload_url.rs │ │ ├── create_artifact_upload_url │ │ │ ├── _create_artifact_upload_url_input.rs │ │ │ ├── _create_artifact_upload_url_output.rs │ │ │ └── builders.rs │ │ ├── create_subscription_token.rs │ │ ├── create_subscription_token │ │ │ ├── _create_subscription_token_input.rs │ │ │ ├── _create_subscription_token_output.rs │ │ │ └── builders.rs │ │ ├── create_task_assist_conversation.rs │ │ ├── create_task_assist_conversation │ │ │ ├── _create_task_assist_conversation_input.rs │ │ │ ├── _create_task_assist_conversation_output.rs │ │ │ └── builders.rs │ │ ├── create_upload_url.rs │ │ ├── create_upload_url │ │ │ ├── _create_upload_url_input.rs │ │ │ ├── _create_upload_url_output.rs │ │ │ └── builders.rs │ │ ├── create_user_memory_entry.rs │ │ ├── create_user_memory_entry │ │ │ ├── _create_user_memory_entry_input.rs │ │ │ ├── _create_user_memory_entry_output.rs │ │ │ └── builders.rs │ │ ├── create_workspace.rs │ │ ├── create_workspace │ │ │ ├── _create_workspace_input.rs │ │ │ ├── _create_workspace_output.rs │ │ │ └── builders.rs │ │ ├── delete_task_assist_conversation.rs │ │ ├── delete_task_assist_conversation │ │ │ ├── _delete_task_assist_conversation_input.rs │ │ │ ├── _delete_task_assist_conversation_output.rs │ │ │ └── builders.rs │ │ ├── delete_user_memory_entry.rs │ │ ├── delete_user_memory_entry │ │ │ ├── _delete_user_memory_entry_input.rs │ │ │ ├── _delete_user_memory_entry_output.rs │ │ │ └── builders.rs │ │ ├── delete_workspace.rs │ │ ├── delete_workspace │ │ │ ├── _delete_workspace_input.rs │ │ │ ├── _delete_workspace_output.rs │ │ │ └── builders.rs │ │ ├── generate_completions.rs │ │ ├── generate_completions │ │ │ ├── _generate_completions_input.rs │ │ │ ├── _generate_completions_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── get_code_analysis.rs │ │ ├── get_code_analysis │ │ │ ├── _get_code_analysis_input.rs │ │ │ ├── _get_code_analysis_output.rs │ │ │ └── builders.rs │ │ ├── get_code_fix_job.rs │ │ ├── get_code_fix_job │ │ │ ├── _get_code_fix_job_input.rs │ │ │ ├── _get_code_fix_job_output.rs │ │ │ └── builders.rs │ │ ├── get_task_assist_code_generation.rs │ │ ├── get_task_assist_code_generation │ │ │ ├── _get_task_assist_code_generation_input.rs │ │ │ ├── _get_task_assist_code_generation_output.rs │ │ │ └── builders.rs │ │ ├── get_test_generation.rs │ │ ├── get_test_generation │ │ │ ├── _get_test_generation_input.rs │ │ │ ├── _get_test_generation_output.rs │ │ │ └── builders.rs │ │ ├── get_transformation.rs │ │ ├── get_transformation │ │ │ ├── _get_transformation_input.rs │ │ │ ├── _get_transformation_output.rs │ │ │ └── builders.rs │ │ ├── get_transformation_plan.rs │ │ ├── get_transformation_plan │ │ │ ├── _get_transformation_plan_input.rs │ │ │ ├── _get_transformation_plan_output.rs │ │ │ └── builders.rs │ │ ├── get_usage_limits.rs │ │ ├── get_usage_limits │ │ │ ├── _get_usage_limits_input.rs │ │ │ ├── _get_usage_limits_output.rs │ │ │ └── builders.rs │ │ ├── list_available_customizations.rs │ │ ├── list_available_customizations │ │ │ ├── _list_available_customizations_input.rs │ │ │ ├── _list_available_customizations_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_available_profiles.rs │ │ ├── list_available_profiles │ │ │ ├── _list_available_profiles_input.rs │ │ │ ├── _list_available_profiles_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_code_analysis_findings.rs │ │ ├── list_code_analysis_findings │ │ │ ├── _list_code_analysis_findings_input.rs │ │ │ ├── _list_code_analysis_findings_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_events.rs │ │ ├── list_events │ │ │ ├── _list_events_input.rs │ │ │ ├── _list_events_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_feature_evaluations.rs │ │ ├── list_feature_evaluations │ │ │ ├── _list_feature_evaluations_input.rs │ │ │ ├── _list_feature_evaluations_output.rs │ │ │ └── builders.rs │ │ ├── list_user_memory_entries.rs │ │ ├── list_user_memory_entries │ │ │ ├── _list_user_memory_entries_input.rs │ │ │ ├── _list_user_memory_entries_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_workspace_metadata.rs │ │ ├── list_workspace_metadata │ │ │ ├── _list_workspace_metadata_input.rs │ │ │ ├── _list_workspace_metadata_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── push_telemetry_event.rs │ │ ├── push_telemetry_event │ │ │ ├── _push_telemetry_event_input.rs │ │ │ ├── _push_telemetry_event_output.rs │ │ │ └── builders.rs │ │ ├── resume_transformation.rs │ │ ├── resume_transformation │ │ │ ├── _resume_transformation_input.rs │ │ │ ├── _resume_transformation_output.rs │ │ │ └── builders.rs │ │ ├── send_telemetry_event.rs │ │ ├── send_telemetry_event │ │ │ ├── _send_telemetry_event_input.rs │ │ │ ├── _send_telemetry_event_output.rs │ │ │ └── builders.rs │ │ ├── start_code_analysis.rs │ │ ├── start_code_analysis │ │ │ ├── _start_code_analysis_input.rs │ │ │ ├── _start_code_analysis_output.rs │ │ │ └── builders.rs │ │ ├── start_code_fix_job.rs │ │ ├── start_code_fix_job │ │ │ ├── _start_code_fix_job_input.rs │ │ │ ├── _start_code_fix_job_output.rs │ │ │ └── builders.rs │ │ ├── start_task_assist_code_generation.rs │ │ ├── start_task_assist_code_generation │ │ │ ├── _start_task_assist_code_generation_input.rs │ │ │ ├── _start_task_assist_code_generation_output.rs │ │ │ └── builders.rs │ │ ├── start_test_generation.rs │ │ ├── start_test_generation │ │ │ ├── _start_test_generation_input.rs │ │ │ ├── _start_test_generation_output.rs │ │ │ └── builders.rs │ │ ├── start_transformation.rs │ │ ├── start_transformation │ │ │ ├── _start_transformation_input.rs │ │ │ ├── _start_transformation_output.rs │ │ │ └── builders.rs │ │ ├── stop_transformation.rs │ │ ├── stop_transformation │ │ │ ├── _stop_transformation_input.rs │ │ │ ├── _stop_transformation_output.rs │ │ │ └── builders.rs │ │ ├── update_usage_limits.rs │ │ └── update_usage_limits │ │ │ ├── _update_usage_limits_input.rs │ │ │ ├── _update_usage_limits_output.rs │ │ │ └── builders.rs │ │ ├── primitives.rs │ │ ├── primitives │ │ ├── event_stream.rs │ │ └── sealed_enum_unknown.rs │ │ ├── protocol_serde.rs │ │ ├── protocol_serde │ │ ├── shape_access_denied_exception.rs │ │ ├── shape_active_functionality_list.rs │ │ ├── shape_additional_content_entry.rs │ │ ├── shape_app_studio_state.rs │ │ ├── shape_application_properties.rs │ │ ├── shape_application_properties_list.rs │ │ ├── shape_assistant_response_message.rs │ │ ├── shape_attributes_map.rs │ │ ├── shape_by_user_analytics.rs │ │ ├── shape_change_log_options.rs │ │ ├── shape_chat_add_message_event.rs │ │ ├── shape_chat_interact_with_message_event.rs │ │ ├── shape_chat_message.rs │ │ ├── shape_chat_user_modification_event.rs │ │ ├── shape_code_analysis_upload_context.rs │ │ ├── shape_code_coverage_event.rs │ │ ├── shape_code_description.rs │ │ ├── shape_code_fix_acceptance_event.rs │ │ ├── shape_code_fix_generation_event.rs │ │ ├── shape_code_fix_upload_context.rs │ │ ├── shape_code_generation_status.rs │ │ ├── shape_code_scan_event.rs │ │ ├── shape_code_scan_failed_event.rs │ │ ├── shape_code_scan_remediations_event.rs │ │ ├── shape_code_scan_succeeded_event.rs │ │ ├── shape_completion.rs │ │ ├── shape_completions.rs │ │ ├── shape_conflict_exception.rs │ │ ├── shape_console_state.rs │ │ ├── shape_conversation_state.rs │ │ ├── shape_create_artifact_upload_url.rs │ │ ├── shape_create_artifact_upload_url_input.rs │ │ ├── shape_create_subscription_token.rs │ │ ├── shape_create_subscription_token_input.rs │ │ ├── shape_create_task_assist_conversation.rs │ │ ├── shape_create_task_assist_conversation_input.rs │ │ ├── shape_create_upload_url.rs │ │ ├── shape_create_upload_url_input.rs │ │ ├── shape_create_user_memory_entry.rs │ │ ├── shape_create_user_memory_entry_input.rs │ │ ├── shape_create_workspace.rs │ │ ├── shape_create_workspace_input.rs │ │ ├── shape_cursor_state.rs │ │ ├── shape_customization.rs │ │ ├── shape_customizations.rs │ │ ├── shape_dashboard_analytics.rs │ │ ├── shape_delete_task_assist_conversation.rs │ │ ├── shape_delete_task_assist_conversation_input.rs │ │ ├── shape_delete_user_memory_entry.rs │ │ ├── shape_delete_user_memory_entry_input.rs │ │ ├── shape_delete_workspace.rs │ │ ├── shape_delete_workspace_input.rs │ │ ├── shape_diagnostic.rs │ │ ├── shape_diagnostic_location.rs │ │ ├── shape_diagnostic_related_information.rs │ │ ├── shape_dimension.rs │ │ ├── shape_doc_generation_event.rs │ │ ├── shape_doc_v2_acceptance_event.rs │ │ ├── shape_doc_v2_generation_event.rs │ │ ├── shape_document_symbol.rs │ │ ├── shape_documentation_intent_context.rs │ │ ├── shape_edit.rs │ │ ├── shape_editor_state.rs │ │ ├── shape_env_state.rs │ │ ├── shape_environment_variable.rs │ │ ├── shape_event.rs │ │ ├── shape_event_list.rs │ │ ├── shape_external_identity_details.rs │ │ ├── shape_feature_dev_code_acceptance_event.rs │ │ ├── shape_feature_dev_code_generation_event.rs │ │ ├── shape_feature_dev_event.rs │ │ ├── shape_feature_evaluation.rs │ │ ├── shape_feature_evaluations_list.rs │ │ ├── shape_feature_value.rs │ │ ├── shape_file_context.rs │ │ ├── shape_followup_prompt.rs │ │ ├── shape_generate_completions.rs │ │ ├── shape_generate_completions_input.rs │ │ ├── shape_get_code_analysis.rs │ │ ├── shape_get_code_analysis_input.rs │ │ ├── shape_get_code_fix_job.rs │ │ ├── shape_get_code_fix_job_input.rs │ │ ├── shape_get_task_assist_code_generation.rs │ │ ├── shape_get_task_assist_code_generation_input.rs │ │ ├── shape_get_test_generation.rs │ │ ├── shape_get_test_generation_input.rs │ │ ├── shape_get_transformation.rs │ │ ├── shape_get_transformation_input.rs │ │ ├── shape_get_transformation_plan.rs │ │ ├── shape_get_transformation_plan_input.rs │ │ ├── shape_get_usage_limits.rs │ │ ├── shape_get_usage_limits_input.rs │ │ ├── shape_git_state.rs │ │ ├── shape_ide_diagnostic.rs │ │ ├── shape_identity_details.rs │ │ ├── shape_image_block.rs │ │ ├── shape_image_source.rs │ │ ├── shape_import.rs │ │ ├── shape_imports.rs │ │ ├── shape_inline_chat_event.rs │ │ ├── shape_intent_context.rs │ │ ├── shape_internal_server_exception.rs │ │ ├── shape_list_available_customizations.rs │ │ ├── shape_list_available_customizations_input.rs │ │ ├── shape_list_available_profiles.rs │ │ ├── shape_list_available_profiles_input.rs │ │ ├── shape_list_code_analysis_findings.rs │ │ ├── shape_list_code_analysis_findings_input.rs │ │ ├── shape_list_events.rs │ │ ├── shape_list_events_input.rs │ │ ├── shape_list_feature_evaluations.rs │ │ ├── shape_list_feature_evaluations_input.rs │ │ ├── shape_list_user_memory_entries.rs │ │ ├── shape_list_user_memory_entries_input.rs │ │ ├── shape_list_workspace_metadata.rs │ │ ├── shape_list_workspace_metadata_input.rs │ │ ├── shape_memory_entry.rs │ │ ├── shape_memory_entry_list.rs │ │ ├── shape_memory_entry_metadata.rs │ │ ├── shape_metric_data.rs │ │ ├── shape_notifications.rs │ │ ├── shape_notifications_feature.rs │ │ ├── shape_opt_in_features.rs │ │ ├── shape_package_info.rs │ │ ├── shape_package_info_list.rs │ │ ├── shape_position.rs │ │ ├── shape_prediction.rs │ │ ├── shape_predictions.rs │ │ ├── shape_previous_editor_state_metadata.rs │ │ ├── shape_profile.rs │ │ ├── shape_profile_list.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_progress_updates.rs │ │ ├── shape_prompt_logging.rs │ │ ├── shape_push_telemetry_event.rs │ │ ├── shape_push_telemetry_event_input.rs │ │ ├── shape_range.rs │ │ ├── shape_reference.rs │ │ ├── shape_reference_tracker_configuration.rs │ │ ├── shape_references.rs │ │ ├── shape_relevant_text_document.rs │ │ ├── shape_request_headers.rs │ │ ├── shape_resource_not_found_exception.rs │ │ ├── shape_resource_policy.rs │ │ ├── shape_resume_transformation.rs │ │ ├── shape_resume_transformation_input.rs │ │ ├── shape_runtime_diagnostic.rs │ │ ├── shape_send_telemetry_event.rs │ │ ├── shape_send_telemetry_event_input.rs │ │ ├── shape_service_quota_exceeded_exception.rs │ │ ├── shape_shell_history_entry.rs │ │ ├── shape_shell_state.rs │ │ ├── shape_span.rs │ │ ├── shape_sso_identity_details.rs │ │ ├── shape_start_code_analysis.rs │ │ ├── shape_start_code_analysis_input.rs │ │ ├── shape_start_code_fix_job.rs │ │ ├── shape_start_code_fix_job_input.rs │ │ ├── shape_start_task_assist_code_generation.rs │ │ ├── shape_start_task_assist_code_generation_input.rs │ │ ├── shape_start_test_generation.rs │ │ ├── shape_start_test_generation_input.rs │ │ ├── shape_start_transformation.rs │ │ ├── shape_start_transformation_input.rs │ │ ├── shape_stop_transformation.rs │ │ ├── shape_stop_transformation_input.rs │ │ ├── shape_string_list.rs │ │ ├── shape_suggested_fix.rs │ │ ├── shape_supplemental_context.rs │ │ ├── shape_supplemental_context_metadata.rs │ │ ├── shape_supplementary_web_link.rs │ │ ├── shape_target_code.rs │ │ ├── shape_target_file_info.rs │ │ ├── shape_target_file_info_list.rs │ │ ├── shape_task_assist_plan_step.rs │ │ ├── shape_task_assist_planning_upload_context.rs │ │ ├── shape_telemetry_event.rs │ │ ├── shape_terminal_user_interaction_event.rs │ │ ├── shape_test_generation_event.rs │ │ ├── shape_test_generation_job.rs │ │ ├── shape_text_document.rs │ │ ├── shape_text_document_diagnostic.rs │ │ ├── shape_throttling_exception.rs │ │ ├── shape_tool.rs │ │ ├── shape_tool_input_schema.rs │ │ ├── shape_tool_result.rs │ │ ├── shape_tool_result_content_block.rs │ │ ├── shape_tool_specification.rs │ │ ├── shape_tool_use.rs │ │ ├── shape_transform_event.rs │ │ ├── shape_transformation_download_artifact.rs │ │ ├── shape_transformation_download_artifacts.rs │ │ ├── shape_transformation_job.rs │ │ ├── shape_transformation_languages.rs │ │ ├── shape_transformation_plan.rs │ │ ├── shape_transformation_platform_config.rs │ │ ├── shape_transformation_progress_update.rs │ │ ├── shape_transformation_project_artifact_descriptor.rs │ │ ├── shape_transformation_project_state.rs │ │ ├── shape_transformation_runtime_env.rs │ │ ├── shape_transformation_source_code_artifact_descriptor.rs │ │ ├── shape_transformation_spec.rs │ │ ├── shape_transformation_step.rs │ │ ├── shape_transformation_steps.rs │ │ ├── shape_transformation_upload_context.rs │ │ ├── shape_update_usage_limit_quota_exceeded_exception.rs │ │ ├── shape_update_usage_limits.rs │ │ ├── shape_update_usage_limits_input.rs │ │ ├── shape_upload_context.rs │ │ ├── shape_usage_limit_list.rs │ │ ├── shape_usage_limits.rs │ │ ├── shape_user_context.rs │ │ ├── shape_user_input_message.rs │ │ ├── shape_user_input_message_context.rs │ │ ├── shape_user_modification_event.rs │ │ ├── shape_user_settings.rs │ │ ├── shape_user_trigger_decision_event.rs │ │ ├── shape_validation_exception.rs │ │ ├── shape_workspace_context.rs │ │ ├── shape_workspace_context_upload_context.rs │ │ ├── shape_workspace_list.rs │ │ ├── shape_workspace_metadata.rs │ │ └── shape_workspace_state.rs │ │ ├── sdk_feature_tracker.rs │ │ ├── serde_util.rs │ │ ├── serialization_settings.rs │ │ ├── types.rs │ │ └── types │ │ ├── _access_denied_exception_reason.rs │ │ ├── _additional_content_entry.rs │ │ ├── _agentic_chat_event_status.rs │ │ ├── _app_studio_state.rs │ │ ├── _application_properties.rs │ │ ├── _artifact_type.rs │ │ ├── _assistant_response_message.rs │ │ ├── _by_user_analytics.rs │ │ ├── _change_log_granularity_type.rs │ │ ├── _change_log_options.rs │ │ ├── _chat_add_message_event.rs │ │ ├── _chat_interact_with_message_event.rs │ │ ├── _chat_message.rs │ │ ├── _chat_message_interaction_type.rs │ │ ├── _chat_trigger_type.rs │ │ ├── _chat_user_modification_event.rs │ │ ├── _code_analysis_findings_schema.rs │ │ ├── _code_analysis_scope.rs │ │ ├── _code_analysis_status.rs │ │ ├── _code_analysis_upload_context.rs │ │ ├── _code_coverage_event.rs │ │ ├── _code_description.rs │ │ ├── _code_fix_acceptance_event.rs │ │ ├── _code_fix_generation_event.rs │ │ ├── _code_fix_job_status.rs │ │ ├── _code_fix_upload_context.rs │ │ ├── _code_generation_status.rs │ │ ├── _code_generation_workflow_stage.rs │ │ ├── _code_generation_workflow_status.rs │ │ ├── _code_scan_event.rs │ │ ├── _code_scan_failed_event.rs │ │ ├── _code_scan_remediations_event.rs │ │ ├── _code_scan_remediations_event_type.rs │ │ ├── _code_scan_succeeded_event.rs │ │ ├── _completion.rs │ │ ├── _completion_type.rs │ │ ├── _conflict_exception_reason.rs │ │ ├── _console_state.rs │ │ ├── _content_checksum_type.rs │ │ ├── _content_type.rs │ │ ├── _context_truncation_scheme.rs │ │ ├── _conversation_state.rs │ │ ├── _cursor_state.rs │ │ ├── _customization.rs │ │ ├── _dashboard_analytics.rs │ │ ├── _diagnostic.rs │ │ ├── _diagnostic_location.rs │ │ ├── _diagnostic_related_information.rs │ │ ├── _diagnostic_severity.rs │ │ ├── _diagnostic_tag.rs │ │ ├── _dimension.rs │ │ ├── _doc_folder_level.rs │ │ ├── _doc_generation_event.rs │ │ ├── _doc_interaction_type.rs │ │ ├── _doc_user_decision.rs │ │ ├── _doc_v2_acceptance_event.rs │ │ ├── _doc_v2_generation_event.rs │ │ ├── _document_symbol.rs │ │ ├── _documentation_intent_context.rs │ │ ├── _documentation_type.rs │ │ ├── _edit.rs │ │ ├── _editor_state.rs │ │ ├── _env_state.rs │ │ ├── _environment_variable.rs │ │ ├── _event.rs │ │ ├── _external_identity_details.rs │ │ ├── _feature_dev_code_acceptance_event.rs │ │ ├── _feature_dev_code_generation_event.rs │ │ ├── _feature_dev_event.rs │ │ ├── _feature_evaluation.rs │ │ ├── _feature_value.rs │ │ ├── _file_context.rs │ │ ├── _followup_prompt.rs │ │ ├── _functionality_name.rs │ │ ├── _git_state.rs │ │ ├── _ide_category.rs │ │ ├── _ide_diagnostic.rs │ │ ├── _ide_diagnostic_type.rs │ │ ├── _identity_details.rs │ │ ├── _image_block.rs │ │ ├── _image_format.rs │ │ ├── _image_source.rs │ │ ├── _import.rs │ │ ├── _inline_chat_event.rs │ │ ├── _inline_chat_user_decision.rs │ │ ├── _intent.rs │ │ ├── _intent_context.rs │ │ ├── _memory_entry.rs │ │ ├── _memory_entry_metadata.rs │ │ ├── _memory_status.rs │ │ ├── _metric_data.rs │ │ ├── _notifications_feature.rs │ │ ├── _operating_system.rs │ │ ├── _opt_in_feature_toggle.rs │ │ ├── _opt_in_features.rs │ │ ├── _opt_out_preference.rs │ │ ├── _origin.rs │ │ ├── _package_info.rs │ │ ├── _position.rs │ │ ├── _prediction.rs │ │ ├── _prediction_type.rs │ │ ├── _previous_editor_state_metadata.rs │ │ ├── _profile.rs │ │ ├── _profile_status.rs │ │ ├── _profile_type.rs │ │ ├── _programming_language.rs │ │ ├── _prompt_logging.rs │ │ ├── _range.rs │ │ ├── _recommendations_with_references_preference.rs │ │ ├── _reference.rs │ │ ├── _reference_tracker_configuration.rs │ │ ├── _relevant_text_document.rs │ │ ├── _resource_policy.rs │ │ ├── _resource_policy_effect.rs │ │ ├── _runtime_diagnostic.rs │ │ ├── _service_quota_exceeded_exception_reason.rs │ │ ├── _shell_history_entry.rs │ │ ├── _shell_state.rs │ │ ├── _span.rs │ │ ├── _sso_identity_details.rs │ │ ├── _subscription_status.rs │ │ ├── _suggested_fix.rs │ │ ├── _suggestion_state.rs │ │ ├── _supplemental_context.rs │ │ ├── _supplemental_context_metadata.rs │ │ ├── _supplemental_context_type.rs │ │ ├── _supplementary_web_link.rs │ │ ├── _symbol_type.rs │ │ ├── _target_code.rs │ │ ├── _target_file_info.rs │ │ ├── _task_assist_plan_step.rs │ │ ├── _task_assist_plan_step_action.rs │ │ ├── _task_assist_planning_upload_context.rs │ │ ├── _telemetry_event.rs │ │ ├── _terminal_user_interaction_event.rs │ │ ├── _terminal_user_interaction_event_type.rs │ │ ├── _test_generation_event.rs │ │ ├── _test_generation_job.rs │ │ ├── _test_generation_job_status.rs │ │ ├── _text_document.rs │ │ ├── _text_document_diagnostic.rs │ │ ├── _throttling_exception_reason.rs │ │ ├── _tool.rs │ │ ├── _tool_input_schema.rs │ │ ├── _tool_result.rs │ │ ├── _tool_result_content_block.rs │ │ ├── _tool_result_status.rs │ │ ├── _tool_specification.rs │ │ ├── _tool_use.rs │ │ ├── _transform_event.rs │ │ ├── _transformation_dot_net_runtime_env.rs │ │ ├── _transformation_download_artifact.rs │ │ ├── _transformation_download_artifact_type.rs │ │ ├── _transformation_java_runtime_env.rs │ │ ├── _transformation_job.rs │ │ ├── _transformation_language.rs │ │ ├── _transformation_mainframe_runtime_env.rs │ │ ├── _transformation_operating_system_family.rs │ │ ├── _transformation_plan.rs │ │ ├── _transformation_platform_config.rs │ │ ├── _transformation_progress_update.rs │ │ ├── _transformation_progress_update_status.rs │ │ ├── _transformation_project_artifact_descriptor.rs │ │ ├── _transformation_project_state.rs │ │ ├── _transformation_runtime_env.rs │ │ ├── _transformation_source_code_artifact_descriptor.rs │ │ ├── _transformation_spec.rs │ │ ├── _transformation_status.rs │ │ ├── _transformation_step.rs │ │ ├── _transformation_step_status.rs │ │ ├── _transformation_type.rs │ │ ├── _transformation_upload_artifact_type.rs │ │ ├── _transformation_upload_context.rs │ │ ├── _transformation_user_action_status.rs │ │ ├── _upload_context.rs │ │ ├── _upload_intent.rs │ │ ├── _usage_limit_list.rs │ │ ├── _usage_limit_type.rs │ │ ├── _usage_limit_update_request_status.rs │ │ ├── _user_context.rs │ │ ├── _user_input_message.rs │ │ ├── _user_input_message_context.rs │ │ ├── _user_intent.rs │ │ ├── _user_modification_event.rs │ │ ├── _user_settings.rs │ │ ├── _user_trigger_decision_event.rs │ │ ├── _validation_exception_reason.rs │ │ ├── _workspace_context.rs │ │ ├── _workspace_context_upload_context.rs │ │ ├── _workspace_metadata.rs │ │ ├── _workspace_state.rs │ │ ├── _workspace_status.rs │ │ ├── builders.rs │ │ ├── error.rs │ │ └── error │ │ ├── _access_denied_exception.rs │ │ ├── _conflict_exception.rs │ │ ├── _internal_server_exception.rs │ │ ├── _resource_not_found_exception.rs │ │ ├── _service_quota_exceeded_exception.rs │ │ ├── _throttling_exception.rs │ │ ├── _update_usage_limit_quota_exceeded_exception.rs │ │ ├── _validation_exception.rs │ │ └── builders.rs ├── amzn-codewhisperer-streaming-client │ ├── Cargo.toml │ ├── LICENSE │ └── src │ │ ├── auth_plugin.rs │ │ ├── client.rs │ │ ├── client │ │ ├── customize.rs │ │ ├── customize │ │ │ └── internal.rs │ │ ├── export_result_archive.rs │ │ ├── generate_assistant_response.rs │ │ ├── generate_task_assist_plan.rs │ │ └── send_message.rs │ │ ├── config.rs │ │ ├── config │ │ ├── endpoint.rs │ │ ├── http.rs │ │ ├── interceptors.rs │ │ ├── retry.rs │ │ └── timeout.rs │ │ ├── error.rs │ │ ├── error │ │ └── sealed_unhandled.rs │ │ ├── error_meta.rs │ │ ├── event_receiver.rs │ │ ├── event_stream_serde.rs │ │ ├── json_errors.rs │ │ ├── lib.rs │ │ ├── meta.rs │ │ ├── operation.rs │ │ ├── operation │ │ ├── export_result_archive.rs │ │ ├── export_result_archive │ │ │ ├── _export_result_archive_input.rs │ │ │ ├── _export_result_archive_output.rs │ │ │ └── builders.rs │ │ ├── generate_assistant_response.rs │ │ ├── generate_assistant_response │ │ │ ├── _generate_assistant_response_input.rs │ │ │ ├── _generate_assistant_response_output.rs │ │ │ └── builders.rs │ │ ├── generate_task_assist_plan.rs │ │ ├── generate_task_assist_plan │ │ │ ├── _generate_task_assist_plan_input.rs │ │ │ ├── _generate_task_assist_plan_output.rs │ │ │ └── builders.rs │ │ ├── send_message.rs │ │ └── send_message │ │ │ ├── _send_message_input.rs │ │ │ ├── _send_message_output.rs │ │ │ └── builders.rs │ │ ├── primitives.rs │ │ ├── primitives │ │ ├── event_stream.rs │ │ └── sealed_enum_unknown.rs │ │ ├── protocol_serde.rs │ │ ├── protocol_serde │ │ ├── shape_access_denied_error.rs │ │ ├── shape_action.rs │ │ ├── shape_additional_content_entry.rs │ │ ├── shape_alert.rs │ │ ├── shape_alert_component.rs │ │ ├── shape_alert_component_list.rs │ │ ├── shape_app_studio_state.rs │ │ ├── shape_assistant_response_event.rs │ │ ├── shape_assistant_response_message.rs │ │ ├── shape_binary_metadata_event.rs │ │ ├── shape_binary_payload_event.rs │ │ ├── shape_chat_message.rs │ │ ├── shape_citation_event.rs │ │ ├── shape_citation_target.rs │ │ ├── shape_cloud_watch_troubleshooting_link.rs │ │ ├── shape_code_description.rs │ │ ├── shape_code_event.rs │ │ ├── shape_code_reference_event.rs │ │ ├── shape_conflict_exception.rs │ │ ├── shape_console_state.rs │ │ ├── shape_conversation_state.rs │ │ ├── shape_cursor_state.rs │ │ ├── shape_diagnostic.rs │ │ ├── shape_diagnostic_location.rs │ │ ├── shape_diagnostic_related_information.rs │ │ ├── shape_document_symbol.rs │ │ ├── shape_dry_run_operation_exception.rs │ │ ├── shape_editor_state.rs │ │ ├── shape_env_state.rs │ │ ├── shape_environment_variable.rs │ │ ├── shape_export_context.rs │ │ ├── shape_export_result_archive.rs │ │ ├── shape_export_result_archive_input.rs │ │ ├── shape_export_result_archive_output.rs │ │ ├── shape_followup_prompt.rs │ │ ├── shape_followup_prompt_event.rs │ │ ├── shape_generate_assistant_response.rs │ │ ├── shape_generate_assistant_response_input.rs │ │ ├── shape_generate_assistant_response_output.rs │ │ ├── shape_generate_task_assist_plan.rs │ │ ├── shape_generate_task_assist_plan_input.rs │ │ ├── shape_generate_task_assist_plan_output.rs │ │ ├── shape_git_state.rs │ │ ├── shape_image_block.rs │ │ ├── shape_image_source.rs │ │ ├── shape_infrastructure_update.rs │ │ ├── shape_infrastructure_update_transition.rs │ │ ├── shape_intent_data.rs │ │ ├── shape_intent_data_type.rs │ │ ├── shape_intent_map.rs │ │ ├── shape_intents_event.rs │ │ ├── shape_interaction_component.rs │ │ ├── shape_interaction_component_entry.rs │ │ ├── shape_interaction_component_entry_list.rs │ │ ├── shape_interaction_components_event.rs │ │ ├── shape_internal_server_error.rs │ │ ├── shape_invalid_state_event.rs │ │ ├── shape_message_metadata_event.rs │ │ ├── shape_module_link.rs │ │ ├── shape_position.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_progress.rs │ │ ├── shape_progress_component.rs │ │ ├── shape_progress_component_list.rs │ │ ├── shape_range.rs │ │ ├── shape_reference.rs │ │ ├── shape_references.rs │ │ ├── shape_relevant_text_document.rs │ │ ├── shape_resource.rs │ │ ├── shape_resource_list.rs │ │ ├── shape_resource_not_found_exception.rs │ │ ├── shape_resources.rs │ │ ├── shape_runtime_diagnostic.rs │ │ ├── shape_section.rs │ │ ├── shape_section_component.rs │ │ ├── shape_section_component_list.rs │ │ ├── shape_send_message.rs │ │ ├── shape_send_message_input.rs │ │ ├── shape_send_message_output.rs │ │ ├── shape_service_quota_exceeded_error.rs │ │ ├── shape_shell_history_entry.rs │ │ ├── shape_shell_state.rs │ │ ├── shape_span.rs │ │ ├── shape_step.rs │ │ ├── shape_step_component.rs │ │ ├── shape_step_component_list.rs │ │ ├── shape_suggestion.rs │ │ ├── shape_suggestion_list.rs │ │ ├── shape_suggestions.rs │ │ ├── shape_supplementary_web_link.rs │ │ ├── shape_supplementary_web_links.rs │ │ ├── shape_supplementary_web_links_event.rs │ │ ├── shape_task_action.rs │ │ ├── shape_task_action_confirmation.rs │ │ ├── shape_task_action_list.rs │ │ ├── shape_task_action_note.rs │ │ ├── shape_task_action_payload.rs │ │ ├── shape_task_component.rs │ │ ├── shape_task_component_list.rs │ │ ├── shape_task_details.rs │ │ ├── shape_task_overview.rs │ │ ├── shape_task_reference.rs │ │ ├── shape_text.rs │ │ ├── shape_text_document.rs │ │ ├── shape_text_document_diagnostic.rs │ │ ├── shape_throttling_error.rs │ │ ├── shape_tool.rs │ │ ├── shape_tool_input_schema.rs │ │ ├── shape_tool_result.rs │ │ ├── shape_tool_result_content.rs │ │ ├── shape_tool_result_content_block.rs │ │ ├── shape_tool_result_event.rs │ │ ├── shape_tool_specification.rs │ │ ├── shape_tool_use.rs │ │ ├── shape_tool_use_event.rs │ │ ├── shape_transformation_export_context.rs │ │ ├── shape_unit_test_generation_export_context.rs │ │ ├── shape_user_input_message.rs │ │ ├── shape_user_input_message_context.rs │ │ ├── shape_user_settings.rs │ │ ├── shape_validation_error.rs │ │ ├── shape_web_link.rs │ │ └── shape_workspace_state.rs │ │ ├── sdk_feature_tracker.rs │ │ ├── serde_util.rs │ │ ├── serialization_settings.rs │ │ ├── types.rs │ │ └── types │ │ ├── _access_denied_exception_reason.rs │ │ ├── _action.rs │ │ ├── _additional_content_entry.rs │ │ ├── _alert.rs │ │ ├── _alert_component.rs │ │ ├── _alert_type.rs │ │ ├── _app_studio_state.rs │ │ ├── _assistant_response_event.rs │ │ ├── _assistant_response_message.rs │ │ ├── _binary_metadata_event.rs │ │ ├── _binary_payload_event.rs │ │ ├── _chat_message.rs │ │ ├── _chat_response_stream.rs │ │ ├── _chat_trigger_type.rs │ │ ├── _citation_event.rs │ │ ├── _citation_target.rs │ │ ├── _cloud_watch_troubleshooting_link.rs │ │ ├── _code_description.rs │ │ ├── _code_event.rs │ │ ├── _code_reference_event.rs │ │ ├── _conflict_exception_reason.rs │ │ ├── _console_state.rs │ │ ├── _content_checksum_type.rs │ │ ├── _content_type.rs │ │ ├── _context_truncation_scheme.rs │ │ ├── _conversation_state.rs │ │ ├── _cursor_state.rs │ │ ├── _diagnostic.rs │ │ ├── _diagnostic_location.rs │ │ ├── _diagnostic_related_information.rs │ │ ├── _diagnostic_severity.rs │ │ ├── _diagnostic_tag.rs │ │ ├── _document_symbol.rs │ │ ├── _dry_run_succeed_event.rs │ │ ├── _editor_state.rs │ │ ├── _env_state.rs │ │ ├── _environment_variable.rs │ │ ├── _export_context.rs │ │ ├── _export_intent.rs │ │ ├── _followup_prompt.rs │ │ ├── _followup_prompt_event.rs │ │ ├── _git_state.rs │ │ ├── _image_block.rs │ │ ├── _image_format.rs │ │ ├── _image_source.rs │ │ ├── _infrastructure_update.rs │ │ ├── _infrastructure_update_transition.rs │ │ ├── _intent_data_type.rs │ │ ├── _intent_type.rs │ │ ├── _intents_event.rs │ │ ├── _interaction_component.rs │ │ ├── _interaction_component_entry.rs │ │ ├── _interaction_components_event.rs │ │ ├── _invalid_state_event.rs │ │ ├── _invalid_state_reason.rs │ │ ├── _message_metadata_event.rs │ │ ├── _module_link.rs │ │ ├── _origin.rs │ │ ├── _position.rs │ │ ├── _programming_language.rs │ │ ├── _progress.rs │ │ ├── _progress_component.rs │ │ ├── _range.rs │ │ ├── _reference.rs │ │ ├── _relevant_text_document.rs │ │ ├── _resource.rs │ │ ├── _resource_list.rs │ │ ├── _result_archive_stream.rs │ │ ├── _runtime_diagnostic.rs │ │ ├── _section.rs │ │ ├── _section_component.rs │ │ ├── _service_quota_exceeded_exception_reason.rs │ │ ├── _shell_history_entry.rs │ │ ├── _shell_state.rs │ │ ├── _span.rs │ │ ├── _step.rs │ │ ├── _step_component.rs │ │ ├── _step_state.rs │ │ ├── _suggestion.rs │ │ ├── _suggestions.rs │ │ ├── _supplementary_web_link.rs │ │ ├── _supplementary_web_links_event.rs │ │ ├── _symbol_type.rs │ │ ├── _task_action.rs │ │ ├── _task_action_confirmation.rs │ │ ├── _task_action_note.rs │ │ ├── _task_action_note_type.rs │ │ ├── _task_component.rs │ │ ├── _task_details.rs │ │ ├── _task_overview.rs │ │ ├── _task_reference.rs │ │ ├── _text.rs │ │ ├── _text_document.rs │ │ ├── _text_document_diagnostic.rs │ │ ├── _throttling_exception_reason.rs │ │ ├── _tool.rs │ │ ├── _tool_input_schema.rs │ │ ├── _tool_result.rs │ │ ├── _tool_result_content_block.rs │ │ ├── _tool_result_event.rs │ │ ├── _tool_result_status.rs │ │ ├── _tool_specification.rs │ │ ├── _tool_use.rs │ │ ├── _tool_use_event.rs │ │ ├── _transformation_download_artifact_type.rs │ │ ├── _transformation_export_context.rs │ │ ├── _unit_test_generation_export_context.rs │ │ ├── _user_input_message.rs │ │ ├── _user_input_message_context.rs │ │ ├── _user_intent.rs │ │ ├── _user_settings.rs │ │ ├── _validation_exception_reason.rs │ │ ├── _web_link.rs │ │ ├── _workspace_state.rs │ │ ├── builders.rs │ │ ├── error.rs │ │ └── error │ │ ├── _access_denied_error.rs │ │ ├── _conflict_exception.rs │ │ ├── _dry_run_operation_exception.rs │ │ ├── _internal_server_error.rs │ │ ├── _resource_not_found_exception.rs │ │ ├── _service_quota_exceeded_error.rs │ │ ├── _throttling_error.rs │ │ ├── _validation_error.rs │ │ └── builders.rs ├── amzn-consolas-client │ ├── Cargo.toml │ ├── LICENSE │ └── src │ │ ├── auth_plugin.rs │ │ ├── client.rs │ │ ├── client │ │ ├── allow_vended_log_delivery_for_resource.rs │ │ ├── associate_customization_permission.rs │ │ ├── create_customization.rs │ │ ├── create_profile.rs │ │ ├── customize.rs │ │ ├── customize │ │ │ └── internal.rs │ │ ├── delete_customization.rs │ │ ├── delete_customization_permissions.rs │ │ ├── delete_profile.rs │ │ ├── disassociate_customization_permission.rs │ │ ├── generate_recommendations.rs │ │ ├── get_customization.rs │ │ ├── list_customization_permissions.rs │ │ ├── list_customization_versions.rs │ │ ├── list_customizations.rs │ │ ├── list_profiles.rs │ │ ├── list_tags_for_resource.rs │ │ ├── lock_service_linked_role.rs │ │ ├── tag_resource.rs │ │ ├── unlock_service_linked_role.rs │ │ ├── untag_resource.rs │ │ ├── update_customization.rs │ │ ├── update_profile.rs │ │ └── vend_key_grant.rs │ │ ├── client_idempotency_token.rs │ │ ├── config.rs │ │ ├── config │ │ ├── endpoint.rs │ │ ├── http.rs │ │ ├── interceptors.rs │ │ ├── retry.rs │ │ └── timeout.rs │ │ ├── error.rs │ │ ├── error │ │ └── sealed_unhandled.rs │ │ ├── error_meta.rs │ │ ├── idempotency_token.rs │ │ ├── json_errors.rs │ │ ├── lens.rs │ │ ├── lib.rs │ │ ├── meta.rs │ │ ├── operation.rs │ │ ├── operation │ │ ├── allow_vended_log_delivery_for_resource.rs │ │ ├── allow_vended_log_delivery_for_resource │ │ │ ├── _allow_vended_log_delivery_for_resource_input.rs │ │ │ ├── _allow_vended_log_delivery_for_resource_output.rs │ │ │ └── builders.rs │ │ ├── associate_customization_permission.rs │ │ ├── associate_customization_permission │ │ │ ├── _associate_customization_permission_input.rs │ │ │ ├── _associate_customization_permission_output.rs │ │ │ └── builders.rs │ │ ├── create_customization.rs │ │ ├── create_customization │ │ │ ├── _create_customization_input.rs │ │ │ ├── _create_customization_output.rs │ │ │ └── builders.rs │ │ ├── create_profile.rs │ │ ├── create_profile │ │ │ ├── _create_profile_input.rs │ │ │ ├── _create_profile_output.rs │ │ │ └── builders.rs │ │ ├── delete_customization.rs │ │ ├── delete_customization │ │ │ ├── _delete_customization_input.rs │ │ │ ├── _delete_customization_output.rs │ │ │ └── builders.rs │ │ ├── delete_customization_permissions.rs │ │ ├── delete_customization_permissions │ │ │ ├── _delete_customization_permissions_input.rs │ │ │ ├── _delete_customization_permissions_output.rs │ │ │ └── builders.rs │ │ ├── delete_profile.rs │ │ ├── delete_profile │ │ │ ├── _delete_profile_input.rs │ │ │ ├── _delete_profile_output.rs │ │ │ └── builders.rs │ │ ├── disassociate_customization_permission.rs │ │ ├── disassociate_customization_permission │ │ │ ├── _disassociate_customization_permission_input.rs │ │ │ ├── _disassociate_customization_permission_output.rs │ │ │ └── builders.rs │ │ ├── generate_recommendations.rs │ │ ├── generate_recommendations │ │ │ ├── _generate_recommendations_input.rs │ │ │ ├── _generate_recommendations_output.rs │ │ │ └── builders.rs │ │ ├── get_customization.rs │ │ ├── get_customization │ │ │ ├── _get_customization_input.rs │ │ │ ├── _get_customization_output.rs │ │ │ └── builders.rs │ │ ├── list_customization_permissions.rs │ │ ├── list_customization_permissions │ │ │ ├── _list_customization_permissions_input.rs │ │ │ ├── _list_customization_permissions_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_customization_versions.rs │ │ ├── list_customization_versions │ │ │ ├── _list_customization_versions_input.rs │ │ │ ├── _list_customization_versions_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_customizations.rs │ │ ├── list_customizations │ │ │ ├── _list_customizations_input.rs │ │ │ ├── _list_customizations_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_profiles.rs │ │ ├── list_profiles │ │ │ ├── _list_profiles_input.rs │ │ │ ├── _list_profiles_output.rs │ │ │ ├── builders.rs │ │ │ └── paginator.rs │ │ ├── list_tags_for_resource.rs │ │ ├── list_tags_for_resource │ │ │ ├── _list_tags_for_resource_input.rs │ │ │ ├── _list_tags_for_resource_output.rs │ │ │ └── builders.rs │ │ ├── lock_service_linked_role.rs │ │ ├── lock_service_linked_role │ │ │ ├── _lock_service_linked_role_input.rs │ │ │ ├── _lock_service_linked_role_output.rs │ │ │ └── builders.rs │ │ ├── tag_resource.rs │ │ ├── tag_resource │ │ │ ├── _tag_resource_input.rs │ │ │ ├── _tag_resource_output.rs │ │ │ └── builders.rs │ │ ├── unlock_service_linked_role.rs │ │ ├── unlock_service_linked_role │ │ │ ├── _unlock_service_linked_role_input.rs │ │ │ ├── _unlock_service_linked_role_output.rs │ │ │ └── builders.rs │ │ ├── untag_resource.rs │ │ ├── untag_resource │ │ │ ├── _untag_resource_input.rs │ │ │ ├── _untag_resource_output.rs │ │ │ └── builders.rs │ │ ├── update_customization.rs │ │ ├── update_customization │ │ │ ├── _update_customization_input.rs │ │ │ ├── _update_customization_output.rs │ │ │ └── builders.rs │ │ ├── update_profile.rs │ │ ├── update_profile │ │ │ ├── _update_profile_input.rs │ │ │ ├── _update_profile_output.rs │ │ │ └── builders.rs │ │ ├── vend_key_grant.rs │ │ └── vend_key_grant │ │ │ ├── _vend_key_grant_input.rs │ │ │ ├── _vend_key_grant_output.rs │ │ │ └── builders.rs │ │ ├── primitives.rs │ │ ├── primitives │ │ ├── event_stream.rs │ │ └── sealed_enum_unknown.rs │ │ ├── protocol_serde.rs │ │ ├── protocol_serde │ │ ├── shape_access_denied_exception.rs │ │ ├── shape_active_functionality_list.rs │ │ ├── shape_allow_vended_log_delivery_for_resource.rs │ │ ├── shape_allow_vended_log_delivery_for_resource_input.rs │ │ ├── shape_application_properties.rs │ │ ├── shape_application_properties_list.rs │ │ ├── shape_associate_customization_permission.rs │ │ ├── shape_associate_customization_permission_input.rs │ │ ├── shape_by_user_analytics.rs │ │ ├── shape_code_star_reference.rs │ │ ├── shape_conflict_exception.rs │ │ ├── shape_create_customization.rs │ │ ├── shape_create_customization_input.rs │ │ ├── shape_create_profile.rs │ │ ├── shape_create_profile_input.rs │ │ ├── shape_customization_permission.rs │ │ ├── shape_customization_summary.rs │ │ ├── shape_customization_summary_list.rs │ │ ├── shape_customization_version_summary.rs │ │ ├── shape_customization_version_summary_list.rs │ │ ├── shape_dashboard_analytics.rs │ │ ├── shape_data_reference.rs │ │ ├── shape_delete_customization.rs │ │ ├── shape_delete_customization_input.rs │ │ ├── shape_delete_customization_permissions.rs │ │ ├── shape_delete_customization_permissions_input.rs │ │ ├── shape_delete_profile.rs │ │ ├── shape_delete_profile_input.rs │ │ ├── shape_disassociate_customization_permission.rs │ │ ├── shape_disassociate_customization_permission_input.rs │ │ ├── shape_evaluation_metrics.rs │ │ ├── shape_external_identity_details.rs │ │ ├── shape_external_identity_source.rs │ │ ├── shape_file_context.rs │ │ ├── shape_generate_recommendations.rs │ │ ├── shape_generate_recommendations_input.rs │ │ ├── shape_get_customization.rs │ │ ├── shape_get_customization_input.rs │ │ ├── shape_identity_center_permissions.rs │ │ ├── shape_identity_details.rs │ │ ├── shape_identity_source.rs │ │ ├── shape_import.rs │ │ ├── shape_imports.rs │ │ ├── shape_internal_server_exception.rs │ │ ├── shape_list_customization_permissions.rs │ │ ├── shape_list_customization_permissions_input.rs │ │ ├── shape_list_customization_versions.rs │ │ ├── shape_list_customization_versions_input.rs │ │ ├── shape_list_customizations.rs │ │ ├── shape_list_customizations_input.rs │ │ ├── shape_list_profiles.rs │ │ ├── shape_list_profiles_input.rs │ │ ├── shape_list_tags_for_resource.rs │ │ ├── shape_list_tags_for_resource_input.rs │ │ ├── shape_lock_service_linked_role.rs │ │ ├── shape_lock_service_linked_role_input.rs │ │ ├── shape_notifications.rs │ │ ├── shape_notifications_feature.rs │ │ ├── shape_opt_in_features.rs │ │ ├── shape_previous_editor_state_metadata.rs │ │ ├── shape_profile.rs │ │ ├── shape_profile_list.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_prompt_logging.rs │ │ ├── shape_recommendation.rs │ │ ├── shape_recommendations_list.rs │ │ ├── shape_reference.rs │ │ ├── shape_reference_tracker_configuration.rs │ │ ├── shape_references.rs │ │ ├── shape_repository_list.rs │ │ ├── shape_resource_not_found_exception.rs │ │ ├── shape_resource_policy.rs │ │ ├── shape_s3_reference.rs │ │ ├── shape_service_linked_role_lock_client_exception.rs │ │ ├── shape_service_linked_role_lock_service_exception.rs │ │ ├── shape_span.rs │ │ ├── shape_sso_identity_details.rs │ │ ├── shape_sso_identity_source.rs │ │ ├── shape_string_list_type.rs │ │ ├── shape_supplemental_context.rs │ │ ├── shape_supplemental_context_metadata.rs │ │ ├── shape_tag.rs │ │ ├── shape_tag_list.rs │ │ ├── shape_tag_resource.rs │ │ ├── shape_tag_resource_input.rs │ │ ├── shape_throttling_exception.rs │ │ ├── shape_unlock_service_linked_role.rs │ │ ├── shape_unlock_service_linked_role_input.rs │ │ ├── shape_untag_resource.rs │ │ ├── shape_untag_resource_input.rs │ │ ├── shape_update_customization.rs │ │ ├── shape_update_customization_input.rs │ │ ├── shape_update_profile.rs │ │ ├── shape_update_profile_input.rs │ │ ├── shape_validation_exception.rs │ │ ├── shape_vend_key_grant.rs │ │ ├── shape_vend_key_grant_input.rs │ │ └── shape_workspace_context.rs │ │ ├── sdk_feature_tracker.rs │ │ ├── serde_util.rs │ │ ├── serialization_settings.rs │ │ ├── types.rs │ │ └── types │ │ ├── _access_denied_exception_reason.rs │ │ ├── _application_properties.rs │ │ ├── _by_user_analytics.rs │ │ ├── _code_star_reference.rs │ │ ├── _conflict_exception_reason.rs │ │ ├── _customization_permission.rs │ │ ├── _customization_status.rs │ │ ├── _customization_summary.rs │ │ ├── _customization_version_summary.rs │ │ ├── _dashboard_analytics.rs │ │ ├── _data_reference.rs │ │ ├── _deletion_status.rs │ │ ├── _evaluation_metrics.rs │ │ ├── _external_identity_details.rs │ │ ├── _external_identity_source.rs │ │ ├── _file_context.rs │ │ ├── _functionality_name.rs │ │ ├── _identity_details.rs │ │ ├── _identity_source.rs │ │ ├── _import.rs │ │ ├── _notifications_feature.rs │ │ ├── _opt_in_feature_toggle.rs │ │ ├── _opt_in_features.rs │ │ ├── _previous_editor_state_metadata.rs │ │ ├── _profile.rs │ │ ├── _profile_status.rs │ │ ├── _profile_type.rs │ │ ├── _programming_language.rs │ │ ├── _prompt_logging.rs │ │ ├── _recommendation.rs │ │ ├── _recommendations_with_references_preference.rs │ │ ├── _reference.rs │ │ ├── _reference_tracker_configuration.rs │ │ ├── _resource_policy.rs │ │ ├── _resource_policy_effect.rs │ │ ├── _s3_reference.rs │ │ ├── _span.rs │ │ ├── _sso_identity_details.rs │ │ ├── _sso_identity_source.rs │ │ ├── _supplemental_context.rs │ │ ├── _supplemental_context_metadata.rs │ │ ├── _supplemental_context_type.rs │ │ ├── _tag.rs │ │ ├── _throttling_exception_reason.rs │ │ ├── _update_operation.rs │ │ ├── _validation_exception_reason.rs │ │ ├── _vend_key_grant_use_case.rs │ │ ├── _workspace_context.rs │ │ ├── builders.rs │ │ ├── error.rs │ │ └── error │ │ ├── _access_denied_exception.rs │ │ ├── _conflict_exception.rs │ │ ├── _internal_server_exception.rs │ │ ├── _resource_not_found_exception.rs │ │ ├── _service_linked_role_lock_client_exception.rs │ │ ├── _service_linked_role_lock_service_exception.rs │ │ ├── _throttling_exception.rs │ │ ├── _validation_exception.rs │ │ └── builders.rs ├── amzn-qdeveloper-streaming-client │ ├── Cargo.toml │ ├── LICENSE │ └── src │ │ ├── auth_plugin.rs │ │ ├── client.rs │ │ ├── client │ │ ├── customize.rs │ │ ├── customize │ │ │ └── internal.rs │ │ ├── generate_code_from_commands.rs │ │ └── send_message.rs │ │ ├── config.rs │ │ ├── config │ │ ├── endpoint.rs │ │ ├── http.rs │ │ ├── interceptors.rs │ │ ├── retry.rs │ │ └── timeout.rs │ │ ├── error.rs │ │ ├── error │ │ └── sealed_unhandled.rs │ │ ├── error_meta.rs │ │ ├── event_receiver.rs │ │ ├── event_stream_serde.rs │ │ ├── json_errors.rs │ │ ├── lib.rs │ │ ├── meta.rs │ │ ├── operation.rs │ │ ├── operation │ │ ├── generate_code_from_commands.rs │ │ ├── generate_code_from_commands │ │ │ ├── _generate_code_from_commands_input.rs │ │ │ ├── _generate_code_from_commands_output.rs │ │ │ └── builders.rs │ │ ├── send_message.rs │ │ └── send_message │ │ │ ├── _send_message_input.rs │ │ │ ├── _send_message_output.rs │ │ │ └── builders.rs │ │ ├── primitives.rs │ │ ├── primitives │ │ ├── event_stream.rs │ │ └── sealed_enum_unknown.rs │ │ ├── protocol_serde.rs │ │ ├── protocol_serde │ │ ├── shape_access_denied_error.rs │ │ ├── shape_action.rs │ │ ├── shape_additional_content_entry.rs │ │ ├── shape_alert.rs │ │ ├── shape_alert_component.rs │ │ ├── shape_alert_component_list.rs │ │ ├── shape_app_studio_state.rs │ │ ├── shape_assistant_response_event.rs │ │ ├── shape_assistant_response_message.rs │ │ ├── shape_chat_message.rs │ │ ├── shape_citation_event.rs │ │ ├── shape_citation_target.rs │ │ ├── shape_cloud_watch_troubleshooting_link.rs │ │ ├── shape_code_description.rs │ │ ├── shape_code_event.rs │ │ ├── shape_code_reference_event.rs │ │ ├── shape_command_input.rs │ │ ├── shape_conflict_exception.rs │ │ ├── shape_console_state.rs │ │ ├── shape_conversation_state.rs │ │ ├── shape_cursor_state.rs │ │ ├── shape_diagnostic.rs │ │ ├── shape_diagnostic_location.rs │ │ ├── shape_diagnostic_related_information.rs │ │ ├── shape_document_symbol.rs │ │ ├── shape_dry_run_operation_exception.rs │ │ ├── shape_editor_state.rs │ │ ├── shape_env_state.rs │ │ ├── shape_environment_variable.rs │ │ ├── shape_followup_prompt.rs │ │ ├── shape_followup_prompt_event.rs │ │ ├── shape_generate_code_from_commands.rs │ │ ├── shape_generate_code_from_commands_input.rs │ │ ├── shape_generate_code_from_commands_output.rs │ │ ├── shape_git_state.rs │ │ ├── shape_image_block.rs │ │ ├── shape_image_source.rs │ │ ├── shape_infrastructure_update.rs │ │ ├── shape_infrastructure_update_transition.rs │ │ ├── shape_intent_data.rs │ │ ├── shape_intent_data_type.rs │ │ ├── shape_intent_map.rs │ │ ├── shape_intents_event.rs │ │ ├── shape_interaction_component.rs │ │ ├── shape_interaction_component_entry.rs │ │ ├── shape_interaction_component_entry_list.rs │ │ ├── shape_interaction_components_event.rs │ │ ├── shape_internal_server_error.rs │ │ ├── shape_invalid_state_event.rs │ │ ├── shape_message_metadata_event.rs │ │ ├── shape_module_link.rs │ │ ├── shape_position.rs │ │ ├── shape_programming_language.rs │ │ ├── shape_progress.rs │ │ ├── shape_progress_component.rs │ │ ├── shape_progress_component_list.rs │ │ ├── shape_range.rs │ │ ├── shape_reference.rs │ │ ├── shape_references.rs │ │ ├── shape_relevant_text_document.rs │ │ ├── shape_resource.rs │ │ ├── shape_resource_list.rs │ │ ├── shape_resource_not_found_exception.rs │ │ ├── shape_resources.rs │ │ ├── shape_runtime_diagnostic.rs │ │ ├── shape_section.rs │ │ ├── shape_section_component.rs │ │ ├── shape_section_component_list.rs │ │ ├── shape_send_message.rs │ │ ├── shape_send_message_input.rs │ │ ├── shape_send_message_output.rs │ │ ├── shape_service_quota_exceeded_error.rs │ │ ├── shape_shell_history_entry.rs │ │ ├── shape_shell_state.rs │ │ ├── shape_span.rs │ │ ├── shape_step.rs │ │ ├── shape_step_component.rs │ │ ├── shape_step_component_list.rs │ │ ├── shape_suggestion.rs │ │ ├── shape_suggestion_list.rs │ │ ├── shape_suggestions.rs │ │ ├── shape_supplementary_web_link.rs │ │ ├── shape_supplementary_web_links.rs │ │ ├── shape_supplementary_web_links_event.rs │ │ ├── shape_task_action.rs │ │ ├── shape_task_action_confirmation.rs │ │ ├── shape_task_action_list.rs │ │ ├── shape_task_action_note.rs │ │ ├── shape_task_action_payload.rs │ │ ├── shape_task_component.rs │ │ ├── shape_task_component_list.rs │ │ ├── shape_task_details.rs │ │ ├── shape_task_overview.rs │ │ ├── shape_task_reference.rs │ │ ├── shape_text.rs │ │ ├── shape_text_document.rs │ │ ├── shape_text_document_diagnostic.rs │ │ ├── shape_throttling_error.rs │ │ ├── shape_tool.rs │ │ ├── shape_tool_input_schema.rs │ │ ├── shape_tool_result.rs │ │ ├── shape_tool_result_content.rs │ │ ├── shape_tool_result_content_block.rs │ │ ├── shape_tool_result_event.rs │ │ ├── shape_tool_specification.rs │ │ ├── shape_tool_use.rs │ │ ├── shape_tool_use_event.rs │ │ ├── shape_user_input_message.rs │ │ ├── shape_user_input_message_context.rs │ │ ├── shape_user_settings.rs │ │ ├── shape_validation_error.rs │ │ └── shape_web_link.rs │ │ ├── sdk_feature_tracker.rs │ │ ├── serde_util.rs │ │ ├── serialization_settings.rs │ │ ├── types.rs │ │ └── types │ │ ├── _access_denied_exception_reason.rs │ │ ├── _action.rs │ │ ├── _additional_content_entry.rs │ │ ├── _alert.rs │ │ ├── _alert_component.rs │ │ ├── _alert_type.rs │ │ ├── _app_studio_state.rs │ │ ├── _assistant_response_event.rs │ │ ├── _assistant_response_message.rs │ │ ├── _chat_message.rs │ │ ├── _chat_response_stream.rs │ │ ├── _chat_trigger_type.rs │ │ ├── _citation_event.rs │ │ ├── _citation_target.rs │ │ ├── _cloud_watch_troubleshooting_link.rs │ │ ├── _code_description.rs │ │ ├── _code_event.rs │ │ ├── _code_reference_event.rs │ │ ├── _command_input.rs │ │ ├── _conflict_exception_reason.rs │ │ ├── _console_state.rs │ │ ├── _content_type.rs │ │ ├── _conversation_state.rs │ │ ├── _cursor_state.rs │ │ ├── _diagnostic.rs │ │ ├── _diagnostic_location.rs │ │ ├── _diagnostic_related_information.rs │ │ ├── _diagnostic_severity.rs │ │ ├── _diagnostic_tag.rs │ │ ├── _document_symbol.rs │ │ ├── _dry_run_succeed_event.rs │ │ ├── _editor_state.rs │ │ ├── _env_state.rs │ │ ├── _environment_variable.rs │ │ ├── _followup_prompt.rs │ │ ├── _followup_prompt_event.rs │ │ ├── _generate_code_from_commands_response_stream.rs │ │ ├── _git_state.rs │ │ ├── _image_block.rs │ │ ├── _image_format.rs │ │ ├── _image_source.rs │ │ ├── _infrastructure_update.rs │ │ ├── _infrastructure_update_transition.rs │ │ ├── _intent_data_type.rs │ │ ├── _intent_type.rs │ │ ├── _intents_event.rs │ │ ├── _interaction_component.rs │ │ ├── _interaction_component_entry.rs │ │ ├── _interaction_components_event.rs │ │ ├── _invalid_state_event.rs │ │ ├── _invalid_state_reason.rs │ │ ├── _message_metadata_event.rs │ │ ├── _module_link.rs │ │ ├── _origin.rs │ │ ├── _output_format.rs │ │ ├── _position.rs │ │ ├── _programming_language.rs │ │ ├── _progress.rs │ │ ├── _progress_component.rs │ │ ├── _range.rs │ │ ├── _reference.rs │ │ ├── _relevant_text_document.rs │ │ ├── _resource.rs │ │ ├── _resource_list.rs │ │ ├── _runtime_diagnostic.rs │ │ ├── _section.rs │ │ ├── _section_component.rs │ │ ├── _service_quota_exceeded_exception_reason.rs │ │ ├── _shell_history_entry.rs │ │ ├── _shell_state.rs │ │ ├── _span.rs │ │ ├── _step.rs │ │ ├── _step_component.rs │ │ ├── _step_state.rs │ │ ├── _suggestion.rs │ │ ├── _suggestions.rs │ │ ├── _supplementary_web_link.rs │ │ ├── _supplementary_web_links_event.rs │ │ ├── _symbol_type.rs │ │ ├── _task_action.rs │ │ ├── _task_action_confirmation.rs │ │ ├── _task_action_note.rs │ │ ├── _task_action_note_type.rs │ │ ├── _task_component.rs │ │ ├── _task_details.rs │ │ ├── _task_overview.rs │ │ ├── _task_reference.rs │ │ ├── _text.rs │ │ ├── _text_document.rs │ │ ├── _text_document_diagnostic.rs │ │ ├── _throttling_exception_reason.rs │ │ ├── _tool.rs │ │ ├── _tool_input_schema.rs │ │ ├── _tool_result.rs │ │ ├── _tool_result_content_block.rs │ │ ├── _tool_result_event.rs │ │ ├── _tool_result_status.rs │ │ ├── _tool_specification.rs │ │ ├── _tool_use.rs │ │ ├── _tool_use_event.rs │ │ ├── _user_input_message.rs │ │ ├── _user_input_message_context.rs │ │ ├── _user_intent.rs │ │ ├── _user_settings.rs │ │ ├── _validation_exception_reason.rs │ │ ├── _web_link.rs │ │ ├── builders.rs │ │ ├── error.rs │ │ └── error │ │ ├── _access_denied_error.rs │ │ ├── _conflict_exception.rs │ │ ├── _dry_run_operation_exception.rs │ │ ├── _internal_server_error.rs │ │ ├── _resource_not_found_exception.rs │ │ ├── _service_quota_exceeded_error.rs │ │ ├── _throttling_error.rs │ │ ├── _validation_error.rs │ │ └── builders.rs ├── amzn-toolkit-telemetry-client │ ├── Cargo.toml │ ├── LICENSE │ └── src │ │ ├── auth_plugin.rs │ │ ├── client.rs │ │ ├── client │ │ ├── customize.rs │ │ ├── post_error_report.rs │ │ ├── post_feedback.rs │ │ └── post_metrics.rs │ │ ├── config.rs │ │ ├── config │ │ ├── endpoint.rs │ │ ├── interceptors.rs │ │ ├── retry.rs │ │ └── timeout.rs │ │ ├── error.rs │ │ ├── error │ │ └── sealed_unhandled.rs │ │ ├── error_meta.rs │ │ ├── json_errors.rs │ │ ├── lib.rs │ │ ├── meta.rs │ │ ├── operation.rs │ │ ├── operation │ │ ├── post_error_report.rs │ │ ├── post_error_report │ │ │ ├── _post_error_report_input.rs │ │ │ ├── _post_error_report_output.rs │ │ │ └── builders.rs │ │ ├── post_feedback.rs │ │ ├── post_feedback │ │ │ ├── _post_feedback_input.rs │ │ │ ├── _post_feedback_output.rs │ │ │ └── builders.rs │ │ ├── post_metrics.rs │ │ └── post_metrics │ │ │ ├── _post_metrics_input.rs │ │ │ ├── _post_metrics_output.rs │ │ │ └── builders.rs │ │ ├── primitives.rs │ │ ├── primitives │ │ ├── event_stream.rs │ │ └── sealed_enum_unknown.rs │ │ ├── protocol_serde.rs │ │ ├── protocol_serde │ │ ├── shape_error_details.rs │ │ ├── shape_metadata_entry.rs │ │ ├── shape_metric_datum.rs │ │ ├── shape_post_error_report.rs │ │ ├── shape_post_error_report_input.rs │ │ ├── shape_post_feedback.rs │ │ ├── shape_post_feedback_input.rs │ │ ├── shape_post_metrics.rs │ │ ├── shape_post_metrics_input.rs │ │ └── shape_userdata.rs │ │ ├── serialization_settings.rs │ │ ├── types.rs │ │ └── types │ │ ├── _aws_product.rs │ │ ├── _error_details.rs │ │ ├── _metadata_entry.rs │ │ ├── _metric_datum.rs │ │ ├── _sentiment.rs │ │ ├── _unit.rs │ │ ├── _userdata.rs │ │ └── builders.rs └── cli │ ├── .gitignore │ ├── Cargo.toml │ ├── build.rs │ ├── src │ ├── api_client │ │ ├── clients │ │ │ ├── client.rs │ │ │ ├── mod.rs │ │ │ ├── shared.rs │ │ │ └── streaming_client.rs │ │ ├── consts.rs │ │ ├── credentials │ │ │ └── mod.rs │ │ ├── customization.rs │ │ ├── endpoints.rs │ │ ├── error.rs │ │ ├── interceptor │ │ │ ├── mod.rs │ │ │ └── opt_out.rs │ │ ├── mod.rs │ │ ├── model.rs │ │ ├── profile.rs │ │ └── stage.rs │ ├── auth │ │ ├── builder_id.rs │ │ ├── consts.rs │ │ ├── index.html │ │ ├── mod.rs │ │ ├── pkce.rs │ │ └── scope.rs │ ├── aws_common │ │ ├── http_client.rs │ │ ├── mod.rs │ │ ├── sdk_error_display.rs │ │ └── user_agent_override_interceptor.rs │ ├── cli │ │ ├── chat │ │ │ ├── cli.rs │ │ │ ├── command.rs │ │ │ ├── consts.rs │ │ │ ├── context.rs │ │ │ ├── conversation_state.rs │ │ │ ├── hooks.rs │ │ │ ├── input_source.rs │ │ │ ├── mcp.rs │ │ │ ├── message.rs │ │ │ ├── mod.rs │ │ │ ├── parse.rs │ │ │ ├── parser.rs │ │ │ ├── prompt.rs │ │ │ ├── server_messenger.rs │ │ │ ├── skim_integration.rs │ │ │ ├── token_counter.rs │ │ │ ├── tool_manager.rs │ │ │ ├── tools │ │ │ │ ├── custom_tool.rs │ │ │ │ ├── execute_bash.rs │ │ │ │ ├── fs_read.rs │ │ │ │ ├── fs_write.rs │ │ │ │ ├── gh_issue.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── thinking.rs │ │ │ │ ├── tool_index.json │ │ │ │ └── use_aws.rs │ │ │ └── util │ │ │ │ ├── images.rs │ │ │ │ ├── issue.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── shared_writer.rs │ │ │ │ └── ui.rs │ │ ├── debug.rs │ │ ├── diagnostics.rs │ │ ├── feed.rs │ │ ├── issue.rs │ │ ├── mod.rs │ │ ├── settings.rs │ │ └── user.rs │ ├── database │ │ ├── mod.rs │ │ ├── settings.rs │ │ └── sqlite_migrations │ │ │ ├── 000_migration_table.sql │ │ │ ├── 001_history_table.sql │ │ │ ├── 002_drop_history_in_ssh_docker.sql │ │ │ ├── 003_improved_history_timing.sql │ │ │ ├── 004_state_table.sql │ │ │ ├── 005_auth_table.sql │ │ │ ├── 006_make_state_blob.sql │ │ │ └── 007_conversations_table.sql │ ├── lib.rs │ ├── logging.rs │ ├── main.rs │ ├── mcp_client │ │ ├── client.rs │ │ ├── error.rs │ │ ├── facilitator_types.rs │ │ ├── messenger.rs │ │ ├── mod.rs │ │ ├── server.rs │ │ └── transport │ │ │ ├── base_protocol.rs │ │ │ ├── mod.rs │ │ │ ├── stdio.rs │ │ │ └── websocket.rs │ ├── platform │ │ ├── diagnostics.rs │ │ ├── env.rs │ │ ├── fs.rs │ │ ├── mod.rs │ │ ├── os.rs │ │ ├── providers.rs │ │ └── sysinfo.rs │ ├── request.rs │ ├── telemetry │ │ ├── cognito.rs │ │ ├── core.rs │ │ ├── definitions.rs │ │ ├── endpoint.rs │ │ ├── install_method.rs │ │ └── mod.rs │ └── util │ │ ├── cli_context.rs │ │ ├── consts.rs │ │ ├── directories.rs │ │ ├── mod.rs │ │ ├── open.rs │ │ ├── process │ │ ├── mod.rs │ │ ├── unix.rs │ │ └── windows.rs │ │ ├── spinner.rs │ │ └── system_info │ │ ├── linux.rs │ │ ├── mod.rs │ │ └── windows.rs │ ├── telemetry_definitions.json │ └── test_mcp_server │ └── test_server.rs ├── deny.toml ├── docs ├── SUMMARY.md ├── assets │ ├── architecture.mermaid │ ├── architecture.svg │ └── feed-schema.json ├── installation │ ├── linux.md │ ├── macos.md │ ├── mod.md │ └── ssh.md ├── introduction │ ├── cli.png │ └── mod.md └── support │ ├── doctor.png │ ├── issue.png │ └── mod.md ├── feed.json ├── rust-toolchain.toml ├── scripts ├── build-macos.sh ├── build.py ├── const.py ├── doc.py ├── main.py ├── manifest.py ├── pyproject.toml ├── requirements.txt ├── rust.py ├── setup.sh ├── signing.py ├── test.py ├── util.py └── verify-linux-releases.sh └── typos.toml /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.x86_64-pc-windows-msvc] 2 | rustflags = [ 3 | "-C", "link-arg=/STACK:8000000" 4 | ] 5 | 6 | # 64 bit Mingw 7 | [target.x86_64-pc-windows-gnu] 8 | rustflags = [ 9 | "-C", "link-arg=-Wl,--stack,8000000" 10 | ] -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: "github-actions" 7 | directory: "/" 8 | schedule: 9 | interval: "daily" 10 | assignees: 11 | - "chaynabors" 12 | open-pull-requests-limit: 100 13 | commit-message: 14 | prefix: ci 15 | - package-ecosystem: "cargo" 16 | directory: "/" 17 | schedule: 18 | interval: "daily" 19 | assignees: 20 | - "chaynabors" 21 | open-pull-requests-limit: 100 22 | commit-message: 23 | prefix: fix 24 | prefix-development: chore 25 | include: scope 26 | groups: 27 | aws: 28 | patterns: ["aws-*"] 29 | clap: 30 | patterns: ["clap", "clap_*"] 31 | -------------------------------------------------------------------------------- /.github/media/amazon-q-cli-features.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli/3311ed237c6ebe4ab5ea5edf319bc88d445d2f76/.github/media/amazon-q-cli-features.jpeg -------------------------------------------------------------------------------- /.github/media/amazon-q-logo.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli/3311ed237c6ebe4ab5ea5edf319bc88d445d2f76/.github/media/amazon-q-logo.avif -------------------------------------------------------------------------------- /.github/workflows/typos.yml: -------------------------------------------------------------------------------- 1 | name: Typos 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | push: 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | typos: 13 | name: Spell Check 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 30 16 | steps: 17 | - name: Checkout Actions Repository 18 | uses: actions/checkout@v4 19 | - name: Check spelling 20 | uses: crate-ci/typos@master 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## User settings 2 | xcuserdata/ 3 | 4 | ## gcc Patch 5 | /*.gcno 6 | 7 | # Misc 8 | .DS_Store 9 | node_modules/ 10 | .eslintcache 11 | yarn-error.log 12 | yarn.lock 13 | package-lock.json 14 | *.info 15 | *.swp 16 | *.swo 17 | *.pending-snap 18 | *.sig 19 | *.asc 20 | coverage/ 21 | .turbo 22 | 23 | # Python 24 | __pycache__ 25 | .venv 26 | 27 | # Ignore all compiled protobuf artifacts 28 | **/*.pb.ts 29 | 30 | target/ 31 | build 32 | book/ 33 | .vscode-test/ 34 | 35 | # ide folders 36 | .vscode/ 37 | .fleet/ 38 | .idea/ 39 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @aws/fig 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /Cross.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | pre-build = ["apt-get update && apt-get --assume-yes install unzip zsh"] 3 | 4 | [build.env] 5 | passthrough = [ 6 | "AMAZON_Q_BUILD_TARGET_TRIPLE", 7 | "AMAZON_Q_BUILD_VARIANT", 8 | "AMAZON_Q_BUILD_HASH", 9 | "AMAZON_Q_BUILD_DATETIME", 10 | "AMAZON_Q_BUILD_SKIP_FISH_TESTS", 11 | "AMAZON_Q_BUILD_SKIP_SHELLCHECK_TESTS", 12 | "Q_TELEMETRY_CLIENT_ID", 13 | ] 14 | -------------------------------------------------------------------------------- /LICENSE.MIT: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Amazon.com, Inc. or its affiliates. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Issues 2 | 3 | We take all security reports seriously. When we receive such reports, we will investigate and subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential security issue in this project, please notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [AWS Security](mailto:aws-security@amazon.com). Please do not create a public GitHub issue in this project. 4 | -------------------------------------------------------------------------------- /book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | title = "Amazon Q in the command line" 3 | authors = [ 4 | "Amazon Q CLI Team (q-cli@amazon.com)", 5 | "Chay Nabors (nabochay@amazon.com)", 6 | "Brandon Kiser (bskiser@amazon.com)", 7 | ] 8 | language = "en" 9 | multilingual = false 10 | src = "docs" 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/client/customize/internal.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub type BoxFuture = ::std::pin::Pin<::std::boxed::Box + ::std::marker::Send>>; 3 | 4 | pub type SendResult = ::std::result::Result< 5 | T, 6 | ::aws_smithy_runtime_api::client::result::SdkError, 7 | >; 8 | 9 | pub trait CustomizableSend: ::std::marker::Send + ::std::marker::Sync { 10 | // Takes an owned `self` as the implementation will internally call methods that take `self`. 11 | // If it took `&self`, that would make this trait object safe, but some implementing types do not 12 | // derive `Clone`, unable to yield `self` from `&self`. 13 | fn send(self, config_override: crate::config::Builder) -> BoxFuture>; 14 | } 15 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/interceptors.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::interceptors::context::{ 3 | AfterDeserializationInterceptorContextRef, 4 | BeforeDeserializationInterceptorContextMut, 5 | BeforeDeserializationInterceptorContextRef, 6 | BeforeSerializationInterceptorContextMut, 7 | BeforeSerializationInterceptorContextRef, 8 | BeforeTransmitInterceptorContextMut, 9 | BeforeTransmitInterceptorContextRef, 10 | FinalizerInterceptorContextMut, 11 | FinalizerInterceptorContextRef, 12 | InterceptorContext, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/error/sealed_unhandled.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | /// This struct is not intended to be used. 3 | /// 4 | /// This struct holds information about an unhandled error, 5 | /// but that information should be obtained by using the 6 | /// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait 7 | /// on the error type. 8 | /// 9 | /// This struct intentionally doesn't yield any useful information itself. 10 | #[deprecated( 11 | note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ 12 | variable wildcard pattern and check `.code()`: 13 | \ 14 |    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` 15 | \ 16 | See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." 17 | )] 18 | #[derive(Debug)] 19 | pub struct Unhandled { 20 | pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, 21 | pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("codewhispererruntime", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/primitives/sealed_enum_unknown.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Opaque struct used as inner data for the `Unknown` variant defined in enums in 4 | /// the crate. 5 | /// 6 | /// This is not intended to be used directly. 7 | #[non_exhaustive] 8 | #[derive( 9 | ::std::clone::Clone, 10 | ::std::cmp::Eq, 11 | ::std::cmp::Ord, 12 | ::std::cmp::PartialEq, 13 | ::std::cmp::PartialOrd, 14 | ::std::fmt::Debug, 15 | ::std::hash::Hash, 16 | )] 17 | pub struct UnknownVariantValue(pub(crate) ::std::string::String); 18 | impl UnknownVariantValue { 19 | pub(crate) fn as_str(&self) -> &str { 20 | &self.0 21 | } 22 | } 23 | impl ::std::fmt::Display for UnknownVariantValue { 24 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 25 | write!(f, "{}", self.0) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_additional_content_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_additional_content_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::AdditionalContentEntry, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("name").string(input.name.as_str()); 8 | } 9 | { 10 | object.key("description").string(input.description.as_str()); 11 | } 12 | if let Some(var_1) = &input.inner_context { 13 | object.key("innerContext").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_app_studio_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_app_studio_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::AppStudioState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("namespace").string(input.namespace.as_str()); 8 | } 9 | { 10 | object.key("propertyName").string(input.property_name.as_str()); 11 | } 12 | if let Some(var_1) = &input.property_value { 13 | object.key("propertyValue").string(var_1.as_str()); 14 | } 15 | { 16 | object.key("propertyContext").string(input.property_context.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_change_log_options.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_change_log_options( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ChangeLogOptions, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("granularity").string(input.granularity.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_analysis_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_analysis_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeAnalysisUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("codeScanName").string(input.code_scan_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_description.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_description( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDescription, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("href").string(input.href.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_fix_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_fix_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeFixUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("codeFixName").string(input.code_fix_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_scan_event.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_scan_event( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeScanEvent, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("programmingLanguage").start_object(); 9 | crate::protocol_serde::shape_programming_language::ser_programming_language( 10 | &mut object_1, 11 | &input.programming_language, 12 | )?; 13 | object_1.finish(); 14 | } 15 | { 16 | object.key("codeScanJobId").string(input.code_scan_job_id.as_str()); 17 | } 18 | { 19 | object 20 | .key("timestamp") 21 | .date_time(&input.timestamp, ::aws_smithy_types::date_time::Format::EpochSeconds)?; 22 | } 23 | if let Some(var_2) = &input.code_analysis_scope { 24 | object.key("codeAnalysisScope").string(var_2.as_str()); 25 | } 26 | Ok(()) 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_code_scan_failed_event.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_scan_failed_event( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeScanFailedEvent, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("programmingLanguage").start_object(); 9 | crate::protocol_serde::shape_programming_language::ser_programming_language( 10 | &mut object_1, 11 | &input.programming_language, 12 | )?; 13 | object_1.finish(); 14 | } 15 | { 16 | object.key("codeScanJobId").string(input.code_scan_job_id.as_str()); 17 | } 18 | { 19 | object 20 | .key("timestamp") 21 | .date_time(&input.timestamp, ::aws_smithy_types::date_time::Format::EpochSeconds)?; 22 | } 23 | if let Some(var_2) = &input.code_analysis_scope { 24 | object.key("codeAnalysisScope").string(var_2.as_str()); 25 | } 26 | Ok(()) 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_console_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_console_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ConsoleState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.region { 7 | object.key("region").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.console_url { 10 | object.key("consoleUrl").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.service_id { 13 | object.key("serviceId").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.service_console_page { 16 | object.key("serviceConsolePage").string(var_4.as_str()); 17 | } 18 | if let Some(var_5) = &input.service_subconsole_page { 19 | object.key("serviceSubconsolePage").string(var_5.as_str()); 20 | } 21 | if let Some(var_6) = &input.task_name { 22 | object.key("taskName").string(var_6.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_create_subscription_token_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_create_subscription_token_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::create_subscription_token::CreateSubscriptionTokenInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.account_id { 7 | object.key("accountId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.client_token { 10 | object.key("clientToken").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_create_task_assist_conversation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_create_task_assist_conversation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::create_task_assist_conversation::CreateTaskAssistConversationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.profile_arn { 7 | object.key("profileArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_create_user_memory_entry_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_create_user_memory_entry_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::create_user_memory_entry::CreateUserMemoryEntryInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.memory_entry_string { 7 | object.key("memoryEntryString").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.origin { 10 | object.key("origin").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.client_token { 16 | object.key("clientToken").string(var_4.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_create_workspace_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_create_workspace_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::create_workspace::CreateWorkspaceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.workspace_root { 7 | object.key("workspaceRoot").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_cursor_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_cursor_state( 3 | object_4: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CursorState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::CursorState::Position(inner) => { 8 | #[allow(unused_mut)] 9 | let mut object_1 = object_4.key("position").start_object(); 10 | crate::protocol_serde::shape_position::ser_position(&mut object_1, inner)?; 11 | object_1.finish(); 12 | }, 13 | crate::types::CursorState::Range(inner) => { 14 | #[allow(unused_mut)] 15 | let mut object_2 = object_4.key("range").start_object(); 16 | crate::protocol_serde::shape_range::ser_range(&mut object_2, inner)?; 17 | object_2.finish(); 18 | }, 19 | crate::types::CursorState::Unknown => { 20 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("CursorState")); 21 | }, 22 | } 23 | Ok(()) 24 | } 25 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_delete_task_assist_conversation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_task_assist_conversation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_task_assist_conversation::DeleteTaskAssistConversationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.conversation_id { 7 | object.key("conversationId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_delete_user_memory_entry_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_user_memory_entry_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_user_memory_entry::DeleteUserMemoryEntryInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.id { 7 | object.key("id").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_delete_workspace_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_workspace_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_workspace::DeleteWorkspaceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.workspace_id { 7 | object.key("workspaceId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_diagnostic_location.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_diagnostic_location( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DiagnosticLocation, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("uri").string(input.uri.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("range").start_object(); 12 | crate::protocol_serde::shape_range::ser_range(&mut object_1, &input.range)?; 13 | object_1.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_diagnostic_related_information.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_diagnostic_related_information( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DiagnosticRelatedInformation, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("location").start_object(); 9 | crate::protocol_serde::shape_diagnostic_location::ser_diagnostic_location(&mut object_1, &input.location)?; 10 | object_1.finish(); 11 | } 12 | { 13 | object.key("message").string(input.message.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_dimension.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_dimension( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Dimension, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.name { 7 | object.key("name").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_document_symbol.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_document_symbol( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DocumentSymbol, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("name").string(input.name.as_str()); 8 | } 9 | { 10 | object.key("type").string(input.r#type.as_str()); 11 | } 12 | if let Some(var_1) = &input.source { 13 | object.key("source").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_documentation_intent_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_documentation_intent_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DocumentationIntentContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.scope { 7 | object.key("scope").string(var_1.as_str()); 8 | } 9 | { 10 | object.key("type").string(input.r#type.as_str()); 11 | } 12 | if let Some(var_2) = &input.change_log_options { 13 | #[allow(unused_mut)] 14 | let mut object_3 = object.key("changeLogOptions").start_object(); 15 | crate::protocol_serde::shape_change_log_options::ser_change_log_options(&mut object_3, var_2)?; 16 | object_3.finish(); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_environment_variable.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_environment_variable( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::EnvironmentVariable, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.key { 7 | object.key("key").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_feature_dev_event.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_feature_dev_event( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::FeatureDevEvent, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("conversationId").string(input.conversation_id.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_file_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_file_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::FileContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("leftFileContent").string(input.left_file_content.as_str()); 8 | } 9 | { 10 | object.key("rightFileContent").string(input.right_file_content.as_str()); 11 | } 12 | { 13 | object.key("filename").string(input.filename.as_str()); 14 | } 15 | if let Some(var_1) = &input.file_uri { 16 | object.key("fileUri").string(var_1.as_str()); 17 | } 18 | { 19 | #[allow(unused_mut)] 20 | let mut object_2 = object.key("programmingLanguage").start_object(); 21 | crate::protocol_serde::shape_programming_language::ser_programming_language( 22 | &mut object_2, 23 | &input.programming_language, 24 | )?; 25 | object_2.finish(); 26 | } 27 | Ok(()) 28 | } 29 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_followup_prompt.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_followup_prompt( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::FollowupPrompt, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("content").string(input.content.as_str()); 8 | } 9 | if let Some(var_1) = &input.user_intent { 10 | object.key("userIntent").string(var_1.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_code_analysis_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_code_analysis_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_code_analysis::GetCodeAnalysisInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.job_id { 7 | object.key("jobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_code_fix_job_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_code_fix_job_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_code_fix_job::GetCodeFixJobInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.job_id { 7 | object.key("jobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_task_assist_code_generation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_task_assist_code_generation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_task_assist_code_generation::GetTaskAssistCodeGenerationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.conversation_id { 7 | object.key("conversationId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.code_generation_id { 10 | object.key("codeGenerationId").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_test_generation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_test_generation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_test_generation::GetTestGenerationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.test_generation_job_group_name { 7 | object.key("testGenerationJobGroupName").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.test_generation_job_id { 10 | object.key("testGenerationJobId").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_transformation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_transformation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_transformation::GetTransformationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.transformation_job_id { 7 | object.key("transformationJobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_transformation_plan_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_transformation_plan_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_transformation_plan::GetTransformationPlanInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.transformation_job_id { 7 | object.key("transformationJobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_get_usage_limits_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_usage_limits_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_usage_limits::GetUsageLimitsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.profile_arn { 7 | object.key("profileArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_git_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_git_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::GitState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.status { 7 | object.key("status").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_ide_diagnostic.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_ide_diagnostic( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::IdeDiagnostic, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.range { 7 | #[allow(unused_mut)] 8 | let mut object_2 = object.key("range").start_object(); 9 | crate::protocol_serde::shape_range::ser_range(&mut object_2, var_1)?; 10 | object_2.finish(); 11 | } 12 | if let Some(var_3) = &input.source { 13 | object.key("source").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.severity { 16 | object.key("severity").string(var_4.as_str()); 17 | } 18 | { 19 | object 20 | .key("ideDiagnosticType") 21 | .string(input.ide_diagnostic_type.as_str()); 22 | } 23 | Ok(()) 24 | } 25 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_image_block.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_image_block( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ImageBlock, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("format").string(input.format.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("source").start_object(); 12 | crate::protocol_serde::shape_image_source::ser_image_source(&mut object_1, &input.source)?; 13 | object_1.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_image_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_image_source( 3 | object_1: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ImageSource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::ImageSource::Bytes(inner) => { 8 | object_1 9 | .key("bytes") 10 | .string_unchecked(&::aws_smithy_types::base64::encode(inner)); 11 | }, 12 | crate::types::ImageSource::Unknown => { 13 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ImageSource")); 14 | }, 15 | } 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_intent_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_intent_context( 3 | object_13: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::IntentContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::IntentContext::Documentation(inner) => { 8 | #[allow(unused_mut)] 9 | let mut object_1 = object_13.key("documentation").start_object(); 10 | crate::protocol_serde::shape_documentation_intent_context::ser_documentation_intent_context( 11 | &mut object_1, 12 | inner, 13 | )?; 14 | object_1.finish(); 15 | }, 16 | crate::types::IntentContext::Unknown => { 17 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("IntentContext")); 18 | }, 19 | } 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_available_customizations_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_available_customizations_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_available_customizations::ListAvailableCustomizationsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.max_results { 7 | object.key("maxResults").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((*var_1).into()), 10 | ); 11 | } 12 | if let Some(var_2) = &input.next_token { 13 | object.key("nextToken").string(var_2.as_str()); 14 | } 15 | if let Some(var_3) = &input.profile_arn { 16 | object.key("profileArn").string(var_3.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_available_profiles_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_available_profiles_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_available_profiles::ListAvailableProfilesInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.max_results { 7 | object.key("maxResults").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((*var_1).into()), 10 | ); 11 | } 12 | if let Some(var_2) = &input.next_token { 13 | object.key("nextToken").string(var_2.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_code_analysis_findings_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_code_analysis_findings_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_code_analysis_findings::ListCodeAnalysisFindingsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.job_id { 7 | object.key("jobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.next_token { 10 | object.key("nextToken").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.code_analysis_findings_schema { 13 | object.key("codeAnalysisFindingsSchema").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.profile_arn { 16 | object.key("profileArn").string(var_4.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_events_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_events_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_events::ListEventsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.conversation_id { 7 | object.key("conversationId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.max_results { 10 | object.key("maxResults").number( 11 | #[allow(clippy::useless_conversion)] 12 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 13 | ); 14 | } 15 | if let Some(var_3) = &input.next_token { 16 | object.key("nextToken").string(var_3.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_feature_evaluations_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_feature_evaluations_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_feature_evaluations::ListFeatureEvaluationsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.user_context { 7 | #[allow(unused_mut)] 8 | let mut object_2 = object.key("userContext").start_object(); 9 | crate::protocol_serde::shape_user_context::ser_user_context(&mut object_2, var_1)?; 10 | object_2.finish(); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_user_memory_entries_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_user_memory_entries_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_user_memory_entries::ListUserMemoryEntriesInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.max_results { 7 | object.key("maxResults").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((*var_1).into()), 10 | ); 11 | } 12 | if let Some(var_2) = &input.profile_arn { 13 | object.key("profileArn").string(var_2.as_str()); 14 | } 15 | if let Some(var_3) = &input.next_token { 16 | object.key("nextToken").string(var_3.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_list_workspace_metadata_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_workspace_metadata_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_workspace_metadata::ListWorkspaceMetadataInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.workspace_root { 7 | object.key("workspaceRoot").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.next_token { 10 | object.key("nextToken").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.max_results { 13 | object.key("maxResults").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((*var_3).into()), 16 | ); 17 | } 18 | if let Some(var_4) = &input.profile_arn { 19 | object.key("profileArn").string(var_4.as_str()); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_position.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_position( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Position, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("line").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((input.line).into()), 10 | ); 11 | } 12 | { 13 | object.key("character").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((input.character).into()), 16 | ); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_previous_editor_state_metadata.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_previous_editor_state_metadata( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::PreviousEditorStateMetadata, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("timeOffset").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((input.time_offset).into()), 10 | ); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_push_telemetry_event_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_push_telemetry_event_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::push_telemetry_event::PushTelemetryEventInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.client_token { 7 | object.key("clientToken").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.event_type { 10 | object.key("eventType").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.event { 13 | object.key("event").document(var_3); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_range.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_range( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Range, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("start").start_object(); 9 | crate::protocol_serde::shape_position::ser_position(&mut object_1, &input.start)?; 10 | object_1.finish(); 11 | } 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_2 = object.key("end").start_object(); 15 | crate::protocol_serde::shape_position::ser_position(&mut object_2, &input.end)?; 16 | object_2.finish(); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_resume_transformation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_resume_transformation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::resume_transformation::ResumeTransformationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.transformation_job_id { 7 | object.key("transformationJobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.user_action_status { 10 | object.key("userActionStatus").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_runtime_diagnostic.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_runtime_diagnostic( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::RuntimeDiagnostic, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("source").string(input.source.as_str()); 8 | } 9 | { 10 | object.key("severity").string(input.severity.as_str()); 11 | } 12 | { 13 | object.key("message").string(input.message.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_shell_history_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_shell_history_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ShellHistoryEntry, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("command").string(input.command.as_str()); 8 | } 9 | if let Some(var_1) = &input.directory { 10 | object.key("directory").string(var_1.as_str()); 11 | } 12 | if let Some(var_2) = &input.exit_code { 13 | object.key("exitCode").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 16 | ); 17 | } 18 | if let Some(var_3) = &input.stdout { 19 | object.key("stdout").string(var_3.as_str()); 20 | } 21 | if let Some(var_4) = &input.stderr { 22 | object.key("stderr").string(var_4.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_shell_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_shell_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ShellState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("shellName").string(input.shell_name.as_str()); 8 | } 9 | if let Some(var_1) = &input.shell_history { 10 | let mut array_2 = object.key("shellHistory").start_array(); 11 | for item_3 in var_1 { 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_4 = array_2.value().start_object(); 15 | crate::protocol_serde::shape_shell_history_entry::ser_shell_history_entry(&mut object_4, item_3)?; 16 | object_4.finish(); 17 | } 18 | } 19 | array_2.finish(); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_start_transformation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_start_transformation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::start_transformation::StartTransformationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.workspace_state { 7 | #[allow(unused_mut)] 8 | let mut object_2 = object.key("workspaceState").start_object(); 9 | crate::protocol_serde::shape_workspace_state::ser_workspace_state(&mut object_2, var_1)?; 10 | object_2.finish(); 11 | } 12 | if let Some(var_3) = &input.transformation_spec { 13 | #[allow(unused_mut)] 14 | let mut object_4 = object.key("transformationSpec").start_object(); 15 | crate::protocol_serde::shape_transformation_spec::ser_transformation_spec(&mut object_4, var_3)?; 16 | object_4.finish(); 17 | } 18 | if let Some(var_5) = &input.profile_arn { 19 | object.key("profileArn").string(var_5.as_str()); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_stop_transformation_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_stop_transformation_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::stop_transformation::StopTransformationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.transformation_job_id { 7 | object.key("transformationJobId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.profile_arn { 10 | object.key("profileArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_supplemental_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_supplemental_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::SupplementalContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("filePath").string(input.file_path.as_str()); 8 | } 9 | { 10 | object.key("content").string(input.content.as_str()); 11 | } 12 | if let Some(var_1) = &input.r#type { 13 | object.key("type").string(var_1.as_str()); 14 | } 15 | if let Some(var_2) = &input.metadata { 16 | #[allow(unused_mut)] 17 | let mut object_3 = object.key("metadata").start_object(); 18 | crate::protocol_serde::shape_supplemental_context_metadata::ser_supplemental_context_metadata( 19 | &mut object_3, 20 | var_2, 21 | )?; 22 | object_3.finish(); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_supplementary_web_link.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_supplementary_web_link( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::SupplementaryWebLink, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("url").string(input.url.as_str()); 8 | } 9 | { 10 | object.key("title").string(input.title.as_str()); 11 | } 12 | if let Some(var_1) = &input.snippet { 13 | object.key("snippet").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_target_code.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_target_code( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::TargetCode, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object 8 | .key("relativeTargetPath") 9 | .string(input.relative_target_path.as_str()); 10 | } 11 | if let Some(var_1) = &input.target_line_range_list { 12 | let mut array_2 = object.key("targetLineRangeList").start_array(); 13 | for item_3 in var_1 { 14 | { 15 | #[allow(unused_mut)] 16 | let mut object_4 = array_2.value().start_object(); 17 | crate::protocol_serde::shape_range::ser_range(&mut object_4, item_3)?; 18 | object_4.finish(); 19 | } 20 | } 21 | array_2.finish(); 22 | } 23 | Ok(()) 24 | } 25 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_task_assist_plan_step.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_task_assist_plan_step( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::TaskAssistPlanStep, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("filePath").string(input.file_path.as_str()); 8 | } 9 | { 10 | object.key("description").string(input.description.as_str()); 11 | } 12 | if let Some(var_1) = &input.start_line { 13 | object.key("startLine").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((*var_1).into()), 16 | ); 17 | } 18 | if let Some(var_2) = &input.end_line { 19 | object.key("endLine").number( 20 | #[allow(clippy::useless_conversion)] 21 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 22 | ); 23 | } 24 | if let Some(var_3) = &input.action { 25 | object.key("action").string(var_3.as_str()); 26 | } 27 | Ok(()) 28 | } 29 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_task_assist_planning_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_task_assist_planning_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::TaskAssistPlanningUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("conversationId").string(input.conversation_id.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool( 3 | object_28: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Tool, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::Tool::ToolSpecification(inner) => { 8 | #[allow(unused_mut)] 9 | let mut object_1 = object_28.key("toolSpecification").start_object(); 10 | crate::protocol_serde::shape_tool_specification::ser_tool_specification(&mut object_1, inner)?; 11 | object_1.finish(); 12 | }, 13 | crate::types::Tool::Unknown => { 14 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("Tool")); 15 | }, 16 | } 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_input_schema.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_input_schema( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolInputSchema, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.json { 7 | object.key("json").document(var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_result.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_result( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolResult, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("toolUseId").string(input.tool_use_id.as_str()); 8 | } 9 | { 10 | let mut array_1 = object.key("content").start_array(); 11 | for item_2 in &input.content { 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_3 = array_1.value().start_object(); 15 | crate::protocol_serde::shape_tool_result_content_block::ser_tool_result_content_block( 16 | &mut object_3, 17 | item_2, 18 | )?; 19 | object_3.finish(); 20 | } 21 | } 22 | array_1.finish(); 23 | } 24 | if let Some(var_4) = &input.status { 25 | object.key("status").string(var_4.as_str()); 26 | } 27 | Ok(()) 28 | } 29 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_result_content_block.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_result_content_block( 3 | object_3: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolResultContentBlock, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::ToolResultContentBlock::Text(inner) => { 8 | object_3.key("text").string(inner.as_str()); 9 | }, 10 | crate::types::ToolResultContentBlock::Json(inner) => { 11 | object_3.key("json").document(inner); 12 | }, 13 | crate::types::ToolResultContentBlock::Unknown => { 14 | return Err( 15 | ::aws_smithy_types::error::operation::SerializationError::unknown_variant("ToolResultContentBlock"), 16 | ); 17 | }, 18 | } 19 | Ok(()) 20 | } 21 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_specification.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_specification( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolSpecification, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("inputSchema").start_object(); 9 | crate::protocol_serde::shape_tool_input_schema::ser_tool_input_schema(&mut object_1, &input.input_schema)?; 10 | object_1.finish(); 11 | } 12 | { 13 | object.key("name").string(input.name.as_str()); 14 | } 15 | if let Some(var_2) = &input.description { 16 | object.key("description").string(var_2.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_tool_use.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_use( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolUse, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("toolUseId").string(input.tool_use_id.as_str()); 8 | } 9 | { 10 | object.key("name").string(input.name.as_str()); 11 | } 12 | { 13 | object.key("input").document(&input.input); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_transformation_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_transformation_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::TransformationUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("jobId").string(input.job_id.as_str()); 8 | } 9 | { 10 | object 11 | .key("uploadArtifactType") 12 | .string(input.upload_artifact_type.as_str()); 13 | } 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_update_usage_limits_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_update_usage_limits_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::update_usage_limits::UpdateUsageLimitsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.account_id { 7 | object.key("accountId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.accountless_user_id { 10 | object.key("accountlessUserId").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.feature_type { 13 | object.key("featureType").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.requested_limit { 16 | object.key("requestedLimit").number( 17 | #[allow(clippy::useless_conversion)] 18 | ::aws_smithy_types::Number::NegInt((*var_4).into()), 19 | ); 20 | } 21 | if let Some(var_5) = &input.justification { 22 | object.key("justification").string(var_5.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_user_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("ideCategory").string(input.ide_category.as_str()); 8 | } 9 | { 10 | object.key("operatingSystem").string(input.operating_system.as_str()); 11 | } 12 | { 13 | object.key("product").string(input.product.as_str()); 14 | } 15 | if let Some(var_1) = &input.client_id { 16 | object.key("clientId").string(var_1.as_str()); 17 | } 18 | if let Some(var_2) = &input.ide_version { 19 | object.key("ideVersion").string(var_2.as_str()); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_user_settings.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_settings( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserSettings, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.has_consented_to_cross_region_calls { 7 | object.key("hasConsentedToCrossRegionCalls").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_workspace_context_upload_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_workspace_context_upload_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::WorkspaceContextUploadContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("workspaceId").string(input.workspace_id.as_str()); 8 | } 9 | { 10 | object.key("relativePath").string(input.relative_path.as_str()); 11 | } 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_1 = object.key("programmingLanguage").start_object(); 15 | crate::protocol_serde::shape_programming_language::ser_programming_language( 16 | &mut object_1, 17 | &input.programming_language, 18 | )?; 19 | object_1.finish(); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/protocol_serde/shape_workspace_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_workspace_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::WorkspaceState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("uploadId").string(input.upload_id.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("programmingLanguage").start_object(); 12 | crate::protocol_serde::shape_programming_language::ser_programming_language( 13 | &mut object_1, 14 | &input.programming_language, 15 | )?; 16 | object_1.finish(); 17 | } 18 | if let Some(var_2) = &input.context_truncation_scheme { 19 | object.key("contextTruncationScheme").string(var_2.as_str()); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/types/error.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::error::_access_denied_exception::AccessDeniedError; 3 | pub use crate::types::error::_conflict_exception::ConflictError; 4 | pub use crate::types::error::_internal_server_exception::InternalServerError; 5 | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundError; 6 | pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededError; 7 | pub use crate::types::error::_throttling_exception::ThrottlingError; 8 | pub use crate::types::error::_update_usage_limit_quota_exceeded_exception::UpdateUsageLimitQuotaExceededError; 9 | pub use crate::types::error::_validation_exception::ValidationError; 10 | 11 | mod _access_denied_exception; 12 | 13 | mod _conflict_exception; 14 | 15 | mod _internal_server_exception; 16 | 17 | mod _resource_not_found_exception; 18 | 19 | mod _service_quota_exceeded_exception; 20 | 21 | mod _throttling_exception; 22 | 23 | mod _update_usage_limit_quota_exceeded_exception; 24 | 25 | mod _validation_exception; 26 | 27 | /// Builders 28 | pub mod builders; 29 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-client/src/types/error/builders.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::error::_access_denied_exception::AccessDeniedErrorBuilder; 3 | pub use crate::types::error::_conflict_exception::ConflictErrorBuilder; 4 | pub use crate::types::error::_internal_server_exception::InternalServerErrorBuilder; 5 | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder; 6 | pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededErrorBuilder; 7 | pub use crate::types::error::_throttling_exception::ThrottlingErrorBuilder; 8 | pub use crate::types::error::_update_usage_limit_quota_exceeded_exception::UpdateUsageLimitQuotaExceededErrorBuilder; 9 | pub use crate::types::error::_validation_exception::ValidationErrorBuilder; 10 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/client/customize/internal.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub type BoxFuture = ::std::pin::Pin<::std::boxed::Box + ::std::marker::Send>>; 3 | 4 | pub type SendResult = ::std::result::Result< 5 | T, 6 | ::aws_smithy_runtime_api::client::result::SdkError, 7 | >; 8 | 9 | pub trait CustomizableSend: ::std::marker::Send + ::std::marker::Sync { 10 | // Takes an owned `self` as the implementation will internally call methods that take `self`. 11 | // If it took `&self`, that would make this trait object safe, but some implementing types do not 12 | // derive `Clone`, unable to yield `self` from `&self`. 13 | fn send(self, config_override: crate::config::Builder) -> BoxFuture>; 14 | } 15 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/interceptors.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::interceptors::context::{ 3 | AfterDeserializationInterceptorContextRef, 4 | BeforeDeserializationInterceptorContextMut, 5 | BeforeDeserializationInterceptorContextRef, 6 | BeforeSerializationInterceptorContextMut, 7 | BeforeSerializationInterceptorContextRef, 8 | BeforeTransmitInterceptorContextMut, 9 | BeforeTransmitInterceptorContextRef, 10 | FinalizerInterceptorContextMut, 11 | FinalizerInterceptorContextRef, 12 | InterceptorContext, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/error/sealed_unhandled.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | /// This struct is not intended to be used. 3 | /// 4 | /// This struct holds information about an unhandled error, 5 | /// but that information should be obtained by using the 6 | /// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait 7 | /// on the error type. 8 | /// 9 | /// This struct intentionally doesn't yield any useful information itself. 10 | #[deprecated( 11 | note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ 12 | variable wildcard pattern and check `.code()`: 13 | \ 14 |    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` 15 | \ 16 | See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." 17 | )] 18 | #[derive(Debug)] 19 | pub struct Unhandled { 20 | pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, 21 | pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/event_receiver.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | use aws_smithy_http::event_stream::Receiver; 6 | use aws_smithy_runtime_api::client::result::SdkError; 7 | use aws_smithy_types::event_stream::RawMessage; 8 | 9 | #[derive(Debug)] 10 | /// Receives unmarshalled events at a time out of an Event Stream. 11 | pub struct EventReceiver { 12 | inner: Receiver, 13 | } 14 | 15 | impl EventReceiver { 16 | pub(crate) fn new(inner: Receiver) -> Self { 17 | Self { inner } 18 | } 19 | 20 | /// Asynchronously tries to receive an event from the stream. If the stream has ended, it 21 | /// returns an `Ok(None)`. If there is a transport layer error, it will return 22 | /// `Err(SdkError::DispatchFailure)`. Service-modeled errors will be a part of the returned 23 | /// messages. 24 | pub async fn recv(&mut self) -> Result, SdkError> { 25 | self.inner.recv().await 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("codewhispererstreaming", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/operation.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_types::request_id::RequestId; 3 | 4 | /// Types for the `ExportResultArchive` operation. 5 | pub mod export_result_archive; 6 | 7 | /// Types for the `GenerateAssistantResponse` operation. 8 | pub mod generate_assistant_response; 9 | 10 | /// Types for the `GenerateTaskAssistPlan` operation. 11 | pub mod generate_task_assist_plan; 12 | 13 | /// Types for the `SendMessage` operation. 14 | pub mod send_message; 15 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/primitives/sealed_enum_unknown.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Opaque struct used as inner data for the `Unknown` variant defined in enums in 4 | /// the crate. 5 | /// 6 | /// This is not intended to be used directly. 7 | #[non_exhaustive] 8 | #[derive( 9 | ::std::clone::Clone, 10 | ::std::cmp::Eq, 11 | ::std::cmp::Ord, 12 | ::std::cmp::PartialEq, 13 | ::std::cmp::PartialOrd, 14 | ::std::fmt::Debug, 15 | ::std::hash::Hash, 16 | )] 17 | pub struct UnknownVariantValue(pub(crate) ::std::string::String); 18 | impl UnknownVariantValue { 19 | pub(crate) fn as_str(&self) -> &str { 20 | &self.0 21 | } 22 | } 23 | impl ::std::fmt::Display for UnknownVariantValue { 24 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 25 | write!(f, "{}", self.0) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_additional_content_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_additional_content_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::AdditionalContentEntry, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("name").string(input.name.as_str()); 8 | } 9 | { 10 | object.key("description").string(input.description.as_str()); 11 | } 12 | if let Some(var_1) = &input.inner_context { 13 | object.key("innerContext").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_app_studio_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_app_studio_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::AppStudioState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("namespace").string(input.namespace.as_str()); 8 | } 9 | { 10 | object.key("propertyName").string(input.property_name.as_str()); 11 | } 12 | if let Some(var_1) = &input.property_value { 13 | object.key("propertyValue").string(var_1.as_str()); 14 | } 15 | { 16 | object.key("propertyContext").string(input.property_context.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_code_description.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_description( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDescription, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("href").string(input.href.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_console_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_console_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ConsoleState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.region { 7 | object.key("region").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.console_url { 10 | object.key("consoleUrl").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.service_id { 13 | object.key("serviceId").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.service_console_page { 16 | object.key("serviceConsolePage").string(var_4.as_str()); 17 | } 18 | if let Some(var_5) = &input.service_subconsole_page { 19 | object.key("serviceSubconsolePage").string(var_5.as_str()); 20 | } 21 | if let Some(var_6) = &input.task_name { 22 | object.key("taskName").string(var_6.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_cursor_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_cursor_state( 3 | object_4: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CursorState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::CursorState::Position(inner) => { 8 | #[allow(unused_mut)] 9 | let mut object_1 = object_4.key("position").start_object(); 10 | crate::protocol_serde::shape_position::ser_position(&mut object_1, inner)?; 11 | object_1.finish(); 12 | }, 13 | crate::types::CursorState::Range(inner) => { 14 | #[allow(unused_mut)] 15 | let mut object_2 = object_4.key("range").start_object(); 16 | crate::protocol_serde::shape_range::ser_range(&mut object_2, inner)?; 17 | object_2.finish(); 18 | }, 19 | crate::types::CursorState::Unknown => { 20 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("CursorState")); 21 | }, 22 | } 23 | Ok(()) 24 | } 25 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_diagnostic_location.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_diagnostic_location( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DiagnosticLocation, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("uri").string(input.uri.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("range").start_object(); 12 | crate::protocol_serde::shape_range::ser_range(&mut object_1, &input.range)?; 13 | object_1.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_diagnostic_related_information.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_diagnostic_related_information( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DiagnosticRelatedInformation, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("location").start_object(); 9 | crate::protocol_serde::shape_diagnostic_location::ser_diagnostic_location(&mut object_1, &input.location)?; 10 | object_1.finish(); 11 | } 12 | { 13 | object.key("message").string(input.message.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_document_symbol.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_document_symbol( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DocumentSymbol, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("name").string(input.name.as_str()); 8 | } 9 | { 10 | object.key("type").string(input.r#type.as_str()); 11 | } 12 | if let Some(var_1) = &input.source { 13 | object.key("source").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_environment_variable.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_environment_variable( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::EnvironmentVariable, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.key { 7 | object.key("key").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_export_result_archive_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_export_result_archive_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::export_result_archive::ExportResultArchiveInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.export_id { 7 | object.key("exportId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.export_intent { 10 | object.key("exportIntent").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.export_context { 13 | #[allow(unused_mut)] 14 | let mut object_4 = object.key("exportContext").start_object(); 15 | crate::protocol_serde::shape_export_context::ser_export_context(&mut object_4, var_3)?; 16 | object_4.finish(); 17 | } 18 | if let Some(var_5) = &input.profile_arn { 19 | object.key("profileArn").string(var_5.as_str()); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_export_result_archive_output.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn de_body_payload( 3 | body: &mut ::aws_smithy_types::body::SdkBody, 4 | ) -> std::result::Result< 5 | crate::event_receiver::EventReceiver< 6 | crate::types::ResultArchiveStream, 7 | crate::types::error::ResultArchiveStreamError, 8 | >, 9 | crate::operation::export_result_archive::ExportResultArchiveError, 10 | > { 11 | let unmarshaller = crate::event_stream_serde::ResultArchiveStreamUnmarshaller::new(); 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken()); 13 | Ok(crate::event_receiver::EventReceiver::new( 14 | ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body), 15 | )) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_generate_assistant_response_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_generate_assistant_response_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::generate_assistant_response::GenerateAssistantResponseInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.conversation_state { 7 | #[allow(unused_mut)] 8 | let mut object_2 = object.key("conversationState").start_object(); 9 | crate::protocol_serde::shape_conversation_state::ser_conversation_state(&mut object_2, var_1)?; 10 | object_2.finish(); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_generate_assistant_response_output.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn de_generate_assistant_response_response_payload( 3 | body: &mut ::aws_smithy_types::body::SdkBody, 4 | ) -> std::result::Result< 5 | crate::event_receiver::EventReceiver< 6 | crate::types::ChatResponseStream, 7 | crate::types::error::ChatResponseStreamError, 8 | >, 9 | crate::operation::generate_assistant_response::GenerateAssistantResponseError, 10 | > { 11 | let unmarshaller = crate::event_stream_serde::ChatResponseStreamUnmarshaller::new(); 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken()); 13 | Ok(crate::event_receiver::EventReceiver::new( 14 | ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body), 15 | )) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_generate_task_assist_plan_output.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn de_planning_response_stream_payload( 3 | body: &mut ::aws_smithy_types::body::SdkBody, 4 | ) -> std::result::Result< 5 | crate::event_receiver::EventReceiver< 6 | crate::types::ChatResponseStream, 7 | crate::types::error::ChatResponseStreamError, 8 | >, 9 | crate::operation::generate_task_assist_plan::GenerateTaskAssistPlanError, 10 | > { 11 | let unmarshaller = crate::event_stream_serde::ChatResponseStreamUnmarshaller::new(); 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken()); 13 | Ok(crate::event_receiver::EventReceiver::new( 14 | ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body), 15 | )) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_git_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_git_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::GitState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.status { 7 | object.key("status").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_image_block.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_image_block( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ImageBlock, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("format").string(input.format.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("source").start_object(); 12 | crate::protocol_serde::shape_image_source::ser_image_source(&mut object_1, &input.source)?; 13 | object_1.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_image_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_image_source( 3 | object_1: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ImageSource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::ImageSource::Bytes(inner) => { 8 | object_1 9 | .key("bytes") 10 | .string_unchecked(&::aws_smithy_types::base64::encode(inner)); 11 | }, 12 | crate::types::ImageSource::Unknown => { 13 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ImageSource")); 14 | }, 15 | } 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_position.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_position( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Position, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("line").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((input.line).into()), 10 | ); 11 | } 12 | { 13 | object.key("character").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((input.character).into()), 16 | ); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_range.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_range( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Range, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("start").start_object(); 9 | crate::protocol_serde::shape_position::ser_position(&mut object_1, &input.start)?; 10 | object_1.finish(); 11 | } 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_2 = object.key("end").start_object(); 15 | crate::protocol_serde::shape_position::ser_position(&mut object_2, &input.end)?; 16 | object_2.finish(); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_runtime_diagnostic.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_runtime_diagnostic( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::RuntimeDiagnostic, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("source").string(input.source.as_str()); 8 | } 9 | { 10 | object.key("severity").string(input.severity.as_str()); 11 | } 12 | { 13 | object.key("message").string(input.message.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_send_message_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_send_message_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::send_message::SendMessageInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.conversation_state { 7 | #[allow(unused_mut)] 8 | let mut object_2 = object.key("conversationState").start_object(); 9 | crate::protocol_serde::shape_conversation_state::ser_conversation_state(&mut object_2, var_1)?; 10 | object_2.finish(); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.source { 16 | object.key("source").string(var_4.as_str()); 17 | } 18 | if let Some(var_5) = &input.dry_run { 19 | object.key("dryRun").boolean(*var_5); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_send_message_output.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn de_send_message_response_payload( 3 | body: &mut ::aws_smithy_types::body::SdkBody, 4 | ) -> std::result::Result< 5 | crate::event_receiver::EventReceiver< 6 | crate::types::ChatResponseStream, 7 | crate::types::error::ChatResponseStreamError, 8 | >, 9 | crate::operation::send_message::SendMessageError, 10 | > { 11 | let unmarshaller = crate::event_stream_serde::ChatResponseStreamUnmarshaller::new(); 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken()); 13 | Ok(crate::event_receiver::EventReceiver::new( 14 | ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body), 15 | )) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_shell_history_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_shell_history_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ShellHistoryEntry, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("command").string(input.command.as_str()); 8 | } 9 | if let Some(var_1) = &input.directory { 10 | object.key("directory").string(var_1.as_str()); 11 | } 12 | if let Some(var_2) = &input.exit_code { 13 | object.key("exitCode").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 16 | ); 17 | } 18 | if let Some(var_3) = &input.stdout { 19 | object.key("stdout").string(var_3.as_str()); 20 | } 21 | if let Some(var_4) = &input.stderr { 22 | object.key("stderr").string(var_4.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_shell_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_shell_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ShellState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("shellName").string(input.shell_name.as_str()); 8 | } 9 | if let Some(var_1) = &input.shell_history { 10 | let mut array_2 = object.key("shellHistory").start_array(); 11 | for item_3 in var_1 { 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_4 = array_2.value().start_object(); 15 | crate::protocol_serde::shape_shell_history_entry::ser_shell_history_entry(&mut object_4, item_3)?; 16 | object_4.finish(); 17 | } 18 | } 19 | array_2.finish(); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_tool.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool( 3 | object_28: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Tool, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::Tool::ToolSpecification(inner) => { 8 | #[allow(unused_mut)] 9 | let mut object_1 = object_28.key("toolSpecification").start_object(); 10 | crate::protocol_serde::shape_tool_specification::ser_tool_specification(&mut object_1, inner)?; 11 | object_1.finish(); 12 | }, 13 | crate::types::Tool::Unknown => { 14 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("Tool")); 15 | }, 16 | } 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_tool_input_schema.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_input_schema( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolInputSchema, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.json { 7 | object.key("json").document(var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_tool_specification.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_specification( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolSpecification, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("inputSchema").start_object(); 9 | crate::protocol_serde::shape_tool_input_schema::ser_tool_input_schema(&mut object_1, &input.input_schema)?; 10 | object_1.finish(); 11 | } 12 | { 13 | object.key("name").string(input.name.as_str()); 14 | } 15 | if let Some(var_2) = &input.description { 16 | object.key("description").string(var_2.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_tool_use.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_use( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolUse, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("toolUseId").string(input.tool_use_id.as_str()); 8 | } 9 | { 10 | object.key("name").string(input.name.as_str()); 11 | } 12 | { 13 | object.key("input").document(&input.input); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_transformation_export_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_transformation_export_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::TransformationExportContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object 8 | .key("downloadArtifactId") 9 | .string(input.download_artifact_id.as_str()); 10 | } 11 | { 12 | object 13 | .key("downloadArtifactType") 14 | .string(input.download_artifact_type.as_str()); 15 | } 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_unit_test_generation_export_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_unit_test_generation_export_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UnitTestGenerationExportContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object 8 | .key("testGenerationJobGroupName") 9 | .string(input.test_generation_job_group_name.as_str()); 10 | } 11 | if let Some(var_1) = &input.test_generation_job_id { 12 | object.key("testGenerationJobId").string(var_1.as_str()); 13 | } 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_user_settings.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_settings( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserSettings, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.has_consented_to_cross_region_calls { 7 | object.key("hasConsentedToCrossRegionCalls").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/protocol_serde/shape_workspace_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_workspace_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::WorkspaceState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("uploadId").string(input.upload_id.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("programmingLanguage").start_object(); 12 | crate::protocol_serde::shape_programming_language::ser_programming_language( 13 | &mut object_1, 14 | &input.programming_language, 15 | )?; 16 | object_1.finish(); 17 | } 18 | if let Some(var_2) = &input.context_truncation_scheme { 19 | object.key("contextTruncationScheme").string(var_2.as_str()); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/types/_dry_run_succeed_event.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Streaming Response Event when DryRun is succeessful 4 | #[non_exhaustive] 5 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] 6 | pub struct DryRunSucceedEvent {} 7 | impl DryRunSucceedEvent { 8 | /// Creates a new builder-style object to manufacture 9 | /// [`DryRunSucceedEvent`](crate::types::DryRunSucceedEvent). 10 | pub fn builder() -> crate::types::builders::DryRunSucceedEventBuilder { 11 | crate::types::builders::DryRunSucceedEventBuilder::default() 12 | } 13 | } 14 | 15 | /// A builder for [`DryRunSucceedEvent`](crate::types::DryRunSucceedEvent). 16 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] 17 | #[non_exhaustive] 18 | pub struct DryRunSucceedEventBuilder {} 19 | impl DryRunSucceedEventBuilder { 20 | /// Consumes the builder and constructs a 21 | /// [`DryRunSucceedEvent`](crate::types::DryRunSucceedEvent). 22 | pub fn build(self) -> crate::types::DryRunSucceedEvent { 23 | crate::types::DryRunSucceedEvent {} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-codewhisperer-streaming-client/src/types/error/builders.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::error::_access_denied_error::AccessDeniedErrorBuilder; 3 | pub use crate::types::error::_conflict_exception::ConflictErrorBuilder; 4 | pub use crate::types::error::_dry_run_operation_exception::DryRunOperationErrorBuilder; 5 | pub use crate::types::error::_internal_server_error::InternalServerErrorBuilder; 6 | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder; 7 | pub use crate::types::error::_service_quota_exceeded_error::ServiceQuotaExceededErrorBuilder; 8 | pub use crate::types::error::_throttling_error::ThrottlingErrorBuilder; 9 | pub use crate::types::error::_validation_error::ValidationErrorBuilder; 10 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/client/customize/internal.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub type BoxFuture = ::std::pin::Pin<::std::boxed::Box + ::std::marker::Send>>; 3 | 4 | pub type SendResult = ::std::result::Result< 5 | T, 6 | ::aws_smithy_runtime_api::client::result::SdkError, 7 | >; 8 | 9 | pub trait CustomizableSend: ::std::marker::Send + ::std::marker::Sync { 10 | // Takes an owned `self` as the implementation will internally call methods that take `self`. 11 | // If it took `&self`, that would make this trait object safe, but some implementing types do not 12 | // derive `Clone`, unable to yield `self` from `&self`. 13 | fn send(self, config_override: crate::config::Builder) -> BoxFuture>; 14 | } 15 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/client/delete_profile.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | impl super::Client { 3 | /// Constructs a fluent builder for the 4 | /// [`DeleteProfile`](crate::operation::delete_profile::builders::DeleteProfileFluentBuilder) 5 | /// operation. 6 | /// 7 | /// - The fluent builder is configurable: 8 | /// - [`profile_arn(impl Into)`](crate::operation::delete_profile::builders::DeleteProfileFluentBuilder::profile_arn) / [`set_profile_arn(Option)`](crate::operation::delete_profile::builders::DeleteProfileFluentBuilder::set_profile_arn):
required: **true**
(undocumented)
9 | /// - On success, responds with 10 | /// [`DeleteProfileOutput`](crate::operation::delete_profile::DeleteProfileOutput) 11 | /// - On failure, responds with 12 | /// [`SdkError`](crate::operation::delete_profile::DeleteProfileError) 13 | pub fn delete_profile(&self) -> crate::operation::delete_profile::builders::DeleteProfileFluentBuilder { 14 | crate::operation::delete_profile::builders::DeleteProfileFluentBuilder::new(self.handle.clone()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/interceptors.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::interceptors::context::{ 3 | AfterDeserializationInterceptorContextRef, 4 | BeforeDeserializationInterceptorContextMut, 5 | BeforeDeserializationInterceptorContextRef, 6 | BeforeSerializationInterceptorContextMut, 7 | BeforeSerializationInterceptorContextRef, 8 | BeforeTransmitInterceptorContextMut, 9 | BeforeTransmitInterceptorContextRef, 10 | FinalizerInterceptorContextMut, 11 | FinalizerInterceptorContextRef, 12 | InterceptorContext, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/error/sealed_unhandled.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | /// This struct is not intended to be used. 3 | /// 4 | /// This struct holds information about an unhandled error, 5 | /// but that information should be obtained by using the 6 | /// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait 7 | /// on the error type. 8 | /// 9 | /// This struct intentionally doesn't yield any useful information itself. 10 | #[deprecated( 11 | note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ 12 | variable wildcard pattern and check `.code()`: 13 | \ 14 |    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` 15 | \ 16 | See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." 17 | )] 18 | #[derive(Debug)] 19 | pub struct Unhandled { 20 | pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, 21 | pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("codewhisperer", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/primitives/sealed_enum_unknown.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Opaque struct used as inner data for the `Unknown` variant defined in enums in 4 | /// the crate. 5 | /// 6 | /// This is not intended to be used directly. 7 | #[non_exhaustive] 8 | #[derive( 9 | ::std::clone::Clone, 10 | ::std::cmp::Eq, 11 | ::std::cmp::Ord, 12 | ::std::cmp::PartialEq, 13 | ::std::cmp::PartialOrd, 14 | ::std::fmt::Debug, 15 | ::std::hash::Hash, 16 | )] 17 | pub struct UnknownVariantValue(pub(crate) ::std::string::String); 18 | impl UnknownVariantValue { 19 | pub(crate) fn as_str(&self) -> &str { 20 | &self.0 21 | } 22 | } 23 | impl ::std::fmt::Display for UnknownVariantValue { 24 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 25 | write!(f, "{}", self.0) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_allow_vended_log_delivery_for_resource_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_allow_vended_log_delivery_for_resource_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::allow_vended_log_delivery_for_resource::AllowVendedLogDeliveryForResourceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.resource_arn_being_authorized { 7 | object.key("resourceArnBeingAuthorized").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.delivery_source_arn { 10 | object.key("deliverySourceArn").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_associate_customization_permission_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_associate_customization_permission_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::associate_customization_permission::AssociateCustomizationPermissionInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.permission { 10 | #[allow(unused_mut)] 11 | let mut object_3 = object.key("permission").start_object(); 12 | crate::protocol_serde::shape_customization_permission::ser_customization_permission(&mut object_3, var_2)?; 13 | object_3.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_delete_customization_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_customization_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_customization::DeleteCustomizationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.client_token { 10 | object.key("clientToken").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_delete_customization_permissions_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_customization_permissions_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_customization_permissions::DeleteCustomizationPermissionsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_delete_profile_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_delete_profile_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::delete_profile::DeleteProfileInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.profile_arn { 7 | object.key("profileArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_disassociate_customization_permission_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_disassociate_customization_permission_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::disassociate_customization_permission::DisassociateCustomizationPermissionInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.permission { 10 | #[allow(unused_mut)] 11 | let mut object_3 = object.key("permission").start_object(); 12 | crate::protocol_serde::shape_customization_permission::ser_customization_permission(&mut object_3, var_2)?; 13 | object_3.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_external_identity_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_external_identity_source( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ExternalIdentitySource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("issuerUrl").string(input.issuer_url.as_str()); 8 | } 9 | { 10 | object.key("clientId").string(input.client_id.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_file_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_file_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::FileContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("leftFileContent").string(input.left_file_content.as_str()); 8 | } 9 | { 10 | object.key("rightFileContent").string(input.right_file_content.as_str()); 11 | } 12 | { 13 | object.key("filename").string(input.filename.as_str()); 14 | } 15 | if let Some(var_1) = &input.file_uri { 16 | object.key("fileUri").string(var_1.as_str()); 17 | } 18 | { 19 | #[allow(unused_mut)] 20 | let mut object_2 = object.key("programmingLanguage").start_object(); 21 | crate::protocol_serde::shape_programming_language::ser_programming_language( 22 | &mut object_2, 23 | &input.programming_language, 24 | )?; 25 | object_2.finish(); 26 | } 27 | Ok(()) 28 | } 29 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_get_customization_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_get_customization_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::get_customization::GetCustomizationInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_list_customization_permissions_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_customization_permissions_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_customization_permissions::ListCustomizationPermissionsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.max_results { 10 | object.key("maxResults").number( 11 | #[allow(clippy::useless_conversion)] 12 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 13 | ); 14 | } 15 | if let Some(var_3) = &input.next_token { 16 | object.key("nextToken").string(var_3.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_list_customization_versions_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_customization_versions_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_customization_versions::ListCustomizationVersionsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.identifier { 7 | object.key("identifier").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.max_results { 10 | object.key("maxResults").number( 11 | #[allow(clippy::useless_conversion)] 12 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 13 | ); 14 | } 15 | if let Some(var_3) = &input.next_token { 16 | object.key("nextToken").string(var_3.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_list_customizations_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_customizations_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_customizations::ListCustomizationsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.max_results { 7 | object.key("maxResults").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((*var_1).into()), 10 | ); 11 | } 12 | if let Some(var_2) = &input.next_token { 13 | object.key("nextToken").string(var_2.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_list_profiles_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_profiles_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_profiles::ListProfilesInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.max_results { 7 | object.key("maxResults").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((*var_1).into()), 10 | ); 11 | } 12 | if let Some(var_2) = &input.next_token { 13 | object.key("nextToken").string(var_2.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_list_tags_for_resource_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_list_tags_for_resource_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.resource_arn { 7 | object.key("resourceArn").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_lock_service_linked_role_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_lock_service_linked_role_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::lock_service_linked_role::LockServiceLinkedRoleInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.role_arn { 7 | object.key("RoleArn").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.timeout { 10 | object.key("Timeout").number( 11 | #[allow(clippy::useless_conversion)] 12 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 13 | ); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_previous_editor_state_metadata.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_previous_editor_state_metadata( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::PreviousEditorStateMetadata, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("timeOffset").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((input.time_offset).into()), 10 | ); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_sso_identity_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_sso_identity_source( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::SsoIdentitySource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("instanceArn").string(input.instance_arn.as_str()); 8 | } 9 | if let Some(var_1) = &input.sso_region { 10 | object.key("ssoRegion").string(var_1.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_supplemental_context.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_supplemental_context( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::SupplementalContext, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("filePath").string(input.file_path.as_str()); 8 | } 9 | { 10 | object.key("content").string(input.content.as_str()); 11 | } 12 | if let Some(var_1) = &input.r#type { 13 | object.key("type").string(var_1.as_str()); 14 | } 15 | if let Some(var_2) = &input.metadata { 16 | #[allow(unused_mut)] 17 | let mut object_3 = object.key("metadata").start_object(); 18 | crate::protocol_serde::shape_supplemental_context_metadata::ser_supplemental_context_metadata( 19 | &mut object_3, 20 | var_2, 21 | )?; 22 | object_3.finish(); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_tag_resource_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tag_resource_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::tag_resource::TagResourceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.resource_arn { 7 | object.key("resourceArn").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.tags { 10 | let mut array_3 = object.key("tags").start_array(); 11 | for item_4 in var_2 { 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_5 = array_3.value().start_object(); 15 | crate::protocol_serde::shape_tag::ser_tag(&mut object_5, item_4)?; 16 | object_5.finish(); 17 | } 18 | } 19 | array_3.finish(); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_unlock_service_linked_role_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_unlock_service_linked_role_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::unlock_service_linked_role::UnlockServiceLinkedRoleInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.role_arn { 7 | object.key("RoleArn").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.deletion_status { 10 | object.key("DeletionStatus").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_untag_resource_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_untag_resource_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::untag_resource::UntagResourceInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.resource_arn { 7 | object.key("resourceArn").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.tag_keys { 10 | let mut array_3 = object.key("tagKeys").start_array(); 11 | for item_4 in var_2 { 12 | { 13 | array_3.value().string(item_4.as_str()); 14 | } 15 | } 16 | array_3.finish(); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/protocol_serde/shape_vend_key_grant_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_vend_key_grant_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::vend_key_grant::VendKeyGrantInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.account_id { 7 | object.key("accountId").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.usecase { 10 | object.key("usecase").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/types/error.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::error::_access_denied_exception::AccessDeniedError; 3 | pub use crate::types::error::_conflict_exception::ConflictError; 4 | pub use crate::types::error::_internal_server_exception::InternalServerError; 5 | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundError; 6 | pub use crate::types::error::_service_linked_role_lock_client_exception::ServiceLinkedRoleLockClientError; 7 | pub use crate::types::error::_service_linked_role_lock_service_exception::ServiceLinkedRoleLockServiceError; 8 | pub use crate::types::error::_throttling_exception::ThrottlingError; 9 | pub use crate::types::error::_validation_exception::ValidationError; 10 | 11 | mod _access_denied_exception; 12 | 13 | mod _conflict_exception; 14 | 15 | mod _internal_server_exception; 16 | 17 | mod _resource_not_found_exception; 18 | 19 | mod _service_linked_role_lock_client_exception; 20 | 21 | mod _service_linked_role_lock_service_exception; 22 | 23 | mod _throttling_exception; 24 | 25 | mod _validation_exception; 26 | 27 | /// Builders 28 | pub mod builders; 29 | -------------------------------------------------------------------------------- /crates/amzn-consolas-client/src/types/error/builders.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::error::_access_denied_exception::AccessDeniedErrorBuilder; 3 | pub use crate::types::error::_conflict_exception::ConflictErrorBuilder; 4 | pub use crate::types::error::_internal_server_exception::InternalServerErrorBuilder; 5 | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder; 6 | pub use crate::types::error::_service_linked_role_lock_client_exception::ServiceLinkedRoleLockClientErrorBuilder; 7 | pub use crate::types::error::_service_linked_role_lock_service_exception::ServiceLinkedRoleLockServiceErrorBuilder; 8 | pub use crate::types::error::_throttling_exception::ThrottlingErrorBuilder; 9 | pub use crate::types::error::_validation_exception::ValidationErrorBuilder; 10 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/client/customize/internal.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub type BoxFuture = ::std::pin::Pin<::std::boxed::Box + ::std::marker::Send>>; 3 | 4 | pub type SendResult = ::std::result::Result< 5 | T, 6 | ::aws_smithy_runtime_api::client::result::SdkError, 7 | >; 8 | 9 | pub trait CustomizableSend: ::std::marker::Send + ::std::marker::Sync { 10 | // Takes an owned `self` as the implementation will internally call methods that take `self`. 11 | // If it took `&self`, that would make this trait object safe, but some implementing types do not 12 | // derive `Clone`, unable to yield `self` from `&self`. 13 | fn send(self, config_override: crate::config::Builder) -> BoxFuture>; 14 | } 15 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/http.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::orchestrator::{ 3 | HttpRequest, 4 | HttpResponse, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/interceptors.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::interceptors::context::{ 3 | AfterDeserializationInterceptorContextRef, 4 | BeforeDeserializationInterceptorContextMut, 5 | BeforeDeserializationInterceptorContextRef, 6 | BeforeSerializationInterceptorContextMut, 7 | BeforeSerializationInterceptorContextRef, 8 | BeforeTransmitInterceptorContextMut, 9 | BeforeTransmitInterceptorContextRef, 10 | FinalizerInterceptorContextMut, 11 | FinalizerInterceptorContextRef, 12 | InterceptorContext, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/error/sealed_unhandled.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | /// This struct is not intended to be used. 3 | /// 4 | /// This struct holds information about an unhandled error, 5 | /// but that information should be obtained by using the 6 | /// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait 7 | /// on the error type. 8 | /// 9 | /// This struct intentionally doesn't yield any useful information itself. 10 | #[deprecated( 11 | note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ 12 | variable wildcard pattern and check `.code()`: 13 | \ 14 |    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` 15 | \ 16 | See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." 17 | )] 18 | #[derive(Debug)] 19 | pub struct Unhandled { 20 | pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, 21 | pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/event_receiver.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | use aws_smithy_http::event_stream::Receiver; 6 | use aws_smithy_runtime_api::client::result::SdkError; 7 | use aws_smithy_types::event_stream::RawMessage; 8 | 9 | #[derive(Debug)] 10 | /// Receives unmarshalled events at a time out of an Event Stream. 11 | pub struct EventReceiver { 12 | inner: Receiver, 13 | } 14 | 15 | impl EventReceiver { 16 | pub(crate) fn new(inner: Receiver) -> Self { 17 | Self { inner } 18 | } 19 | 20 | /// Asynchronously tries to receive an event from the stream. If the stream has ended, it 21 | /// returns an `Ok(None)`. If there is a transport layer error, it will return 22 | /// `Err(SdkError::DispatchFailure)`. Service-modeled errors will be a part of the returned 23 | /// messages. 24 | pub async fn recv(&mut self) -> Result, SdkError> { 25 | self.inner.recv().await 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_runtime::user_agent::ApiMetadata = 3 | ::aws_runtime::user_agent::ApiMetadata::new("qdeveloperstreaming", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/operation.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_types::request_id::RequestId; 3 | 4 | /// Types for the `GenerateCodeFromCommands` operation. 5 | pub mod generate_code_from_commands; 6 | 7 | /// Types for the `SendMessage` operation. 8 | pub mod send_message; 9 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::date_time::Format as DateTimeFormat; 3 | pub use ::aws_smithy_types::{ 4 | Blob, 5 | DateTime, 6 | }; 7 | 8 | /// Event stream related primitives such as `Message` or `Header`. 9 | pub mod event_stream; 10 | 11 | pub(crate) mod sealed_enum_unknown; 12 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/primitives/sealed_enum_unknown.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Opaque struct used as inner data for the `Unknown` variant defined in enums in 4 | /// the crate. 5 | /// 6 | /// This is not intended to be used directly. 7 | #[non_exhaustive] 8 | #[derive( 9 | ::std::clone::Clone, 10 | ::std::cmp::Eq, 11 | ::std::cmp::Ord, 12 | ::std::cmp::PartialEq, 13 | ::std::cmp::PartialOrd, 14 | ::std::fmt::Debug, 15 | ::std::hash::Hash, 16 | )] 17 | pub struct UnknownVariantValue(pub(crate) ::std::string::String); 18 | impl UnknownVariantValue { 19 | pub(crate) fn as_str(&self) -> &str { 20 | &self.0 21 | } 22 | } 23 | impl ::std::fmt::Display for UnknownVariantValue { 24 | fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 25 | write!(f, "{}", self.0) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_additional_content_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_additional_content_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::AdditionalContentEntry, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("name").string(input.name.as_str()); 8 | } 9 | { 10 | object.key("description").string(input.description.as_str()); 11 | } 12 | if let Some(var_1) = &input.inner_context { 13 | object.key("innerContext").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_app_studio_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_app_studio_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::AppStudioState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("namespace").string(input.namespace.as_str()); 8 | } 9 | { 10 | object.key("propertyName").string(input.property_name.as_str()); 11 | } 12 | if let Some(var_1) = &input.property_value { 13 | object.key("propertyValue").string(var_1.as_str()); 14 | } 15 | { 16 | object.key("propertyContext").string(input.property_context.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_code_description.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_code_description( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CodeDescription, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("href").string(input.href.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_command_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_command_input( 3 | object_3: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::CommandInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::CommandInput::CommandsList(inner) => { 8 | let mut array_1 = object_3.key("commandsList").start_array(); 9 | for item_2 in inner { 10 | { 11 | array_1.value().string(item_2.as_str()); 12 | } 13 | } 14 | array_1.finish(); 15 | }, 16 | crate::types::CommandInput::Unknown => { 17 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("CommandInput")); 18 | }, 19 | } 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_console_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_console_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ConsoleState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.region { 7 | object.key("region").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.console_url { 10 | object.key("consoleUrl").string(var_2.as_str()); 11 | } 12 | if let Some(var_3) = &input.service_id { 13 | object.key("serviceId").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.service_console_page { 16 | object.key("serviceConsolePage").string(var_4.as_str()); 17 | } 18 | if let Some(var_5) = &input.service_subconsole_page { 19 | object.key("serviceSubconsolePage").string(var_5.as_str()); 20 | } 21 | if let Some(var_6) = &input.task_name { 22 | object.key("taskName").string(var_6.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_diagnostic_location.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_diagnostic_location( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DiagnosticLocation, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("uri").string(input.uri.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("range").start_object(); 12 | crate::protocol_serde::shape_range::ser_range(&mut object_1, &input.range)?; 13 | object_1.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_diagnostic_related_information.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_diagnostic_related_information( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DiagnosticRelatedInformation, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("location").start_object(); 9 | crate::protocol_serde::shape_diagnostic_location::ser_diagnostic_location(&mut object_1, &input.location)?; 10 | object_1.finish(); 11 | } 12 | { 13 | object.key("message").string(input.message.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_document_symbol.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_document_symbol( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::DocumentSymbol, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("name").string(input.name.as_str()); 8 | } 9 | { 10 | object.key("type").string(input.r#type.as_str()); 11 | } 12 | if let Some(var_1) = &input.source { 13 | object.key("source").string(var_1.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_environment_variable.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_environment_variable( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::EnvironmentVariable, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.key { 7 | object.key("key").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_generate_code_from_commands_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_generate_code_from_commands_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::generate_code_from_commands::GenerateCodeFromCommandsInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.output_format { 7 | object.key("outputFormat").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.commands { 10 | #[allow(unused_mut)] 11 | let mut object_3 = object.key("commands").start_object(); 12 | crate::protocol_serde::shape_command_input::ser_command_input(&mut object_3, var_2)?; 13 | object_3.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_generate_code_from_commands_output.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn de_generated_code_from_commands_response_payload( 3 | body: &mut ::aws_smithy_types::body::SdkBody, 4 | ) -> std::result::Result< 5 | crate::event_receiver::EventReceiver< 6 | crate::types::GenerateCodeFromCommandsResponseStream, 7 | crate::types::error::GenerateCodeFromCommandsResponseStreamError, 8 | >, 9 | crate::operation::generate_code_from_commands::GenerateCodeFromCommandsError, 10 | > { 11 | let unmarshaller = crate::event_stream_serde::GenerateCodeFromCommandsResponseStreamUnmarshaller::new(); 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken()); 13 | Ok(crate::event_receiver::EventReceiver::new( 14 | ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body), 15 | )) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_git_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_git_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::GitState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.status { 7 | object.key("status").string(var_1.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_image_block.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_image_block( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ImageBlock, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("format").string(input.format.as_str()); 8 | } 9 | { 10 | #[allow(unused_mut)] 11 | let mut object_1 = object.key("source").start_object(); 12 | crate::protocol_serde::shape_image_source::ser_image_source(&mut object_1, &input.source)?; 13 | object_1.finish(); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_image_source.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_image_source( 3 | object_1: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ImageSource, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::ImageSource::Bytes(inner) => { 8 | object_1 9 | .key("bytes") 10 | .string_unchecked(&::aws_smithy_types::base64::encode(inner)); 11 | }, 12 | crate::types::ImageSource::Unknown => { 13 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ImageSource")); 14 | }, 15 | } 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_position.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_position( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Position, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("line").number( 8 | #[allow(clippy::useless_conversion)] 9 | ::aws_smithy_types::Number::NegInt((input.line).into()), 10 | ); 11 | } 12 | { 13 | object.key("character").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((input.character).into()), 16 | ); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_programming_language.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_programming_language( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ProgrammingLanguage, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("languageName").string(input.language_name.as_str()); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_range.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_range( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Range, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("start").start_object(); 9 | crate::protocol_serde::shape_position::ser_position(&mut object_1, &input.start)?; 10 | object_1.finish(); 11 | } 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_2 = object.key("end").start_object(); 15 | crate::protocol_serde::shape_position::ser_position(&mut object_2, &input.end)?; 16 | object_2.finish(); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_runtime_diagnostic.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_runtime_diagnostic( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::RuntimeDiagnostic, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("source").string(input.source.as_str()); 8 | } 9 | { 10 | object.key("severity").string(input.severity.as_str()); 11 | } 12 | { 13 | object.key("message").string(input.message.as_str()); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_send_message_input.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_send_message_input_input( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::operation::send_message::SendMessageInput, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.conversation_state { 7 | #[allow(unused_mut)] 8 | let mut object_2 = object.key("conversationState").start_object(); 9 | crate::protocol_serde::shape_conversation_state::ser_conversation_state(&mut object_2, var_1)?; 10 | object_2.finish(); 11 | } 12 | if let Some(var_3) = &input.profile_arn { 13 | object.key("profileArn").string(var_3.as_str()); 14 | } 15 | if let Some(var_4) = &input.source { 16 | object.key("source").string(var_4.as_str()); 17 | } 18 | if let Some(var_5) = &input.dry_run { 19 | object.key("dryRun").boolean(*var_5); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_send_message_output.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn de_send_message_response_payload( 3 | body: &mut ::aws_smithy_types::body::SdkBody, 4 | ) -> std::result::Result< 5 | crate::event_receiver::EventReceiver< 6 | crate::types::ChatResponseStream, 7 | crate::types::error::ChatResponseStreamError, 8 | >, 9 | crate::operation::send_message::SendMessageError, 10 | > { 11 | let unmarshaller = crate::event_stream_serde::ChatResponseStreamUnmarshaller::new(); 12 | let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken()); 13 | Ok(crate::event_receiver::EventReceiver::new( 14 | ::aws_smithy_http::event_stream::Receiver::new(unmarshaller, body), 15 | )) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_shell_history_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_shell_history_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ShellHistoryEntry, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("command").string(input.command.as_str()); 8 | } 9 | if let Some(var_1) = &input.directory { 10 | object.key("directory").string(var_1.as_str()); 11 | } 12 | if let Some(var_2) = &input.exit_code { 13 | object.key("exitCode").number( 14 | #[allow(clippy::useless_conversion)] 15 | ::aws_smithy_types::Number::NegInt((*var_2).into()), 16 | ); 17 | } 18 | if let Some(var_3) = &input.stdout { 19 | object.key("stdout").string(var_3.as_str()); 20 | } 21 | if let Some(var_4) = &input.stderr { 22 | object.key("stderr").string(var_4.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_shell_state.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_shell_state( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ShellState, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("shellName").string(input.shell_name.as_str()); 8 | } 9 | if let Some(var_1) = &input.shell_history { 10 | let mut array_2 = object.key("shellHistory").start_array(); 11 | for item_3 in var_1 { 12 | { 13 | #[allow(unused_mut)] 14 | let mut object_4 = array_2.value().start_object(); 15 | crate::protocol_serde::shape_shell_history_entry::ser_shell_history_entry(&mut object_4, item_3)?; 16 | object_4.finish(); 17 | } 18 | } 19 | array_2.finish(); 20 | } 21 | Ok(()) 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_tool.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool( 3 | object_28: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Tool, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | match input { 7 | crate::types::Tool::ToolSpecification(inner) => { 8 | #[allow(unused_mut)] 9 | let mut object_1 = object_28.key("toolSpecification").start_object(); 10 | crate::protocol_serde::shape_tool_specification::ser_tool_specification(&mut object_1, inner)?; 11 | object_1.finish(); 12 | }, 13 | crate::types::Tool::Unknown => { 14 | return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("Tool")); 15 | }, 16 | } 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_tool_input_schema.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_input_schema( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolInputSchema, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.json { 7 | object.key("json").document(var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_tool_specification.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_specification( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolSpecification, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | #[allow(unused_mut)] 8 | let mut object_1 = object.key("inputSchema").start_object(); 9 | crate::protocol_serde::shape_tool_input_schema::ser_tool_input_schema(&mut object_1, &input.input_schema)?; 10 | object_1.finish(); 11 | } 12 | { 13 | object.key("name").string(input.name.as_str()); 14 | } 15 | if let Some(var_2) = &input.description { 16 | object.key("description").string(var_2.as_str()); 17 | } 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_tool_use.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_tool_use( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ToolUse, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("toolUseId").string(input.tool_use_id.as_str()); 8 | } 9 | { 10 | object.key("name").string(input.name.as_str()); 11 | } 12 | { 13 | object.key("input").document(&input.input); 14 | } 15 | Ok(()) 16 | } 17 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/protocol_serde/shape_user_settings.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_user_settings( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::UserSettings, 5 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.has_consented_to_cross_region_calls { 7 | object.key("hasConsentedToCrossRegionCalls").boolean(*var_1); 8 | } 9 | Ok(()) 10 | } 11 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/types/_dry_run_succeed_event.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Streaming Response Event when DryRun is succeessful 4 | #[non_exhaustive] 5 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] 6 | pub struct DryRunSucceedEvent {} 7 | impl DryRunSucceedEvent { 8 | /// Creates a new builder-style object to manufacture 9 | /// [`DryRunSucceedEvent`](crate::types::DryRunSucceedEvent). 10 | pub fn builder() -> crate::types::builders::DryRunSucceedEventBuilder { 11 | crate::types::builders::DryRunSucceedEventBuilder::default() 12 | } 13 | } 14 | 15 | /// A builder for [`DryRunSucceedEvent`](crate::types::DryRunSucceedEvent). 16 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] 17 | #[non_exhaustive] 18 | pub struct DryRunSucceedEventBuilder {} 19 | impl DryRunSucceedEventBuilder { 20 | /// Consumes the builder and constructs a 21 | /// [`DryRunSucceedEvent`](crate::types::DryRunSucceedEvent). 22 | pub fn build(self) -> crate::types::DryRunSucceedEvent { 23 | crate::types::DryRunSucceedEvent {} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-qdeveloper-streaming-client/src/types/error/builders.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::error::_access_denied_error::AccessDeniedErrorBuilder; 3 | pub use crate::types::error::_conflict_exception::ConflictErrorBuilder; 4 | pub use crate::types::error::_dry_run_operation_exception::DryRunOperationErrorBuilder; 5 | pub use crate::types::error::_internal_server_error::InternalServerErrorBuilder; 6 | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder; 7 | pub use crate::types::error::_service_quota_exceeded_error::ServiceQuotaExceededErrorBuilder; 8 | pub use crate::types::error::_throttling_error::ThrottlingErrorBuilder; 9 | pub use crate::types::error::_validation_error::ValidationErrorBuilder; 10 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/config/interceptors.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime_api::client::interceptors::context::{ 3 | AfterDeserializationInterceptorContextRef, 4 | BeforeDeserializationInterceptorContextMut, 5 | BeforeDeserializationInterceptorContextRef, 6 | BeforeSerializationInterceptorContextMut, 7 | BeforeSerializationInterceptorContextRef, 8 | BeforeTransmitInterceptorContextMut, 9 | BeforeTransmitInterceptorContextRef, 10 | FinalizerInterceptorContextMut, 11 | FinalizerInterceptorContextRef, 12 | InterceptorContext, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/config/retry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_runtime::client::retries::RetryPartition; 3 | pub use ::aws_smithy_runtime_api::client::retries::ShouldAttempt; 4 | pub use ::aws_smithy_runtime_api::client::retries::classifiers::{ 5 | ClassifyRetry, 6 | RetryAction, 7 | }; 8 | pub use ::aws_smithy_types::retry::{ 9 | ReconnectMode, 10 | RetryConfig, 11 | RetryConfigBuilder, 12 | RetryMode, 13 | }; 14 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/config/timeout.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_smithy_types::timeout::{ 3 | TimeoutConfig, 4 | TimeoutConfigBuilder, 5 | }; 6 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/error/sealed_unhandled.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | /// This struct is not intended to be used. 3 | /// 4 | /// This struct holds information about an unhandled error, 5 | /// but that information should be obtained by using the 6 | /// [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) trait 7 | /// on the error type. 8 | /// 9 | /// This struct intentionally doesn't yield any useful information itself. 10 | #[deprecated( 11 | note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ 12 | variable wildcard pattern and check `.code()`: 13 | \ 14 |    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` 15 | \ 16 | See [`ProvideErrorMetadata`](::aws_smithy_types::error::metadata::ProvideErrorMetadata) for what information is available for the error." 17 | )] 18 | #[derive(Debug)] 19 | pub struct Unhandled { 20 | pub(crate) source: ::aws_smithy_runtime_api::box_error::BoxError, 21 | pub(crate) meta: ::aws_smithy_types::error::metadata::ErrorMetadata, 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/meta.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub(crate) static API_METADATA: ::aws_http::user_agent::ApiMetadata = 3 | ::aws_http::user_agent::ApiMetadata::new("toolkittelemetry", crate::meta::PKG_VERSION); 4 | 5 | /// Crate version number. 6 | pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/operation.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use ::aws_types::request_id::RequestId; 3 | 4 | /// Types for the `PostErrorReport` operation. 5 | pub mod post_error_report; 6 | 7 | /// Types for the `PostFeedback` operation. 8 | pub mod post_feedback; 9 | 10 | /// Types for the `PostMetrics` operation. 11 | pub mod post_metrics; 12 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/primitives.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Event stream related primitives such as `Message` or `Header`. 4 | pub mod event_stream; 5 | 6 | pub(crate) mod sealed_enum_unknown; 7 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/primitives/event_stream.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/primitives/sealed_enum_unknown.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | 3 | /// Opaque struct used as inner data for the `Unknown` variant defined in enums in 4 | /// the crate. 5 | /// 6 | /// This is not intended to be used directly. 7 | #[non_exhaustive] 8 | #[derive( 9 | ::std::clone::Clone, 10 | ::std::cmp::Eq, 11 | ::std::cmp::Ord, 12 | ::std::cmp::PartialEq, 13 | ::std::cmp::PartialOrd, 14 | ::std::fmt::Debug, 15 | ::std::hash::Hash, 16 | )] 17 | pub struct UnknownVariantValue(pub(crate) ::std::string::String); 18 | impl UnknownVariantValue { 19 | pub(crate) fn as_str(&self) -> &str { 20 | &self.0 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/protocol_serde/shape_error_details.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_error_details( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::ErrorDetails, 5 | ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | { 7 | object.key("Command").string(input.command.as_str()); 8 | } 9 | { 10 | object.key("EpochTimestamp").number( 11 | #[allow(clippy::useless_conversion)] 12 | ::aws_smithy_types::Number::NegInt((input.epoch_timestamp).into()), 13 | ); 14 | } 15 | { 16 | object.key("Type").string(input.r#type.as_str()); 17 | } 18 | if let Some(var_1) = &input.message { 19 | object.key("Message").string(var_1.as_str()); 20 | } 21 | { 22 | object.key("StackTrace").string(input.stack_trace.as_str()); 23 | } 24 | Ok(()) 25 | } 26 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/protocol_serde/shape_metadata_entry.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_metadata_entry( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::MetadataEntry, 5 | ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.key { 7 | object.key("Key").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.value { 10 | object.key("Value").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/protocol_serde/shape_userdata.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub fn ser_userdata( 3 | object: &mut ::aws_smithy_json::serialize::JsonObjectWriter, 4 | input: &crate::types::Userdata, 5 | ) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> { 6 | if let Some(var_1) = &input.email { 7 | object.key("Email").string(var_1.as_str()); 8 | } 9 | if let Some(var_2) = &input.comment { 10 | object.key("Comment").string(var_2.as_str()); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/types.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::_aws_product::AwsProduct; 3 | pub use crate::types::_error_details::ErrorDetails; 4 | pub use crate::types::_metadata_entry::MetadataEntry; 5 | pub use crate::types::_metric_datum::MetricDatum; 6 | pub use crate::types::_sentiment::Sentiment; 7 | pub use crate::types::_unit::Unit; 8 | pub use crate::types::_userdata::Userdata; 9 | 10 | mod _aws_product; 11 | 12 | mod _error_details; 13 | 14 | mod _metadata_entry; 15 | 16 | mod _metric_datum; 17 | 18 | mod _sentiment; 19 | 20 | mod _unit; 21 | 22 | mod _userdata; 23 | 24 | /// Builders 25 | pub mod builders; 26 | -------------------------------------------------------------------------------- /crates/amzn-toolkit-telemetry-client/src/types/builders.rs: -------------------------------------------------------------------------------- 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. 2 | pub use crate::types::_error_details::ErrorDetailsBuilder; 3 | pub use crate::types::_metadata_entry::MetadataEntryBuilder; 4 | pub use crate::types::_metric_datum::MetricDatumBuilder; 5 | pub use crate::types::_userdata::UserdataBuilder; 6 | -------------------------------------------------------------------------------- /crates/cli/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | spec.ts -------------------------------------------------------------------------------- /crates/cli/src/api_client/clients/mod.rs: -------------------------------------------------------------------------------- 1 | mod client; 2 | pub(crate) mod shared; 3 | mod streaming_client; 4 | 5 | pub use client::Client; 6 | pub use streaming_client::{ 7 | SendMessageOutput, 8 | StreamingClient, 9 | }; 10 | -------------------------------------------------------------------------------- /crates/cli/src/api_client/consts.rs: -------------------------------------------------------------------------------- 1 | use aws_config::Region; 2 | 3 | // Endpoint constants 4 | pub const PROD_CODEWHISPERER_ENDPOINT_URL: &str = "https://codewhisperer.us-east-1.amazonaws.com"; 5 | pub const PROD_CODEWHISPERER_ENDPOINT_REGION: Region = Region::from_static("us-east-1"); 6 | 7 | pub const PROD_Q_ENDPOINT_URL: &str = "https://q.us-east-1.amazonaws.com"; 8 | pub const PROD_Q_ENDPOINT_REGION: Region = Region::from_static("us-east-1"); 9 | 10 | // FRA endpoint constants 11 | pub const PROD_CODEWHISPERER_FRA_ENDPOINT_URL: &str = "https://q.eu-central-1.amazonaws.com/"; 12 | pub const PROD_CODEWHISPERER_FRA_ENDPOINT_REGION: Region = Region::from_static("eu-central-1"); 13 | 14 | // Opt out constants 15 | pub const X_AMZN_CODEWHISPERER_OPT_OUT_HEADER: &str = "x-amzn-codewhisperer-optout"; 16 | -------------------------------------------------------------------------------- /crates/cli/src/api_client/interceptor/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod opt_out; 2 | -------------------------------------------------------------------------------- /crates/cli/src/api_client/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod clients; 2 | pub(crate) mod consts; 3 | pub(crate) mod credentials; 4 | pub mod customization; 5 | mod endpoints; 6 | mod error; 7 | pub(crate) mod interceptor; 8 | pub mod model; 9 | pub mod profile; 10 | 11 | pub use clients::{ 12 | Client, 13 | StreamingClient, 14 | }; 15 | pub use endpoints::Endpoint; 16 | pub use error::ApiClientError; 17 | pub use profile::list_available_profiles; 18 | -------------------------------------------------------------------------------- /crates/cli/src/api_client/profile.rs: -------------------------------------------------------------------------------- 1 | use crate::api_client::Client; 2 | use crate::api_client::endpoints::Endpoint; 3 | use crate::auth::AuthError; 4 | use crate::database::{ 5 | AuthProfile, 6 | Database, 7 | }; 8 | 9 | pub async fn list_available_profiles(database: &mut Database) -> Result, AuthError> { 10 | let mut profiles = vec![]; 11 | for endpoint in Endpoint::CODEWHISPERER_ENDPOINTS { 12 | let client = Client::new(database, Some(endpoint.clone())).await?; 13 | match client.list_available_profiles().await { 14 | Ok(mut p) => profiles.append(&mut p), 15 | Err(e) => tracing::error!("Failed to list profiles from endpoint {:?}: {:?}", endpoint, e), 16 | } 17 | } 18 | 19 | Ok(profiles) 20 | } 21 | -------------------------------------------------------------------------------- /crates/cli/src/api_client/stage.rs: -------------------------------------------------------------------------------- 1 | use std::str::FromStr; 2 | 3 | #[derive(Debug, PartialEq, Eq, Clone, Copy)] 4 | pub enum Stage { 5 | Prod, 6 | Gamma, 7 | Alpha, 8 | Beta, 9 | } 10 | 11 | impl Stage { 12 | pub fn as_str(&self) -> &'static str { 13 | match self { 14 | Stage::Prod => "prod", 15 | Stage::Gamma => "gamma", 16 | Stage::Alpha => "alpha", 17 | Stage::Beta => "beta", 18 | } 19 | } 20 | } 21 | 22 | impl FromStr for Stage { 23 | type Err = (); 24 | 25 | fn from_str(s: &str) -> Result { 26 | match s.to_ascii_lowercase().trim() { 27 | "prod" | "production" => Ok(Stage::Prod), 28 | "gamma" => Ok(Stage::Gamma), 29 | "alpha" => Ok(Stage::Alpha), 30 | "beta" => Ok(Stage::Beta), 31 | _ => Err(()), 32 | } 33 | } 34 | } 35 | 36 | impl std::fmt::Display for Stage { 37 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 38 | f.write_str(self.as_str()) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /crates/cli/src/auth/consts.rs: -------------------------------------------------------------------------------- 1 | use aws_types::region::Region; 2 | 3 | pub(crate) const CLIENT_NAME: &str = "Amazon Q Developer for command line"; 4 | 5 | pub(crate) const OIDC_BUILDER_ID_REGION: Region = Region::from_static("us-east-1"); 6 | 7 | /// The scopes requested for OIDC 8 | /// 9 | /// Do not include `sso:account:access`, these permissions are not needed and were 10 | /// previously included 11 | pub(crate) const SCOPES: &[&str] = &[ 12 | "codewhisperer:completions", 13 | "codewhisperer:analysis", 14 | "codewhisperer:conversations", 15 | // "codewhisperer:taskassist", 16 | // "codewhisperer:transformations", 17 | ]; 18 | 19 | pub(crate) const CLIENT_TYPE: &str = "public"; 20 | 21 | // The start URL for public builder ID users 22 | pub const START_URL: &str = "https://view.awsapps.com/start"; 23 | 24 | pub(crate) const DEVICE_GRANT_TYPE: &str = "urn:ietf:params:oauth:grant-type:device_code"; 25 | pub(crate) const REFRESH_GRANT_TYPE: &str = "refresh_token"; 26 | -------------------------------------------------------------------------------- /crates/cli/src/auth/scope.rs: -------------------------------------------------------------------------------- 1 | use crate::auth::consts::SCOPES; 2 | 3 | pub fn scopes_match, B: AsRef>(a: &[A], b: &[B]) -> bool { 4 | if a.len() != b.len() { 5 | return false; 6 | } 7 | 8 | let mut a = a.iter().map(|s| s.as_ref()).collect::>(); 9 | let mut b = b.iter().map(|s| s.as_ref()).collect::>(); 10 | a.sort(); 11 | b.sort(); 12 | a == b 13 | } 14 | 15 | /// Checks if the given scopes match the predefined scopes. 16 | pub(crate) fn is_scopes>(scopes: &[S]) -> bool { 17 | scopes_match(SCOPES, scopes) 18 | } 19 | 20 | #[cfg(test)] 21 | mod tests { 22 | use super::*; 23 | 24 | #[test] 25 | fn test_scopes_match() { 26 | assert!(scopes_match(&["a", "b", "c"], &["a", "b", "c"])); 27 | assert!(scopes_match(&["a", "b", "c"], &["a", "c", "b"])); 28 | assert!(!scopes_match(&["a", "b", "c"], &["a", "b"])); 29 | assert!(!scopes_match(&["a", "b"], &["a", "b", "c"])); 30 | 31 | assert!(is_scopes(SCOPES)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/cli/src/aws_common/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod http_client; 2 | mod sdk_error_display; 3 | mod user_agent_override_interceptor; 4 | 5 | use std::sync::LazyLock; 6 | 7 | use aws_smithy_runtime_api::client::behavior_version::BehaviorVersion; 8 | use aws_types::app_name::AppName; 9 | pub use sdk_error_display::SdkErrorDisplay; 10 | pub use user_agent_override_interceptor::UserAgentOverrideInterceptor; 11 | 12 | const APP_NAME_STR: &str = "AmazonQ-For-CLI"; 13 | 14 | pub fn app_name() -> AppName { 15 | static APP_NAME: LazyLock = LazyLock::new(|| AppName::new(APP_NAME_STR).expect("invalid app name")); 16 | APP_NAME.clone() 17 | } 18 | 19 | pub fn behavior_version() -> BehaviorVersion { 20 | BehaviorVersion::v2025_01_17() 21 | } 22 | 23 | #[cfg(test)] 24 | mod tests { 25 | use super::*; 26 | 27 | #[test] 28 | fn test_app_name() { 29 | println!("{}", app_name()); 30 | } 31 | 32 | #[test] 33 | fn test_behavior_version() { 34 | assert!(behavior_version() == BehaviorVersion::latest()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /crates/cli/src/cli/chat/consts.rs: -------------------------------------------------------------------------------- 1 | use super::token_counter::TokenCounter; 2 | 3 | // These limits are the internal undocumented values from the service for each item 4 | 5 | pub const MAX_CURRENT_WORKING_DIRECTORY_LEN: usize = 256; 6 | 7 | /// Limit to send the number of messages as part of chat. 8 | pub const MAX_CONVERSATION_STATE_HISTORY_LEN: usize = 250; 9 | 10 | /// Actual service limit is 800_000 11 | pub const MAX_TOOL_RESPONSE_SIZE: usize = 600_000; 12 | 13 | /// Actual service limit is 600_000 14 | pub const MAX_USER_MESSAGE_SIZE: usize = 600_000; 15 | 16 | /// In tokens 17 | pub const CONTEXT_WINDOW_SIZE: usize = 200_000; 18 | 19 | pub const CONTEXT_FILES_MAX_SIZE: usize = 150_000; 20 | 21 | pub const MAX_CHARS: usize = TokenCounter::token_to_chars(CONTEXT_WINDOW_SIZE); // Character-based warning threshold 22 | 23 | pub const DUMMY_TOOL_NAME: &str = "dummy"; 24 | 25 | pub const MAX_NUMBER_OF_IMAGES_PER_REQUEST: usize = 10; 26 | 27 | /// In bytes - 10 MB 28 | pub const MAX_IMAGE_SIZE: usize = 10 * 1024 * 1024; 29 | -------------------------------------------------------------------------------- /crates/cli/src/cli/issue.rs: -------------------------------------------------------------------------------- 1 | use std::process::ExitCode; 2 | 3 | use clap::Args; 4 | use eyre::Result; 5 | 6 | #[derive(Debug, Args, PartialEq, Eq)] 7 | pub struct IssueArgs { 8 | /// Force issue creation 9 | #[arg(long, short = 'f')] 10 | force: bool, 11 | /// Issue description 12 | description: Vec, 13 | } 14 | 15 | impl IssueArgs { 16 | #[allow(unreachable_code)] 17 | pub async fn execute(&self) -> Result { 18 | let joined_description = self.description.join(" ").trim().to_owned(); 19 | 20 | let issue_title = match joined_description.len() { 21 | 0 => dialoguer::Input::with_theme(&crate::util::dialoguer_theme()) 22 | .with_prompt("Issue Title") 23 | .interact_text()?, 24 | _ => joined_description, 25 | }; 26 | 27 | let _ = crate::cli::chat::util::issue::IssueCreator { 28 | title: Some(issue_title), 29 | expected_behavior: None, 30 | actual_behavior: None, 31 | steps_to_reproduce: None, 32 | additional_environment: None, 33 | } 34 | .create_url() 35 | .await; 36 | 37 | Ok(ExitCode::SUCCESS) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/000_migration_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS migrations ( 2 | id INTEGER PRIMARY KEY, 3 | version INTEGER NOT NULL, 4 | migration_time INTEGER NOT NULL 5 | ); -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/001_history_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS history ( 2 | id INTEGER PRIMARY KEY, 3 | command TEXT, 4 | shell TEXT, 5 | pid INTEGER, 6 | session_id TEXT, 7 | cwd TEXT, 8 | time INTEGER, 9 | in_ssh INTEGER, 10 | in_docker INTEGER, 11 | hostname TEXT, 12 | exit_code INTEGER 13 | ); 14 | -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/002_drop_history_in_ssh_docker.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE history DROP COLUMN in_ssh; 2 | ALTER TABLE history DROP COLUMN in_docker; 3 | -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/003_improved_history_timing.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE history RENAME COLUMN time TO start_time; 2 | ALTER TABLE history ADD COLUMN end_time INTEGER; 3 | ALTER TABLE history ADD COLUMN duration INTEGER; 4 | -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/004_state_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE state ( 2 | key TEXT PRIMARY KEY, 3 | value TEXT 4 | ); 5 | -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/005_auth_table.sql: -------------------------------------------------------------------------------- 1 | -- We create a separate auth_kv to ensure the data is not available in all the same 2 | -- places that the state is available in 3 | CREATE TABLE auth_kv ( 4 | key TEXT PRIMARY KEY, 5 | value TEXT 6 | ); 7 | -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/006_make_state_blob.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE state RENAME TO state_old; 2 | CREATE TABLE state ( 3 | key TEXT PRIMARY KEY, 4 | value BLOB 5 | ); 6 | INSERT INTO state SELECT key, value FROM state_old; 7 | DROP TABLE state_old; -------------------------------------------------------------------------------- /crates/cli/src/database/sqlite_migrations/007_conversations_table.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE conversations ( 2 | key TEXT PRIMARY KEY, 3 | value TEXT 4 | ); 5 | -------------------------------------------------------------------------------- /crates/cli/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg(not(test))] 2 | //! This lib.rs is only here for testing purposes. 3 | //! `test_mcp_server/test_server.rs` is declared as a separate binary and would need a way to 4 | //! reference types defined inside of this crate, hence the export. 5 | pub mod api_client; 6 | pub mod auth; 7 | pub mod aws_common; 8 | pub mod cli; 9 | pub mod database; 10 | pub mod logging; 11 | pub mod mcp_client; 12 | pub mod platform; 13 | pub mod request; 14 | pub mod telemetry; 15 | pub mod util; 16 | 17 | pub use mcp_client::*; 18 | -------------------------------------------------------------------------------- /crates/cli/src/mcp_client/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod client; 2 | pub mod error; 3 | pub mod facilitator_types; 4 | pub mod messenger; 5 | pub mod server; 6 | pub mod transport; 7 | 8 | pub use client::*; 9 | pub use facilitator_types::*; 10 | pub use messenger::*; 11 | #[allow(unused_imports)] 12 | pub use server::*; 13 | pub use transport::*; 14 | -------------------------------------------------------------------------------- /crates/cli/src/mcp_client/transport/websocket.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli/3311ed237c6ebe4ab5ea5edf319bc88d445d2f76/crates/cli/src/mcp_client/transport/websocket.rs -------------------------------------------------------------------------------- /crates/cli/src/telemetry/endpoint.rs: -------------------------------------------------------------------------------- 1 | use amzn_toolkit_telemetry_client::config::endpoint::{ 2 | Endpoint, 3 | EndpointFuture, 4 | Params, 5 | ResolveEndpoint, 6 | }; 7 | 8 | #[derive(Debug, Clone, Copy)] 9 | pub(crate) struct StaticEndpoint(pub &'static str); 10 | 11 | impl ResolveEndpoint for StaticEndpoint { 12 | fn resolve_endpoint<'a>(&'a self, _params: &'a Params) -> EndpointFuture<'a> { 13 | let endpoint = Endpoint::builder().url(self.0).build(); 14 | tracing::info!(?endpoint, "Resolving endpoint"); 15 | EndpointFuture::ready(Ok(endpoint)) 16 | } 17 | } 18 | 19 | #[cfg(test)] 20 | mod tests { 21 | use super::*; 22 | 23 | #[tokio::test] 24 | async fn test_static_endpoint() { 25 | let endpoint = StaticEndpoint("https://example.com"); 26 | let params = Params::builder().build().unwrap(); 27 | let endpoint = endpoint.resolve_endpoint(¶ms).await.unwrap(); 28 | assert_eq!(endpoint.url(), "https://example.com"); 29 | assert!(endpoint.properties().is_empty()); 30 | assert!(endpoint.headers().count() == 0); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /crates/cli/src/util/cli_context.rs: -------------------------------------------------------------------------------- 1 | use std::sync::Arc; 2 | 3 | use crate::platform::Context; 4 | 5 | #[derive(Debug, Clone)] 6 | pub struct CliContext { 7 | context: Arc, 8 | } 9 | 10 | impl Default for CliContext { 11 | fn default() -> Self { 12 | Self::new() 13 | } 14 | } 15 | 16 | impl CliContext { 17 | pub fn new() -> Self { 18 | Self { 19 | context: Context::new(), 20 | } 21 | } 22 | 23 | pub fn context(&self) -> &Context { 24 | &self.context 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /crates/cli/src/util/process/mod.rs: -------------------------------------------------------------------------------- 1 | pub use sysinfo::Pid; 2 | 3 | #[cfg(target_os = "windows")] 4 | mod windows; 5 | #[cfg(target_os = "windows")] 6 | pub use windows::*; 7 | 8 | #[cfg(not(windows))] 9 | mod unix; 10 | #[cfg(not(windows))] 11 | pub use unix::*; 12 | -------------------------------------------------------------------------------- /docs/SUMMARY.md: -------------------------------------------------------------------------------- 1 | [Introduction](./introduction/mod.md) 2 | 3 | # User Guide 4 | 5 | - [Installation](./installation/mod.md) 6 | - [Installing on MacOS](./installation/macos.md) 7 | - [Installing on Linux](./installation/linux.md) 8 | - [Installing on Windows]() 9 | - [Over SSH](./installation/ssh.md) 10 | - [Support and feature requests](./support/mod.md) 11 | 12 | # Contributor Guide 13 | -------------------------------------------------------------------------------- /docs/installation/mod.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Installation of Amazon Q varies per platform. 4 | 5 | * [macOS](./macos.md) 6 | * [Linux](./linux.md) 7 | * Windows is not currently supported 8 | 9 | ## Installing Amazon Q for use over SSH 10 | 11 | 1. Ensure that you've installed Amazon Q on your local machine. 12 | 2. Follow [the SSH guide](./ssh.md) 13 | -------------------------------------------------------------------------------- /docs/installation/ssh.md: -------------------------------------------------------------------------------- 1 | # Over SSH 2 | -------------------------------------------------------------------------------- /docs/introduction/cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli/3311ed237c6ebe4ab5ea5edf319bc88d445d2f76/docs/introduction/cli.png -------------------------------------------------------------------------------- /docs/introduction/mod.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Amazon Q makes the command line easier to use. 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/support/doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli/3311ed237c6ebe4ab5ea5edf319bc88d445d2f76/docs/support/doctor.png -------------------------------------------------------------------------------- /docs/support/issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-q-developer-cli/3311ed237c6ebe4ab5ea5edf319bc88d445d2f76/docs/support/issue.png -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.84.0" 3 | profile = "minimal" 4 | components = ["rustfmt", "clippy"] 5 | targets = [ 6 | "x86_64-apple-darwin", 7 | "aarch64-apple-darwin", 8 | "x86_64-unknown-linux-gnu", 9 | "wasm32-wasip1", 10 | "x86_64-pc-windows-msvc", 11 | ] 12 | -------------------------------------------------------------------------------- /scripts/const.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | 4 | APP_NAME = "Amazon Q" 5 | CLI_BINARY_NAME = "q" 6 | CHAT_BINARY_NAME = "qchat" 7 | PTY_BINARY_NAME = "qterm" 8 | DESKTOP_BINARY_NAME = "q-desktop" 9 | URL_SCHEMA = "q" 10 | TAURI_PRODUCT_NAME = "q_desktop" 11 | LINUX_PACKAGE_NAME = "amazon-q" 12 | 13 | # macos specific 14 | MACOS_BUNDLE_ID = "com.amazon.codewhisperer" 15 | DMG_NAME = APP_NAME 16 | 17 | # Linux specific 18 | LINUX_ARCHIVE_NAME = "q" 19 | LINUX_LEGACY_GNOME_EXTENSION_UUID = "amazon-q-for-cli-legacy-gnome-integration@aws.amazon.com" 20 | LINUX_MODERN_GNOME_EXTENSION_UUID = "amazon-q-for-cli-gnome-integration@aws.amazon.com" 21 | 22 | # cargo packages 23 | CLI_PACKAGE_NAME = "q_cli" 24 | CHAT_PACKAGE_NAME = "chat_cli" 25 | PTY_PACKAGE_NAME = "figterm" 26 | DESKTOP_PACKAGE_NAME = "fig_desktop" 27 | DESKTOP_FUZZ_PACKAGE_NAME = "fig_desktop-fuzz" 28 | 29 | DESKTOP_PACKAGE_PATH = pathlib.Path("crates", "fig_desktop") 30 | 31 | # AMZN Mobile LLC 32 | APPLE_TEAM_ID = "94KV3E626L" 33 | -------------------------------------------------------------------------------- /scripts/doc.py: -------------------------------------------------------------------------------- 1 | from const import DESKTOP_PACKAGE_NAME 2 | from rust import cargo_cmd_name 3 | from util import isLinux, run_cmd 4 | 5 | 6 | def run_doc(): 7 | doc_args = [cargo_cmd_name(), "doc", "--no-deps", "--workspace"] 8 | if isLinux(): 9 | doc_args.extend(["--exclude", DESKTOP_PACKAGE_NAME]) 10 | run_cmd(doc_args) 11 | -------------------------------------------------------------------------------- /scripts/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.ruff] 2 | line-length = 120 3 | -------------------------------------------------------------------------------- /scripts/requirements.txt: -------------------------------------------------------------------------------- 1 | boto3==1.34.122 2 | botocore==1.34.122 3 | dmgbuild==1.6.1; sys_platform == "darwin" 4 | requests==2.32.3 5 | -------------------------------------------------------------------------------- /typos.toml: -------------------------------------------------------------------------------- 1 | [files] 2 | extend-exclude = [ 3 | "tests", 4 | "crates/amzn-codewhisperer-client", 5 | "crates/amzn-codewhisperer-streaming-client", 6 | "crates/amzn-consolas-client", 7 | "crates/amzn-toolkit-telemetry-client", 8 | "crates/amzn-qdeveloper-client", 9 | "crates/amzn-qdeveloper-streaming-client", 10 | "crates/aws-toolkit-telemetry-definitions/def.json", 11 | "crates/zbus", 12 | "crates/zbus_names", 13 | "packages/fuzzysort", 14 | "packages/dashboard-app/public/license/NOTICE.txt", 15 | "pnpm-lock.yaml", 16 | ] 17 | 18 | [default] 19 | extend-ignore-re = [ 20 | # Ignore lines with trailing `spellchecker:disable-line` 21 | "(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", 22 | ] 23 | 24 | [default.extend-words] 25 | # These are correct in the context of Fig, but aren't normal words 26 | iterm = "iterm" 27 | preedit = "preedit" 28 | xmodifiers = "xmodifiers" 29 | zvariant = "zvariant" 30 | ser = "ser" 31 | sur = "sur" 32 | ratatui = "ratatui" 33 | typ = "typ" 34 | 35 | [type.rust.extend-identifiers] 36 | # typos really wanted to correct 2ND -> 2AND 37 | FROM_LEFT_2ND_BUTTON_PRESSED = "FROM_LEFT_2ND_BUTTON_PRESSED" 38 | --------------------------------------------------------------------------------