diff --git a/clients/client-qbusiness/.gitignore b/clients/client-qbusiness/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-qbusiness/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-qbusiness/LICENSE b/clients/client-qbusiness/LICENSE new file mode 100644 index 000000000000..5001cd317c44 --- /dev/null +++ b/clients/client-qbusiness/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-qbusiness/README.md b/clients/client-qbusiness/README.md new file mode 100644 index 000000000000..0c4c2d6a9a7c --- /dev/null +++ b/clients/client-qbusiness/README.md @@ -0,0 +1,646 @@ + + +# @aws-sdk/client-qbusiness + +## Description + +AWS SDK for JavaScript QBusiness Client for Node.js, Browser and React Native. + +

+

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-qbusiness +using your favorite package manager: + +- `npm install @aws-sdk/client-qbusiness` +- `yarn add @aws-sdk/client-qbusiness` +- `pnpm add @aws-sdk/client-qbusiness` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `QBusinessClient` and +the commands you need, for example `ListApplicationsCommand`: + +```js +// ES5 example +const { QBusinessClient, ListApplicationsCommand } = require("@aws-sdk/client-qbusiness"); +``` + +```ts +// ES6+ example +import { QBusinessClient, ListApplicationsCommand } from "@aws-sdk/client-qbusiness"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new QBusinessClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListApplicationsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-qbusiness"; +const client = new AWS.QBusiness({ region: "REGION" }); + +// async/await. +try { + const data = await client.listApplications(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listApplications(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listApplications(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-qbusiness` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +BatchDeleteDocument + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/BatchDeleteDocumentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/BatchDeleteDocumentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/BatchDeleteDocumentCommandOutput/) + +
+
+ +BatchPutDocument + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/BatchPutDocumentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/BatchPutDocumentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/BatchPutDocumentCommandOutput/) + +
+
+ +ChatSync + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ChatSyncCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ChatSyncCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ChatSyncCommandOutput/) + +
+
+ +CreateApplication + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateApplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateApplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateApplicationCommandOutput/) + +
+
+ +CreateDataSource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateDataSourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateDataSourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateDataSourceCommandOutput/) + +
+
+ +CreateIndex + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateIndexCommandOutput/) + +
+
+ +CreatePlugin + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreatePluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreatePluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreatePluginCommandOutput/) + +
+
+ +CreateRetriever + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateRetrieverCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateRetrieverCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateRetrieverCommandOutput/) + +
+
+ +CreateUser + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateUserCommandOutput/) + +
+
+ +CreateWebExperience + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateWebExperienceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateWebExperienceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateWebExperienceCommandOutput/) + +
+
+ +DeleteApplication + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteApplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteApplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteApplicationCommandOutput/) + +
+
+ +DeleteChatControlsConfiguration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteChatControlsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteChatControlsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteChatControlsConfigurationCommandOutput/) + +
+
+ +DeleteConversation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteConversationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteConversationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteConversationCommandOutput/) + +
+
+ +DeleteDataSource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteDataSourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteDataSourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteDataSourceCommandOutput/) + +
+
+ +DeleteGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteGroupCommandOutput/) + +
+
+ +DeleteIndex + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteIndexCommandOutput/) + +
+
+ +DeletePlugin + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeletePluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeletePluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeletePluginCommandOutput/) + +
+
+ +DeleteRetriever + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteRetrieverCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteRetrieverCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteRetrieverCommandOutput/) + +
+
+ +DeleteUser + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteUserCommandOutput/) + +
+
+ +DeleteWebExperience + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/DeleteWebExperienceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteWebExperienceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/DeleteWebExperienceCommandOutput/) + +
+
+ +GetApplication + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetApplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetApplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetApplicationCommandOutput/) + +
+
+ +GetChatControlsConfiguration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetChatControlsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetChatControlsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetChatControlsConfigurationCommandOutput/) + +
+
+ +GetDataSource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetDataSourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetDataSourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetDataSourceCommandOutput/) + +
+
+ +GetGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetGroupCommandOutput/) + +
+
+ +GetIndex + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetIndexCommandOutput/) + +
+
+ +GetPlugin + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetPluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetPluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetPluginCommandOutput/) + +
+
+ +GetRetriever + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetRetrieverCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetRetrieverCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetRetrieverCommandOutput/) + +
+
+ +GetUser + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetUserCommandOutput/) + +
+
+ +GetWebExperience + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/GetWebExperienceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetWebExperienceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/GetWebExperienceCommandOutput/) + +
+
+ +ListApplications + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListApplicationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListApplicationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListApplicationsCommandOutput/) + +
+
+ +ListConversations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListConversationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListConversationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListConversationsCommandOutput/) + +
+
+ +ListDataSources + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListDataSourcesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListDataSourcesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListDataSourcesCommandOutput/) + +
+
+ +ListDataSourceSyncJobs + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListDataSourceSyncJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListDataSourceSyncJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListDataSourceSyncJobsCommandOutput/) + +
+
+ +ListDocuments + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListDocumentsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListDocumentsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListDocumentsCommandOutput/) + +
+
+ +ListGroups + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListGroupsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListGroupsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListGroupsCommandOutput/) + +
+
+ +ListIndices + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListIndicesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListIndicesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListIndicesCommandOutput/) + +
+
+ +ListMessages + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListMessagesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListMessagesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListMessagesCommandOutput/) + +
+
+ +ListPlugins + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListPluginsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListPluginsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListPluginsCommandOutput/) + +
+
+ +ListRetrievers + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListRetrieversCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListRetrieversCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListRetrieversCommandOutput/) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListTagsForResourceCommandOutput/) + +
+
+ +ListWebExperiences + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/ListWebExperiencesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListWebExperiencesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/ListWebExperiencesCommandOutput/) + +
+
+ +PutFeedback + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/PutFeedbackCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/PutFeedbackCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/PutFeedbackCommandOutput/) + +
+
+ +PutGroup + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/PutGroupCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/PutGroupCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/PutGroupCommandOutput/) + +
+
+ +StartDataSourceSyncJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/StartDataSourceSyncJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/StartDataSourceSyncJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/StartDataSourceSyncJobCommandOutput/) + +
+
+ +StopDataSourceSyncJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/StopDataSourceSyncJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/StopDataSourceSyncJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/StopDataSourceSyncJobCommandOutput/) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/TagResourceCommandOutput/) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UntagResourceCommandOutput/) + +
+
+ +UpdateApplication + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateApplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateApplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateApplicationCommandOutput/) + +
+
+ +UpdateChatControlsConfiguration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateChatControlsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateChatControlsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateChatControlsConfigurationCommandOutput/) + +
+
+ +UpdateDataSource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateDataSourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateDataSourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateDataSourceCommandOutput/) + +
+
+ +UpdateIndex + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateIndexCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateIndexCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateIndexCommandOutput/) + +
+
+ +UpdatePlugin + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdatePluginCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdatePluginCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdatePluginCommandOutput/) + +
+
+ +UpdateRetriever + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateRetrieverCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateRetrieverCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateRetrieverCommandOutput/) + +
+
+ +UpdateUser + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateUserCommandOutput/) + +
+
+ +UpdateWebExperience + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/UpdateWebExperienceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateWebExperienceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/UpdateWebExperienceCommandOutput/) + +
diff --git a/clients/client-qbusiness/api-extractor.json b/clients/client-qbusiness/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-qbusiness/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-qbusiness/package.json b/clients/client-qbusiness/package.json new file mode 100644 index 000000000000..dca95176fc9d --- /dev/null +++ b/clients/client-qbusiness/package.json @@ -0,0 +1,104 @@ +{ + "name": "@aws-sdk/client-qbusiness", + "description": "AWS SDK for JavaScript Qbusiness Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:docs": "typedoc", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo qbusiness" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "*", + "@aws-sdk/core": "*", + "@aws-sdk/credential-provider-node": "*", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-signing": "*", + "@aws-sdk/middleware-user-agent": "*", + "@aws-sdk/region-config-resolver": "*", + "@aws-sdk/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^2.0.18", + "@smithy/fetch-http-handler": "^2.2.6", + "@smithy/hash-node": "^2.0.15", + "@smithy/invalid-dependency": "^2.0.13", + "@smithy/middleware-content-length": "^2.0.15", + "@smithy/middleware-endpoint": "^2.2.0", + "@smithy/middleware-retry": "^2.0.20", + "@smithy/middleware-serde": "^2.0.13", + "@smithy/middleware-stack": "^2.0.7", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/node-http-handler": "^2.1.9", + "@smithy/protocol-http": "^3.0.9", + "@smithy/smithy-client": "^2.1.15", + "@smithy/types": "^2.5.0", + "@smithy/url-parser": "^2.0.13", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.19", + "@smithy/util-defaults-mode-node": "^2.0.25", + "@smithy/util-endpoints": "^1.0.4", + "@smithy/util-retry": "^2.0.6", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@smithy/service-client-documentation-generator": "^2.0.0", + "@tsconfig/node14": "1.0.3", + "@types/node": "^14.14.31", + "@types/uuid": "^8.3.0", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typedoc": "0.23.23", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-qbusiness", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-qbusiness" + } +} diff --git a/clients/client-qbusiness/src/QBusiness.ts b/clients/client-qbusiness/src/QBusiness.ts new file mode 100644 index 000000000000..da3dfbc28725 --- /dev/null +++ b/clients/client-qbusiness/src/QBusiness.ts @@ -0,0 +1,1037 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { + BatchDeleteDocumentCommand, + BatchDeleteDocumentCommandInput, + BatchDeleteDocumentCommandOutput, +} from "./commands/BatchDeleteDocumentCommand"; +import { + BatchPutDocumentCommand, + BatchPutDocumentCommandInput, + BatchPutDocumentCommandOutput, +} from "./commands/BatchPutDocumentCommand"; +import { ChatSyncCommand, ChatSyncCommandInput, ChatSyncCommandOutput } from "./commands/ChatSyncCommand"; +import { + CreateApplicationCommand, + CreateApplicationCommandInput, + CreateApplicationCommandOutput, +} from "./commands/CreateApplicationCommand"; +import { + CreateDataSourceCommand, + CreateDataSourceCommandInput, + CreateDataSourceCommandOutput, +} from "./commands/CreateDataSourceCommand"; +import { CreateIndexCommand, CreateIndexCommandInput, CreateIndexCommandOutput } from "./commands/CreateIndexCommand"; +import { + CreatePluginCommand, + CreatePluginCommandInput, + CreatePluginCommandOutput, +} from "./commands/CreatePluginCommand"; +import { + CreateRetrieverCommand, + CreateRetrieverCommandInput, + CreateRetrieverCommandOutput, +} from "./commands/CreateRetrieverCommand"; +import { CreateUserCommand, CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand"; +import { + CreateWebExperienceCommand, + CreateWebExperienceCommandInput, + CreateWebExperienceCommandOutput, +} from "./commands/CreateWebExperienceCommand"; +import { + DeleteApplicationCommand, + DeleteApplicationCommandInput, + DeleteApplicationCommandOutput, +} from "./commands/DeleteApplicationCommand"; +import { + DeleteChatControlsConfigurationCommand, + DeleteChatControlsConfigurationCommandInput, + DeleteChatControlsConfigurationCommandOutput, +} from "./commands/DeleteChatControlsConfigurationCommand"; +import { + DeleteConversationCommand, + DeleteConversationCommandInput, + DeleteConversationCommandOutput, +} from "./commands/DeleteConversationCommand"; +import { + DeleteDataSourceCommand, + DeleteDataSourceCommandInput, + DeleteDataSourceCommandOutput, +} from "./commands/DeleteDataSourceCommand"; +import { DeleteGroupCommand, DeleteGroupCommandInput, DeleteGroupCommandOutput } from "./commands/DeleteGroupCommand"; +import { DeleteIndexCommand, DeleteIndexCommandInput, DeleteIndexCommandOutput } from "./commands/DeleteIndexCommand"; +import { + DeletePluginCommand, + DeletePluginCommandInput, + DeletePluginCommandOutput, +} from "./commands/DeletePluginCommand"; +import { + DeleteRetrieverCommand, + DeleteRetrieverCommandInput, + DeleteRetrieverCommandOutput, +} from "./commands/DeleteRetrieverCommand"; +import { DeleteUserCommand, DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand"; +import { + DeleteWebExperienceCommand, + DeleteWebExperienceCommandInput, + DeleteWebExperienceCommandOutput, +} from "./commands/DeleteWebExperienceCommand"; +import { + GetApplicationCommand, + GetApplicationCommandInput, + GetApplicationCommandOutput, +} from "./commands/GetApplicationCommand"; +import { + GetChatControlsConfigurationCommand, + GetChatControlsConfigurationCommandInput, + GetChatControlsConfigurationCommandOutput, +} from "./commands/GetChatControlsConfigurationCommand"; +import { + GetDataSourceCommand, + GetDataSourceCommandInput, + GetDataSourceCommandOutput, +} from "./commands/GetDataSourceCommand"; +import { GetGroupCommand, GetGroupCommandInput, GetGroupCommandOutput } from "./commands/GetGroupCommand"; +import { GetIndexCommand, GetIndexCommandInput, GetIndexCommandOutput } from "./commands/GetIndexCommand"; +import { GetPluginCommand, GetPluginCommandInput, GetPluginCommandOutput } from "./commands/GetPluginCommand"; +import { + GetRetrieverCommand, + GetRetrieverCommandInput, + GetRetrieverCommandOutput, +} from "./commands/GetRetrieverCommand"; +import { GetUserCommand, GetUserCommandInput, GetUserCommandOutput } from "./commands/GetUserCommand"; +import { + GetWebExperienceCommand, + GetWebExperienceCommandInput, + GetWebExperienceCommandOutput, +} from "./commands/GetWebExperienceCommand"; +import { + ListApplicationsCommand, + ListApplicationsCommandInput, + ListApplicationsCommandOutput, +} from "./commands/ListApplicationsCommand"; +import { + ListConversationsCommand, + ListConversationsCommandInput, + ListConversationsCommandOutput, +} from "./commands/ListConversationsCommand"; +import { + ListDataSourcesCommand, + ListDataSourcesCommandInput, + ListDataSourcesCommandOutput, +} from "./commands/ListDataSourcesCommand"; +import { + ListDataSourceSyncJobsCommand, + ListDataSourceSyncJobsCommandInput, + ListDataSourceSyncJobsCommandOutput, +} from "./commands/ListDataSourceSyncJobsCommand"; +import { + ListDocumentsCommand, + ListDocumentsCommandInput, + ListDocumentsCommandOutput, +} from "./commands/ListDocumentsCommand"; +import { ListGroupsCommand, ListGroupsCommandInput, ListGroupsCommandOutput } from "./commands/ListGroupsCommand"; +import { ListIndicesCommand, ListIndicesCommandInput, ListIndicesCommandOutput } from "./commands/ListIndicesCommand"; +import { + ListMessagesCommand, + ListMessagesCommandInput, + ListMessagesCommandOutput, +} from "./commands/ListMessagesCommand"; +import { ListPluginsCommand, ListPluginsCommandInput, ListPluginsCommandOutput } from "./commands/ListPluginsCommand"; +import { + ListRetrieversCommand, + ListRetrieversCommandInput, + ListRetrieversCommandOutput, +} from "./commands/ListRetrieversCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + ListWebExperiencesCommand, + ListWebExperiencesCommandInput, + ListWebExperiencesCommandOutput, +} from "./commands/ListWebExperiencesCommand"; +import { PutFeedbackCommand, PutFeedbackCommandInput, PutFeedbackCommandOutput } from "./commands/PutFeedbackCommand"; +import { PutGroupCommand, PutGroupCommandInput, PutGroupCommandOutput } from "./commands/PutGroupCommand"; +import { + StartDataSourceSyncJobCommand, + StartDataSourceSyncJobCommandInput, + StartDataSourceSyncJobCommandOutput, +} from "./commands/StartDataSourceSyncJobCommand"; +import { + StopDataSourceSyncJobCommand, + StopDataSourceSyncJobCommandInput, + StopDataSourceSyncJobCommandOutput, +} from "./commands/StopDataSourceSyncJobCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateApplicationCommand, + UpdateApplicationCommandInput, + UpdateApplicationCommandOutput, +} from "./commands/UpdateApplicationCommand"; +import { + UpdateChatControlsConfigurationCommand, + UpdateChatControlsConfigurationCommandInput, + UpdateChatControlsConfigurationCommandOutput, +} from "./commands/UpdateChatControlsConfigurationCommand"; +import { + UpdateDataSourceCommand, + UpdateDataSourceCommandInput, + UpdateDataSourceCommandOutput, +} from "./commands/UpdateDataSourceCommand"; +import { UpdateIndexCommand, UpdateIndexCommandInput, UpdateIndexCommandOutput } from "./commands/UpdateIndexCommand"; +import { + UpdatePluginCommand, + UpdatePluginCommandInput, + UpdatePluginCommandOutput, +} from "./commands/UpdatePluginCommand"; +import { + UpdateRetrieverCommand, + UpdateRetrieverCommandInput, + UpdateRetrieverCommandOutput, +} from "./commands/UpdateRetrieverCommand"; +import { UpdateUserCommand, UpdateUserCommandInput, UpdateUserCommandOutput } from "./commands/UpdateUserCommand"; +import { + UpdateWebExperienceCommand, + UpdateWebExperienceCommandInput, + UpdateWebExperienceCommandOutput, +} from "./commands/UpdateWebExperienceCommand"; +import { QBusinessClient, QBusinessClientConfig } from "./QBusinessClient"; + +const commands = { + BatchDeleteDocumentCommand, + BatchPutDocumentCommand, + ChatSyncCommand, + CreateApplicationCommand, + CreateDataSourceCommand, + CreateIndexCommand, + CreatePluginCommand, + CreateRetrieverCommand, + CreateUserCommand, + CreateWebExperienceCommand, + DeleteApplicationCommand, + DeleteChatControlsConfigurationCommand, + DeleteConversationCommand, + DeleteDataSourceCommand, + DeleteGroupCommand, + DeleteIndexCommand, + DeletePluginCommand, + DeleteRetrieverCommand, + DeleteUserCommand, + DeleteWebExperienceCommand, + GetApplicationCommand, + GetChatControlsConfigurationCommand, + GetDataSourceCommand, + GetGroupCommand, + GetIndexCommand, + GetPluginCommand, + GetRetrieverCommand, + GetUserCommand, + GetWebExperienceCommand, + ListApplicationsCommand, + ListConversationsCommand, + ListDataSourcesCommand, + ListDataSourceSyncJobsCommand, + ListDocumentsCommand, + ListGroupsCommand, + ListIndicesCommand, + ListMessagesCommand, + ListPluginsCommand, + ListRetrieversCommand, + ListTagsForResourceCommand, + ListWebExperiencesCommand, + PutFeedbackCommand, + PutGroupCommand, + StartDataSourceSyncJobCommand, + StopDataSourceSyncJobCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateApplicationCommand, + UpdateChatControlsConfigurationCommand, + UpdateDataSourceCommand, + UpdateIndexCommand, + UpdatePluginCommand, + UpdateRetrieverCommand, + UpdateUserCommand, + UpdateWebExperienceCommand, +}; + +export interface QBusiness { + /** + * @see {@link BatchDeleteDocumentCommand} + */ + batchDeleteDocument( + args: BatchDeleteDocumentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + batchDeleteDocument( + args: BatchDeleteDocumentCommandInput, + cb: (err: any, data?: BatchDeleteDocumentCommandOutput) => void + ): void; + batchDeleteDocument( + args: BatchDeleteDocumentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: BatchDeleteDocumentCommandOutput) => void + ): void; + + /** + * @see {@link BatchPutDocumentCommand} + */ + batchPutDocument( + args: BatchPutDocumentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + batchPutDocument( + args: BatchPutDocumentCommandInput, + cb: (err: any, data?: BatchPutDocumentCommandOutput) => void + ): void; + batchPutDocument( + args: BatchPutDocumentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: BatchPutDocumentCommandOutput) => void + ): void; + + /** + * @see {@link ChatSyncCommand} + */ + chatSync(args: ChatSyncCommandInput, options?: __HttpHandlerOptions): Promise; + chatSync(args: ChatSyncCommandInput, cb: (err: any, data?: ChatSyncCommandOutput) => void): void; + chatSync( + args: ChatSyncCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ChatSyncCommandOutput) => void + ): void; + + /** + * @see {@link CreateApplicationCommand} + */ + createApplication( + args: CreateApplicationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createApplication( + args: CreateApplicationCommandInput, + cb: (err: any, data?: CreateApplicationCommandOutput) => void + ): void; + createApplication( + args: CreateApplicationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateApplicationCommandOutput) => void + ): void; + + /** + * @see {@link CreateDataSourceCommand} + */ + createDataSource( + args: CreateDataSourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createDataSource( + args: CreateDataSourceCommandInput, + cb: (err: any, data?: CreateDataSourceCommandOutput) => void + ): void; + createDataSource( + args: CreateDataSourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDataSourceCommandOutput) => void + ): void; + + /** + * @see {@link CreateIndexCommand} + */ + createIndex(args: CreateIndexCommandInput, options?: __HttpHandlerOptions): Promise; + createIndex(args: CreateIndexCommandInput, cb: (err: any, data?: CreateIndexCommandOutput) => void): void; + createIndex( + args: CreateIndexCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateIndexCommandOutput) => void + ): void; + + /** + * @see {@link CreatePluginCommand} + */ + createPlugin(args: CreatePluginCommandInput, options?: __HttpHandlerOptions): Promise; + createPlugin(args: CreatePluginCommandInput, cb: (err: any, data?: CreatePluginCommandOutput) => void): void; + createPlugin( + args: CreatePluginCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreatePluginCommandOutput) => void + ): void; + + /** + * @see {@link CreateRetrieverCommand} + */ + createRetriever( + args: CreateRetrieverCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createRetriever(args: CreateRetrieverCommandInput, cb: (err: any, data?: CreateRetrieverCommandOutput) => void): void; + createRetriever( + args: CreateRetrieverCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRetrieverCommandOutput) => void + ): void; + + /** + * @see {@link CreateUserCommand} + */ + createUser(args: CreateUserCommandInput, options?: __HttpHandlerOptions): Promise; + createUser(args: CreateUserCommandInput, cb: (err: any, data?: CreateUserCommandOutput) => void): void; + createUser( + args: CreateUserCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateUserCommandOutput) => void + ): void; + + /** + * @see {@link CreateWebExperienceCommand} + */ + createWebExperience( + args: CreateWebExperienceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createWebExperience( + args: CreateWebExperienceCommandInput, + cb: (err: any, data?: CreateWebExperienceCommandOutput) => void + ): void; + createWebExperience( + args: CreateWebExperienceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateWebExperienceCommandOutput) => void + ): void; + + /** + * @see {@link DeleteApplicationCommand} + */ + deleteApplication( + args: DeleteApplicationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteApplication( + args: DeleteApplicationCommandInput, + cb: (err: any, data?: DeleteApplicationCommandOutput) => void + ): void; + deleteApplication( + args: DeleteApplicationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteApplicationCommandOutput) => void + ): void; + + /** + * @see {@link DeleteChatControlsConfigurationCommand} + */ + deleteChatControlsConfiguration( + args: DeleteChatControlsConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteChatControlsConfiguration( + args: DeleteChatControlsConfigurationCommandInput, + cb: (err: any, data?: DeleteChatControlsConfigurationCommandOutput) => void + ): void; + deleteChatControlsConfiguration( + args: DeleteChatControlsConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteChatControlsConfigurationCommandOutput) => void + ): void; + + /** + * @see {@link DeleteConversationCommand} + */ + deleteConversation( + args: DeleteConversationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteConversation( + args: DeleteConversationCommandInput, + cb: (err: any, data?: DeleteConversationCommandOutput) => void + ): void; + deleteConversation( + args: DeleteConversationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteConversationCommandOutput) => void + ): void; + + /** + * @see {@link DeleteDataSourceCommand} + */ + deleteDataSource( + args: DeleteDataSourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteDataSource( + args: DeleteDataSourceCommandInput, + cb: (err: any, data?: DeleteDataSourceCommandOutput) => void + ): void; + deleteDataSource( + args: DeleteDataSourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDataSourceCommandOutput) => void + ): void; + + /** + * @see {@link DeleteGroupCommand} + */ + deleteGroup(args: DeleteGroupCommandInput, options?: __HttpHandlerOptions): Promise; + deleteGroup(args: DeleteGroupCommandInput, cb: (err: any, data?: DeleteGroupCommandOutput) => void): void; + deleteGroup( + args: DeleteGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteGroupCommandOutput) => void + ): void; + + /** + * @see {@link DeleteIndexCommand} + */ + deleteIndex(args: DeleteIndexCommandInput, options?: __HttpHandlerOptions): Promise; + deleteIndex(args: DeleteIndexCommandInput, cb: (err: any, data?: DeleteIndexCommandOutput) => void): void; + deleteIndex( + args: DeleteIndexCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteIndexCommandOutput) => void + ): void; + + /** + * @see {@link DeletePluginCommand} + */ + deletePlugin(args: DeletePluginCommandInput, options?: __HttpHandlerOptions): Promise; + deletePlugin(args: DeletePluginCommandInput, cb: (err: any, data?: DeletePluginCommandOutput) => void): void; + deletePlugin( + args: DeletePluginCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeletePluginCommandOutput) => void + ): void; + + /** + * @see {@link DeleteRetrieverCommand} + */ + deleteRetriever( + args: DeleteRetrieverCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteRetriever(args: DeleteRetrieverCommandInput, cb: (err: any, data?: DeleteRetrieverCommandOutput) => void): void; + deleteRetriever( + args: DeleteRetrieverCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRetrieverCommandOutput) => void + ): void; + + /** + * @see {@link DeleteUserCommand} + */ + deleteUser(args: DeleteUserCommandInput, options?: __HttpHandlerOptions): Promise; + deleteUser(args: DeleteUserCommandInput, cb: (err: any, data?: DeleteUserCommandOutput) => void): void; + deleteUser( + args: DeleteUserCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteUserCommandOutput) => void + ): void; + + /** + * @see {@link DeleteWebExperienceCommand} + */ + deleteWebExperience( + args: DeleteWebExperienceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteWebExperience( + args: DeleteWebExperienceCommandInput, + cb: (err: any, data?: DeleteWebExperienceCommandOutput) => void + ): void; + deleteWebExperience( + args: DeleteWebExperienceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteWebExperienceCommandOutput) => void + ): void; + + /** + * @see {@link GetApplicationCommand} + */ + getApplication( + args: GetApplicationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getApplication(args: GetApplicationCommandInput, cb: (err: any, data?: GetApplicationCommandOutput) => void): void; + getApplication( + args: GetApplicationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetApplicationCommandOutput) => void + ): void; + + /** + * @see {@link GetChatControlsConfigurationCommand} + */ + getChatControlsConfiguration( + args: GetChatControlsConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getChatControlsConfiguration( + args: GetChatControlsConfigurationCommandInput, + cb: (err: any, data?: GetChatControlsConfigurationCommandOutput) => void + ): void; + getChatControlsConfiguration( + args: GetChatControlsConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetChatControlsConfigurationCommandOutput) => void + ): void; + + /** + * @see {@link GetDataSourceCommand} + */ + getDataSource(args: GetDataSourceCommandInput, options?: __HttpHandlerOptions): Promise; + getDataSource(args: GetDataSourceCommandInput, cb: (err: any, data?: GetDataSourceCommandOutput) => void): void; + getDataSource( + args: GetDataSourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDataSourceCommandOutput) => void + ): void; + + /** + * @see {@link GetGroupCommand} + */ + getGroup(args: GetGroupCommandInput, options?: __HttpHandlerOptions): Promise; + getGroup(args: GetGroupCommandInput, cb: (err: any, data?: GetGroupCommandOutput) => void): void; + getGroup( + args: GetGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetGroupCommandOutput) => void + ): void; + + /** + * @see {@link GetIndexCommand} + */ + getIndex(args: GetIndexCommandInput, options?: __HttpHandlerOptions): Promise; + getIndex(args: GetIndexCommandInput, cb: (err: any, data?: GetIndexCommandOutput) => void): void; + getIndex( + args: GetIndexCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetIndexCommandOutput) => void + ): void; + + /** + * @see {@link GetPluginCommand} + */ + getPlugin(args: GetPluginCommandInput, options?: __HttpHandlerOptions): Promise; + getPlugin(args: GetPluginCommandInput, cb: (err: any, data?: GetPluginCommandOutput) => void): void; + getPlugin( + args: GetPluginCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetPluginCommandOutput) => void + ): void; + + /** + * @see {@link GetRetrieverCommand} + */ + getRetriever(args: GetRetrieverCommandInput, options?: __HttpHandlerOptions): Promise; + getRetriever(args: GetRetrieverCommandInput, cb: (err: any, data?: GetRetrieverCommandOutput) => void): void; + getRetriever( + args: GetRetrieverCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRetrieverCommandOutput) => void + ): void; + + /** + * @see {@link GetUserCommand} + */ + getUser(args: GetUserCommandInput, options?: __HttpHandlerOptions): Promise; + getUser(args: GetUserCommandInput, cb: (err: any, data?: GetUserCommandOutput) => void): void; + getUser( + args: GetUserCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetUserCommandOutput) => void + ): void; + + /** + * @see {@link GetWebExperienceCommand} + */ + getWebExperience( + args: GetWebExperienceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getWebExperience( + args: GetWebExperienceCommandInput, + cb: (err: any, data?: GetWebExperienceCommandOutput) => void + ): void; + getWebExperience( + args: GetWebExperienceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetWebExperienceCommandOutput) => void + ): void; + + /** + * @see {@link ListApplicationsCommand} + */ + listApplications( + args: ListApplicationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listApplications( + args: ListApplicationsCommandInput, + cb: (err: any, data?: ListApplicationsCommandOutput) => void + ): void; + listApplications( + args: ListApplicationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListApplicationsCommandOutput) => void + ): void; + + /** + * @see {@link ListConversationsCommand} + */ + listConversations( + args: ListConversationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listConversations( + args: ListConversationsCommandInput, + cb: (err: any, data?: ListConversationsCommandOutput) => void + ): void; + listConversations( + args: ListConversationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListConversationsCommandOutput) => void + ): void; + + /** + * @see {@link ListDataSourcesCommand} + */ + listDataSources( + args: ListDataSourcesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listDataSources(args: ListDataSourcesCommandInput, cb: (err: any, data?: ListDataSourcesCommandOutput) => void): void; + listDataSources( + args: ListDataSourcesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDataSourcesCommandOutput) => void + ): void; + + /** + * @see {@link ListDataSourceSyncJobsCommand} + */ + listDataSourceSyncJobs( + args: ListDataSourceSyncJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listDataSourceSyncJobs( + args: ListDataSourceSyncJobsCommandInput, + cb: (err: any, data?: ListDataSourceSyncJobsCommandOutput) => void + ): void; + listDataSourceSyncJobs( + args: ListDataSourceSyncJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDataSourceSyncJobsCommandOutput) => void + ): void; + + /** + * @see {@link ListDocumentsCommand} + */ + listDocuments(args: ListDocumentsCommandInput, options?: __HttpHandlerOptions): Promise; + listDocuments(args: ListDocumentsCommandInput, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void; + listDocuments( + args: ListDocumentsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDocumentsCommandOutput) => void + ): void; + + /** + * @see {@link ListGroupsCommand} + */ + listGroups(args: ListGroupsCommandInput, options?: __HttpHandlerOptions): Promise; + listGroups(args: ListGroupsCommandInput, cb: (err: any, data?: ListGroupsCommandOutput) => void): void; + listGroups( + args: ListGroupsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListGroupsCommandOutput) => void + ): void; + + /** + * @see {@link ListIndicesCommand} + */ + listIndices(args: ListIndicesCommandInput, options?: __HttpHandlerOptions): Promise; + listIndices(args: ListIndicesCommandInput, cb: (err: any, data?: ListIndicesCommandOutput) => void): void; + listIndices( + args: ListIndicesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListIndicesCommandOutput) => void + ): void; + + /** + * @see {@link ListMessagesCommand} + */ + listMessages(args: ListMessagesCommandInput, options?: __HttpHandlerOptions): Promise; + listMessages(args: ListMessagesCommandInput, cb: (err: any, data?: ListMessagesCommandOutput) => void): void; + listMessages( + args: ListMessagesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListMessagesCommandOutput) => void + ): void; + + /** + * @see {@link ListPluginsCommand} + */ + listPlugins(args: ListPluginsCommandInput, options?: __HttpHandlerOptions): Promise; + listPlugins(args: ListPluginsCommandInput, cb: (err: any, data?: ListPluginsCommandOutput) => void): void; + listPlugins( + args: ListPluginsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListPluginsCommandOutput) => void + ): void; + + /** + * @see {@link ListRetrieversCommand} + */ + listRetrievers( + args: ListRetrieversCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listRetrievers(args: ListRetrieversCommandInput, cb: (err: any, data?: ListRetrieversCommandOutput) => void): void; + listRetrievers( + args: ListRetrieversCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRetrieversCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link ListWebExperiencesCommand} + */ + listWebExperiences( + args: ListWebExperiencesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listWebExperiences( + args: ListWebExperiencesCommandInput, + cb: (err: any, data?: ListWebExperiencesCommandOutput) => void + ): void; + listWebExperiences( + args: ListWebExperiencesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListWebExperiencesCommandOutput) => void + ): void; + + /** + * @see {@link PutFeedbackCommand} + */ + putFeedback(args: PutFeedbackCommandInput, options?: __HttpHandlerOptions): Promise; + putFeedback(args: PutFeedbackCommandInput, cb: (err: any, data?: PutFeedbackCommandOutput) => void): void; + putFeedback( + args: PutFeedbackCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutFeedbackCommandOutput) => void + ): void; + + /** + * @see {@link PutGroupCommand} + */ + putGroup(args: PutGroupCommandInput, options?: __HttpHandlerOptions): Promise; + putGroup(args: PutGroupCommandInput, cb: (err: any, data?: PutGroupCommandOutput) => void): void; + putGroup( + args: PutGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutGroupCommandOutput) => void + ): void; + + /** + * @see {@link StartDataSourceSyncJobCommand} + */ + startDataSourceSyncJob( + args: StartDataSourceSyncJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startDataSourceSyncJob( + args: StartDataSourceSyncJobCommandInput, + cb: (err: any, data?: StartDataSourceSyncJobCommandOutput) => void + ): void; + startDataSourceSyncJob( + args: StartDataSourceSyncJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartDataSourceSyncJobCommandOutput) => void + ): void; + + /** + * @see {@link StopDataSourceSyncJobCommand} + */ + stopDataSourceSyncJob( + args: StopDataSourceSyncJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + stopDataSourceSyncJob( + args: StopDataSourceSyncJobCommandInput, + cb: (err: any, data?: StopDataSourceSyncJobCommandOutput) => void + ): void; + stopDataSourceSyncJob( + args: StopDataSourceSyncJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopDataSourceSyncJobCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateApplicationCommand} + */ + updateApplication( + args: UpdateApplicationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateApplication( + args: UpdateApplicationCommandInput, + cb: (err: any, data?: UpdateApplicationCommandOutput) => void + ): void; + updateApplication( + args: UpdateApplicationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateApplicationCommandOutput) => void + ): void; + + /** + * @see {@link UpdateChatControlsConfigurationCommand} + */ + updateChatControlsConfiguration( + args: UpdateChatControlsConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateChatControlsConfiguration( + args: UpdateChatControlsConfigurationCommandInput, + cb: (err: any, data?: UpdateChatControlsConfigurationCommandOutput) => void + ): void; + updateChatControlsConfiguration( + args: UpdateChatControlsConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateChatControlsConfigurationCommandOutput) => void + ): void; + + /** + * @see {@link UpdateDataSourceCommand} + */ + updateDataSource( + args: UpdateDataSourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateDataSource( + args: UpdateDataSourceCommandInput, + cb: (err: any, data?: UpdateDataSourceCommandOutput) => void + ): void; + updateDataSource( + args: UpdateDataSourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDataSourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateIndexCommand} + */ + updateIndex(args: UpdateIndexCommandInput, options?: __HttpHandlerOptions): Promise; + updateIndex(args: UpdateIndexCommandInput, cb: (err: any, data?: UpdateIndexCommandOutput) => void): void; + updateIndex( + args: UpdateIndexCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateIndexCommandOutput) => void + ): void; + + /** + * @see {@link UpdatePluginCommand} + */ + updatePlugin(args: UpdatePluginCommandInput, options?: __HttpHandlerOptions): Promise; + updatePlugin(args: UpdatePluginCommandInput, cb: (err: any, data?: UpdatePluginCommandOutput) => void): void; + updatePlugin( + args: UpdatePluginCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdatePluginCommandOutput) => void + ): void; + + /** + * @see {@link UpdateRetrieverCommand} + */ + updateRetriever( + args: UpdateRetrieverCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateRetriever(args: UpdateRetrieverCommandInput, cb: (err: any, data?: UpdateRetrieverCommandOutput) => void): void; + updateRetriever( + args: UpdateRetrieverCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRetrieverCommandOutput) => void + ): void; + + /** + * @see {@link UpdateUserCommand} + */ + updateUser(args: UpdateUserCommandInput, options?: __HttpHandlerOptions): Promise; + updateUser(args: UpdateUserCommandInput, cb: (err: any, data?: UpdateUserCommandOutput) => void): void; + updateUser( + args: UpdateUserCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateUserCommandOutput) => void + ): void; + + /** + * @see {@link UpdateWebExperienceCommand} + */ + updateWebExperience( + args: UpdateWebExperienceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateWebExperience( + args: UpdateWebExperienceCommandInput, + cb: (err: any, data?: UpdateWebExperienceCommandOutput) => void + ): void; + updateWebExperience( + args: UpdateWebExperienceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateWebExperienceCommandOutput) => void + ): void; +} + +/** + * @public + *

+ *

+ */ +export class QBusiness extends QBusinessClient implements QBusiness {} +createAggregatedClient(commands, QBusiness); diff --git a/clients/client-qbusiness/src/QBusinessClient.ts b/clients/client-qbusiness/src/QBusinessClient.ts new file mode 100644 index 000000000000..67d068cef4c4 --- /dev/null +++ b/clients/client-qbusiness/src/QBusinessClient.ts @@ -0,0 +1,487 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { Credentials as __Credentials } from "@aws-sdk/types"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + Checksum as __Checksum, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + BatchDeleteDocumentCommandInput, + BatchDeleteDocumentCommandOutput, +} from "./commands/BatchDeleteDocumentCommand"; +import { BatchPutDocumentCommandInput, BatchPutDocumentCommandOutput } from "./commands/BatchPutDocumentCommand"; +import { ChatSyncCommandInput, ChatSyncCommandOutput } from "./commands/ChatSyncCommand"; +import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "./commands/CreateApplicationCommand"; +import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand"; +import { CreateIndexCommandInput, CreateIndexCommandOutput } from "./commands/CreateIndexCommand"; +import { CreatePluginCommandInput, CreatePluginCommandOutput } from "./commands/CreatePluginCommand"; +import { CreateRetrieverCommandInput, CreateRetrieverCommandOutput } from "./commands/CreateRetrieverCommand"; +import { CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand"; +import { + CreateWebExperienceCommandInput, + CreateWebExperienceCommandOutput, +} from "./commands/CreateWebExperienceCommand"; +import { DeleteApplicationCommandInput, DeleteApplicationCommandOutput } from "./commands/DeleteApplicationCommand"; +import { + DeleteChatControlsConfigurationCommandInput, + DeleteChatControlsConfigurationCommandOutput, +} from "./commands/DeleteChatControlsConfigurationCommand"; +import { DeleteConversationCommandInput, DeleteConversationCommandOutput } from "./commands/DeleteConversationCommand"; +import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "./commands/DeleteDataSourceCommand"; +import { DeleteGroupCommandInput, DeleteGroupCommandOutput } from "./commands/DeleteGroupCommand"; +import { DeleteIndexCommandInput, DeleteIndexCommandOutput } from "./commands/DeleteIndexCommand"; +import { DeletePluginCommandInput, DeletePluginCommandOutput } from "./commands/DeletePluginCommand"; +import { DeleteRetrieverCommandInput, DeleteRetrieverCommandOutput } from "./commands/DeleteRetrieverCommand"; +import { DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand"; +import { + DeleteWebExperienceCommandInput, + DeleteWebExperienceCommandOutput, +} from "./commands/DeleteWebExperienceCommand"; +import { GetApplicationCommandInput, GetApplicationCommandOutput } from "./commands/GetApplicationCommand"; +import { + GetChatControlsConfigurationCommandInput, + GetChatControlsConfigurationCommandOutput, +} from "./commands/GetChatControlsConfigurationCommand"; +import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand"; +import { GetGroupCommandInput, GetGroupCommandOutput } from "./commands/GetGroupCommand"; +import { GetIndexCommandInput, GetIndexCommandOutput } from "./commands/GetIndexCommand"; +import { GetPluginCommandInput, GetPluginCommandOutput } from "./commands/GetPluginCommand"; +import { GetRetrieverCommandInput, GetRetrieverCommandOutput } from "./commands/GetRetrieverCommand"; +import { GetUserCommandInput, GetUserCommandOutput } from "./commands/GetUserCommand"; +import { GetWebExperienceCommandInput, GetWebExperienceCommandOutput } from "./commands/GetWebExperienceCommand"; +import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "./commands/ListApplicationsCommand"; +import { ListConversationsCommandInput, ListConversationsCommandOutput } from "./commands/ListConversationsCommand"; +import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand"; +import { + ListDataSourceSyncJobsCommandInput, + ListDataSourceSyncJobsCommandOutput, +} from "./commands/ListDataSourceSyncJobsCommand"; +import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand"; +import { ListGroupsCommandInput, ListGroupsCommandOutput } from "./commands/ListGroupsCommand"; +import { ListIndicesCommandInput, ListIndicesCommandOutput } from "./commands/ListIndicesCommand"; +import { ListMessagesCommandInput, ListMessagesCommandOutput } from "./commands/ListMessagesCommand"; +import { ListPluginsCommandInput, ListPluginsCommandOutput } from "./commands/ListPluginsCommand"; +import { ListRetrieversCommandInput, ListRetrieversCommandOutput } from "./commands/ListRetrieversCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { ListWebExperiencesCommandInput, ListWebExperiencesCommandOutput } from "./commands/ListWebExperiencesCommand"; +import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "./commands/PutFeedbackCommand"; +import { PutGroupCommandInput, PutGroupCommandOutput } from "./commands/PutGroupCommand"; +import { + StartDataSourceSyncJobCommandInput, + StartDataSourceSyncJobCommandOutput, +} from "./commands/StartDataSourceSyncJobCommand"; +import { + StopDataSourceSyncJobCommandInput, + StopDataSourceSyncJobCommandOutput, +} from "./commands/StopDataSourceSyncJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "./commands/UpdateApplicationCommand"; +import { + UpdateChatControlsConfigurationCommandInput, + UpdateChatControlsConfigurationCommandOutput, +} from "./commands/UpdateChatControlsConfigurationCommand"; +import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "./commands/UpdateDataSourceCommand"; +import { UpdateIndexCommandInput, UpdateIndexCommandOutput } from "./commands/UpdateIndexCommand"; +import { UpdatePluginCommandInput, UpdatePluginCommandOutput } from "./commands/UpdatePluginCommand"; +import { UpdateRetrieverCommandInput, UpdateRetrieverCommandOutput } from "./commands/UpdateRetrieverCommand"; +import { UpdateUserCommandInput, UpdateUserCommandOutput } from "./commands/UpdateUserCommand"; +import { + UpdateWebExperienceCommandInput, + UpdateWebExperienceCommandOutput, +} from "./commands/UpdateWebExperienceCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | BatchDeleteDocumentCommandInput + | BatchPutDocumentCommandInput + | ChatSyncCommandInput + | CreateApplicationCommandInput + | CreateDataSourceCommandInput + | CreateIndexCommandInput + | CreatePluginCommandInput + | CreateRetrieverCommandInput + | CreateUserCommandInput + | CreateWebExperienceCommandInput + | DeleteApplicationCommandInput + | DeleteChatControlsConfigurationCommandInput + | DeleteConversationCommandInput + | DeleteDataSourceCommandInput + | DeleteGroupCommandInput + | DeleteIndexCommandInput + | DeletePluginCommandInput + | DeleteRetrieverCommandInput + | DeleteUserCommandInput + | DeleteWebExperienceCommandInput + | GetApplicationCommandInput + | GetChatControlsConfigurationCommandInput + | GetDataSourceCommandInput + | GetGroupCommandInput + | GetIndexCommandInput + | GetPluginCommandInput + | GetRetrieverCommandInput + | GetUserCommandInput + | GetWebExperienceCommandInput + | ListApplicationsCommandInput + | ListConversationsCommandInput + | ListDataSourceSyncJobsCommandInput + | ListDataSourcesCommandInput + | ListDocumentsCommandInput + | ListGroupsCommandInput + | ListIndicesCommandInput + | ListMessagesCommandInput + | ListPluginsCommandInput + | ListRetrieversCommandInput + | ListTagsForResourceCommandInput + | ListWebExperiencesCommandInput + | PutFeedbackCommandInput + | PutGroupCommandInput + | StartDataSourceSyncJobCommandInput + | StopDataSourceSyncJobCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateApplicationCommandInput + | UpdateChatControlsConfigurationCommandInput + | UpdateDataSourceCommandInput + | UpdateIndexCommandInput + | UpdatePluginCommandInput + | UpdateRetrieverCommandInput + | UpdateUserCommandInput + | UpdateWebExperienceCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | BatchDeleteDocumentCommandOutput + | BatchPutDocumentCommandOutput + | ChatSyncCommandOutput + | CreateApplicationCommandOutput + | CreateDataSourceCommandOutput + | CreateIndexCommandOutput + | CreatePluginCommandOutput + | CreateRetrieverCommandOutput + | CreateUserCommandOutput + | CreateWebExperienceCommandOutput + | DeleteApplicationCommandOutput + | DeleteChatControlsConfigurationCommandOutput + | DeleteConversationCommandOutput + | DeleteDataSourceCommandOutput + | DeleteGroupCommandOutput + | DeleteIndexCommandOutput + | DeletePluginCommandOutput + | DeleteRetrieverCommandOutput + | DeleteUserCommandOutput + | DeleteWebExperienceCommandOutput + | GetApplicationCommandOutput + | GetChatControlsConfigurationCommandOutput + | GetDataSourceCommandOutput + | GetGroupCommandOutput + | GetIndexCommandOutput + | GetPluginCommandOutput + | GetRetrieverCommandOutput + | GetUserCommandOutput + | GetWebExperienceCommandOutput + | ListApplicationsCommandOutput + | ListConversationsCommandOutput + | ListDataSourceSyncJobsCommandOutput + | ListDataSourcesCommandOutput + | ListDocumentsCommandOutput + | ListGroupsCommandOutput + | ListIndicesCommandOutput + | ListMessagesCommandOutput + | ListPluginsCommandOutput + | ListRetrieversCommandOutput + | ListTagsForResourceCommandOutput + | ListWebExperiencesCommandOutput + | PutFeedbackCommandOutput + | PutGroupCommandOutput + | StartDataSourceSyncJobCommandOutput + | StopDataSourceSyncJobCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateApplicationCommandOutput + | UpdateChatControlsConfigurationCommandOutput + | UpdateDataSourceCommandOutput + | UpdateIndexCommandOutput + | UpdatePluginCommandOutput + | UpdateRetrieverCommandOutput + | UpdateUserCommandOutput + | UpdateWebExperienceCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} + +/** + * @public + */ +export type QBusinessClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of QBusinessClient class constructor that set the region, credentials and other options. + */ +export interface QBusinessClientConfig extends QBusinessClientConfigType {} + +/** + * @public + */ +export type QBusinessClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + RegionResolvedConfig & + EndpointResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of QBusinessClient class. This is resolved and normalized from the {@link QBusinessClientConfig | constructor configuration interface}. + */ +export interface QBusinessClientResolvedConfig extends QBusinessClientResolvedConfigType {} + +/** + * @public + *

+ *

+ */ +export class QBusinessClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + QBusinessClientResolvedConfig +> { + /** + * The resolved configuration of QBusinessClient class. This is resolved and normalized from the {@link QBusinessClientConfig | constructor configuration interface}. + */ + readonly config: QBusinessClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfig) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveRegionConfig(_config_1); + const _config_3 = resolveEndpointConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveAwsAuthConfig(_config_5); + const _config_7 = resolveUserAgentConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-qbusiness/src/commands/BatchDeleteDocumentCommand.ts b/clients/client-qbusiness/src/commands/BatchDeleteDocumentCommand.ts new file mode 100644 index 000000000000..7b071fe34400 --- /dev/null +++ b/clients/client-qbusiness/src/commands/BatchDeleteDocumentCommand.ts @@ -0,0 +1,181 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BatchDeleteDocumentRequest, BatchDeleteDocumentResponse } from "../models/models_0"; +import { de_BatchDeleteDocumentCommand, se_BatchDeleteDocumentCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link BatchDeleteDocumentCommand}. + */ +export interface BatchDeleteDocumentCommandInput extends BatchDeleteDocumentRequest {} +/** + * @public + * + * The output of {@link BatchDeleteDocumentCommand}. + */ +export interface BatchDeleteDocumentCommandOutput extends BatchDeleteDocumentResponse, __MetadataBearer {} + +/** + * @public + *

Asynchronously deletes one or more documents added using the + * BatchPutDocument API from an Amazon Q index.

+ *

You can see the progress of the deletion, and any error messages related to the + * process, by using CloudWatch.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, BatchDeleteDocumentCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, BatchDeleteDocumentCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // BatchDeleteDocumentRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * documents: [ // DeleteDocuments // required + * { // DeleteDocument + * documentId: "STRING_VALUE", // required + * }, + * ], + * dataSourceSyncId: "STRING_VALUE", + * }; + * const command = new BatchDeleteDocumentCommand(input); + * const response = await client.send(command); + * // { // BatchDeleteDocumentResponse + * // failedDocuments: [ // FailedDocuments + * // { // FailedDocument + * // id: "STRING_VALUE", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // dataSourceId: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param BatchDeleteDocumentCommandInput - {@link BatchDeleteDocumentCommandInput} + * @returns {@link BatchDeleteDocumentCommandOutput} + * @see {@link BatchDeleteDocumentCommandInput} for command's `input` shape. + * @see {@link BatchDeleteDocumentCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class BatchDeleteDocumentCommand extends $Command< + BatchDeleteDocumentCommandInput, + BatchDeleteDocumentCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: BatchDeleteDocumentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, BatchDeleteDocumentCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "BatchDeleteDocumentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "BatchDeleteDocument", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: BatchDeleteDocumentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_BatchDeleteDocumentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_BatchDeleteDocumentCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/BatchPutDocumentCommand.ts b/clients/client-qbusiness/src/commands/BatchPutDocumentCommand.ts new file mode 100644 index 000000000000..26ae8ca219fc --- /dev/null +++ b/clients/client-qbusiness/src/commands/BatchPutDocumentCommand.ts @@ -0,0 +1,293 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { BatchPutDocumentRequest, BatchPutDocumentResponse } from "../models/models_0"; +import { de_BatchPutDocumentCommand, se_BatchPutDocumentCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link BatchPutDocumentCommand}. + */ +export interface BatchPutDocumentCommandInput extends BatchPutDocumentRequest {} +/** + * @public + * + * The output of {@link BatchPutDocumentCommand}. + */ +export interface BatchPutDocumentCommandOutput extends BatchPutDocumentResponse, __MetadataBearer {} + +/** + * @public + *

Adds one or more documents to an Amazon Q index.

+ *

You use this API to:

+ *
    + *
  • + *

    ingest your structured and unstructured documents and documents stored in an + * Amazon S3 bucket into an Amazon Q index.

    + *
  • + *
  • + *

    add custom attributes to documents in an Amazon Q index.

    + *
  • + *
  • + *

    attach an access control list to the documents added to an Amazon Q + * index.

    + *
  • + *
+ *

You can see the progress of the deletion, and any error messages related to the + * process, by using CloudWatch.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, BatchPutDocumentCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, BatchPutDocumentCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // BatchPutDocumentRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * documents: [ // Documents // required + * { // Document + * id: "STRING_VALUE", // required + * attributes: [ // DocumentAttributes + * { // DocumentAttribute + * name: "STRING_VALUE", // required + * value: { // DocumentAttributeValue Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ // DocumentAttributeStringListValue + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * ], + * content: { // DocumentContent Union: only one key present + * blob: "BLOB_VALUE", + * s3: { // S3 + * bucket: "STRING_VALUE", // required + * key: "STRING_VALUE", // required + * }, + * }, + * contentType: "PDF" || "HTML" || "MS_WORD" || "PLAIN_TEXT" || "PPT" || "RTF" || "XML" || "XSLT" || "MS_EXCEL" || "CSV" || "JSON" || "MD", + * title: "STRING_VALUE", + * accessConfiguration: { // AccessConfiguration + * accessControls: [ // AccessControls // required + * { // AccessControl + * principals: [ // Principals // required + * { // Principal Union: only one key present + * user: { // PrincipalUser + * id: "STRING_VALUE", + * access: "ALLOW" || "DENY", // required + * membershipType: "INDEX" || "DATASOURCE", + * }, + * group: { // PrincipalGroup + * name: "STRING_VALUE", + * access: "ALLOW" || "DENY", // required + * membershipType: "INDEX" || "DATASOURCE", + * }, + * }, + * ], + * memberRelation: "AND" || "OR", + * }, + * ], + * memberRelation: "AND" || "OR", + * }, + * documentEnrichmentConfiguration: { // DocumentEnrichmentConfiguration + * inlineConfigurations: [ // InlineDocumentEnrichmentConfigurations + * { // InlineDocumentEnrichmentConfiguration + * condition: { // DocumentAttributeCondition + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * target: { // DocumentAttributeTarget + * key: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * attributeValueOperator: "DELETE", + * }, + * documentContentOperator: "DELETE", + * }, + * ], + * preExtractionHookConfiguration: { // HookConfiguration + * invocationCondition: { + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: "", + * }, + * lambdaArn: "STRING_VALUE", + * s3BucketName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }, + * postExtractionHookConfiguration: { + * invocationCondition: { + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: "", + * }, + * lambdaArn: "STRING_VALUE", + * s3BucketName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }, + * }, + * }, + * ], + * roleArn: "STRING_VALUE", + * dataSourceSyncId: "STRING_VALUE", + * }; + * const command = new BatchPutDocumentCommand(input); + * const response = await client.send(command); + * // { // BatchPutDocumentResponse + * // failedDocuments: [ // FailedDocuments + * // { // FailedDocument + * // id: "STRING_VALUE", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // dataSourceId: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param BatchPutDocumentCommandInput - {@link BatchPutDocumentCommandInput} + * @returns {@link BatchPutDocumentCommandOutput} + * @see {@link BatchPutDocumentCommandInput} for command's `input` shape. + * @see {@link BatchPutDocumentCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class BatchPutDocumentCommand extends $Command< + BatchPutDocumentCommandInput, + BatchPutDocumentCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: BatchPutDocumentCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, BatchPutDocumentCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "BatchPutDocumentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "BatchPutDocument", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: BatchPutDocumentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_BatchPutDocumentCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_BatchPutDocumentCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ChatSyncCommand.ts b/clients/client-qbusiness/src/commands/ChatSyncCommand.ts new file mode 100644 index 000000000000..049a7529c512 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ChatSyncCommand.ts @@ -0,0 +1,316 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ChatSyncInput, ChatSyncOutput } from "../models/models_0"; +import { de_ChatSyncCommand, se_ChatSyncCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ChatSyncCommand}. + */ +export interface ChatSyncCommandInput extends ChatSyncInput {} +/** + * @public + * + * The output of {@link ChatSyncCommand}. + */ +export interface ChatSyncCommandOutput extends ChatSyncOutput, __MetadataBearer {} + +/** + * @public + *

Starts or continues a non-streaming Amazon Q conversation.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ChatSyncCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ChatSyncCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ChatSyncInput + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * userGroups: [ // UserGroups + * "STRING_VALUE", + * ], + * userMessage: "STRING_VALUE", + * attachments: [ // AttachmentsInput + * { // AttachmentInput + * name: "STRING_VALUE", // required + * data: "BLOB_VALUE", // required + * }, + * ], + * actionExecution: { // ActionExecution + * pluginId: "STRING_VALUE", // required + * payload: { // ActionExecutionPayload // required + * "": { // ActionExecutionPayloadField + * value: "DOCUMENT_VALUE", // required + * }, + * }, + * payloadFieldNameSeparator: "STRING_VALUE", // required + * }, + * conversationId: "STRING_VALUE", + * parentMessageId: "STRING_VALUE", + * attributeFilter: { // AttributeFilter + * andAllFilters: [ // AttributeFilters + * { + * andAllFilters: [ + * "", + * ], + * orAllFilters: [ + * "", + * ], + * notFilter: "", + * equalsTo: { // DocumentAttribute + * name: "STRING_VALUE", // required + * value: { // DocumentAttributeValue Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ // DocumentAttributeStringListValue + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * containsAll: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * containsAny: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * greaterThan: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * greaterThanOrEquals: { + * name: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * lessThan: "", + * lessThanOrEquals: "", + * }, + * ], + * orAllFilters: [ + * "", + * ], + * notFilter: "", + * equalsTo: "", + * containsAll: "", + * containsAny: "", + * greaterThan: "", + * greaterThanOrEquals: "", + * lessThan: "", + * lessThanOrEquals: "", + * }, + * clientToken: "STRING_VALUE", + * }; + * const command = new ChatSyncCommand(input); + * const response = await client.send(command); + * // { // ChatSyncOutput + * // conversationId: "STRING_VALUE", + * // systemMessage: "STRING_VALUE", + * // systemMessageId: "STRING_VALUE", + * // userMessageId: "STRING_VALUE", + * // actionReview: { // ActionReview + * // pluginId: "STRING_VALUE", + * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // payload: { // ActionReviewPayload + * // "": { // ActionReviewPayloadField + * // displayName: "STRING_VALUE", + * // displayOrder: Number("int"), + * // type: "STRING" || "NUMBER" || "ARRAY" || "BOOLEAN", + * // value: "DOCUMENT_VALUE", + * // allowedValues: [ // ActionReviewPayloadFieldAllowedValues + * // { // ActionReviewPayloadFieldAllowedValue + * // value: "DOCUMENT_VALUE", + * // displayValue: "DOCUMENT_VALUE", + * // }, + * // ], + * // required: true || false, + * // }, + * // }, + * // payloadFieldNameSeparator: "STRING_VALUE", + * // }, + * // sourceAttributions: [ // SourceAttributions + * // { // SourceAttribution + * // title: "STRING_VALUE", + * // snippet: "STRING_VALUE", + * // url: "STRING_VALUE", + * // citationNumber: Number("int"), + * // updatedAt: new Date("TIMESTAMP"), + * // textMessageSegments: [ // TextSegmentList + * // { // TextSegment + * // beginOffset: Number("int"), + * // endOffset: Number("int"), + * // }, + * // ], + * // }, + * // ], + * // failedAttachments: [ // AttachmentsOutput + * // { // AttachmentOutput + * // name: "STRING_VALUE", + * // status: "FAILED" || "SUCCEEDED", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // }, + * // ], + * // }; + * + * ``` + * + * @param ChatSyncCommandInput - {@link ChatSyncCommandInput} + * @returns {@link ChatSyncCommandOutput} + * @see {@link ChatSyncCommandInput} for command's `input` shape. + * @see {@link ChatSyncCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link LicenseNotFoundException} (client fault) + *

You don't have permissions to perform the action because your license is inactive. Ask + * your admin to activate your license and try again after your licence is active.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ChatSyncCommand extends $Command< + ChatSyncCommandInput, + ChatSyncCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ChatSyncCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ChatSyncCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ChatSyncCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ChatSync", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ChatSyncCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ChatSyncCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ChatSyncCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts b/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts new file mode 100644 index 000000000000..4dea63662e92 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreateApplicationCommand.ts @@ -0,0 +1,185 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + CreateApplicationRequest, + CreateApplicationRequestFilterSensitiveLog, + CreateApplicationResponse, +} from "../models/models_0"; +import { de_CreateApplicationCommand, se_CreateApplicationCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateApplicationCommand}. + */ +export interface CreateApplicationCommandInput extends CreateApplicationRequest {} +/** + * @public + * + * The output of {@link CreateApplicationCommand}. + */ +export interface CreateApplicationCommandOutput extends CreateApplicationResponse, __MetadataBearer {} + +/** + * @public + *

Creates an Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreateApplicationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreateApplicationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreateApplicationRequest + * displayName: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * description: "STRING_VALUE", + * encryptionConfiguration: { // EncryptionConfiguration + * kmsKeyId: "STRING_VALUE", + * }, + * tags: [ // Tags + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * clientToken: "STRING_VALUE", + * attachmentsConfiguration: { // AttachmentsConfiguration + * attachmentsControlMode: "ENABLED" || "DISABLED", // required + * }, + * }; + * const command = new CreateApplicationCommand(input); + * const response = await client.send(command); + * // { // CreateApplicationResponse + * // applicationId: "STRING_VALUE", + * // applicationArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateApplicationCommandInput - {@link CreateApplicationCommandInput} + * @returns {@link CreateApplicationCommandOutput} + * @see {@link CreateApplicationCommandInput} for command's `input` shape. + * @see {@link CreateApplicationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreateApplicationCommand extends $Command< + CreateApplicationCommandInput, + CreateApplicationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateApplicationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateApplicationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreateApplicationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateApplicationRequestFilterSensitiveLog, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreateApplication", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateApplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateApplicationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateApplicationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreateDataSourceCommand.ts b/clients/client-qbusiness/src/commands/CreateDataSourceCommand.ts new file mode 100644 index 000000000000..6a8f62af99d7 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreateDataSourceCommand.ts @@ -0,0 +1,255 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateDataSourceRequest, CreateDataSourceResponse } from "../models/models_0"; +import { de_CreateDataSourceCommand, se_CreateDataSourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateDataSourceCommand}. + */ +export interface CreateDataSourceCommandInput extends CreateDataSourceRequest {} +/** + * @public + * + * The output of {@link CreateDataSourceCommand}. + */ +export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse, __MetadataBearer {} + +/** + * @public + *

Creates a data source connector for an Amazon Q application.

+ *

+ * CreateDataSource is a synchronous operation. The operation returns 200 if + * the data source was successfully created. Otherwise, an exception is raised.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreateDataSourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreateDataSourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreateDataSourceRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", // required + * configuration: "DOCUMENT_VALUE", // required + * vpcConfiguration: { // DataSourceVpcConfiguration + * subnetIds: [ // SubnetIds // required + * "STRING_VALUE", + * ], + * securityGroupIds: [ // SecurityGroupIds // required + * "STRING_VALUE", + * ], + * }, + * description: "STRING_VALUE", + * tags: [ // Tags + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * syncSchedule: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * clientToken: "STRING_VALUE", + * documentEnrichmentConfiguration: { // DocumentEnrichmentConfiguration + * inlineConfigurations: [ // InlineDocumentEnrichmentConfigurations + * { // InlineDocumentEnrichmentConfiguration + * condition: { // DocumentAttributeCondition + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: { // DocumentAttributeValue Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ // DocumentAttributeStringListValue + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * target: { // DocumentAttributeTarget + * key: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * attributeValueOperator: "DELETE", + * }, + * documentContentOperator: "DELETE", + * }, + * ], + * preExtractionHookConfiguration: { // HookConfiguration + * invocationCondition: { + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * lambdaArn: "STRING_VALUE", + * s3BucketName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }, + * postExtractionHookConfiguration: { + * invocationCondition: { + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * lambdaArn: "STRING_VALUE", + * s3BucketName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }, + * }, + * }; + * const command = new CreateDataSourceCommand(input); + * const response = await client.send(command); + * // { // CreateDataSourceResponse + * // dataSourceId: "STRING_VALUE", + * // dataSourceArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateDataSourceCommandInput - {@link CreateDataSourceCommandInput} + * @returns {@link CreateDataSourceCommandOutput} + * @see {@link CreateDataSourceCommandInput} for command's `input` shape. + * @see {@link CreateDataSourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreateDataSourceCommand extends $Command< + CreateDataSourceCommandInput, + CreateDataSourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateDataSourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateDataSourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreateDataSourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreateDataSource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateDataSourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateDataSourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateDataSourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreateIndexCommand.ts b/clients/client-qbusiness/src/commands/CreateIndexCommand.ts new file mode 100644 index 000000000000..fc9887c846a4 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreateIndexCommand.ts @@ -0,0 +1,184 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateIndexRequest, CreateIndexResponse } from "../models/models_0"; +import { de_CreateIndexCommand, se_CreateIndexCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateIndexCommand}. + */ +export interface CreateIndexCommandInput extends CreateIndexRequest {} +/** + * @public + * + * The output of {@link CreateIndexCommand}. + */ +export interface CreateIndexCommandOutput extends CreateIndexResponse, __MetadataBearer {} + +/** + * @public + *

Creates an Amazon Q index.

+ *

To determine if index creation has completed, check the Status field + * returned from a call to DescribeIndex. The Status field is set + * to ACTIVE when the index is ready to use.

+ *

Once the index is active, you can index your documents using the + * BatchPutDocument + * API or the + * CreateDataSource + * API.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreateIndexCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreateIndexCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreateIndexRequest + * applicationId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", // required + * description: "STRING_VALUE", + * tags: [ // Tags + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * capacityConfiguration: { // IndexCapacityConfiguration + * units: Number("int"), + * }, + * clientToken: "STRING_VALUE", + * }; + * const command = new CreateIndexCommand(input); + * const response = await client.send(command); + * // { // CreateIndexResponse + * // indexId: "STRING_VALUE", + * // indexArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateIndexCommandInput - {@link CreateIndexCommandInput} + * @returns {@link CreateIndexCommandOutput} + * @see {@link CreateIndexCommandInput} for command's `input` shape. + * @see {@link CreateIndexCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreateIndexCommand extends $Command< + CreateIndexCommandInput, + CreateIndexCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateIndexCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateIndexCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreateIndexCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreateIndex", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateIndexCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateIndexCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateIndexCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreatePluginCommand.ts b/clients/client-qbusiness/src/commands/CreatePluginCommand.ts new file mode 100644 index 000000000000..e0414ec64478 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreatePluginCommand.ts @@ -0,0 +1,184 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreatePluginRequest, CreatePluginResponse } from "../models/models_0"; +import { de_CreatePluginCommand, se_CreatePluginCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreatePluginCommand}. + */ +export interface CreatePluginCommandInput extends CreatePluginRequest {} +/** + * @public + * + * The output of {@link CreatePluginCommand}. + */ +export interface CreatePluginCommandOutput extends CreatePluginResponse, __MetadataBearer {} + +/** + * @public + *

Creates an Amazon Q plugin.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreatePluginCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreatePluginCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreatePluginRequest + * applicationId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", // required + * type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", // required + * serverUrl: "STRING_VALUE", // required + * authConfiguration: { // PluginAuthConfiguration Union: only one key present + * basicAuthConfiguration: { // BasicAuthConfiguration + * secretArn: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * }, + * oAuth2ClientCredentialConfiguration: { // OAuth2ClientCredentialConfiguration + * secretArn: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * }, + * }, + * tags: [ // Tags + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * clientToken: "STRING_VALUE", + * }; + * const command = new CreatePluginCommand(input); + * const response = await client.send(command); + * // { // CreatePluginResponse + * // pluginId: "STRING_VALUE", + * // pluginArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreatePluginCommandInput - {@link CreatePluginCommandInput} + * @returns {@link CreatePluginCommandOutput} + * @see {@link CreatePluginCommandInput} for command's `input` shape. + * @see {@link CreatePluginCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreatePluginCommand extends $Command< + CreatePluginCommandInput, + CreatePluginCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreatePluginCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreatePluginCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreatePluginCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreatePlugin", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreatePluginCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreatePluginCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreatePluginCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreateRetrieverCommand.ts b/clients/client-qbusiness/src/commands/CreateRetrieverCommand.ts new file mode 100644 index 000000000000..541947406021 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreateRetrieverCommand.ts @@ -0,0 +1,184 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateRetrieverRequest, CreateRetrieverResponse } from "../models/models_0"; +import { de_CreateRetrieverCommand, se_CreateRetrieverCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateRetrieverCommand}. + */ +export interface CreateRetrieverCommandInput extends CreateRetrieverRequest {} +/** + * @public + * + * The output of {@link CreateRetrieverCommand}. + */ +export interface CreateRetrieverCommandOutput extends CreateRetrieverResponse, __MetadataBearer {} + +/** + * @public + *

Adds a retriever to your Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreateRetrieverCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreateRetrieverCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreateRetrieverRequest + * applicationId: "STRING_VALUE", // required + * type: "NATIVE_INDEX" || "KENDRA_INDEX", // required + * displayName: "STRING_VALUE", // required + * configuration: { // RetrieverConfiguration Union: only one key present + * nativeIndexConfiguration: { // NativeIndexConfiguration + * indexId: "STRING_VALUE", // required + * }, + * kendraIndexConfiguration: { // KendraIndexConfiguration + * indexId: "STRING_VALUE", // required + * }, + * }, + * roleArn: "STRING_VALUE", + * clientToken: "STRING_VALUE", + * tags: [ // Tags + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new CreateRetrieverCommand(input); + * const response = await client.send(command); + * // { // CreateRetrieverResponse + * // retrieverId: "STRING_VALUE", + * // retrieverArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateRetrieverCommandInput - {@link CreateRetrieverCommandInput} + * @returns {@link CreateRetrieverCommandOutput} + * @see {@link CreateRetrieverCommandInput} for command's `input` shape. + * @see {@link CreateRetrieverCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreateRetrieverCommand extends $Command< + CreateRetrieverCommandInput, + CreateRetrieverCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateRetrieverCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateRetrieverCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreateRetrieverCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreateRetriever", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateRetrieverCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateRetrieverCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateRetrieverCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreateUserCommand.ts b/clients/client-qbusiness/src/commands/CreateUserCommand.ts new file mode 100644 index 000000000000..0042d5420ca4 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreateUserCommand.ts @@ -0,0 +1,171 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateUserRequest, CreateUserResponse } from "../models/models_0"; +import { de_CreateUserCommand, se_CreateUserCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateUserCommand}. + */ +export interface CreateUserCommandInput extends CreateUserRequest {} +/** + * @public + * + * The output of {@link CreateUserCommand}. + */ +export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataBearer {} + +/** + * @public + *

Creates a universally unique identifier (UUID) mapped to a list of local user ids + * within an application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreateUserCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreateUserCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreateUserRequest + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * userAliases: [ // UserAliases + * { // UserAlias + * indexId: "STRING_VALUE", + * dataSourceId: "STRING_VALUE", + * userId: "STRING_VALUE", // required + * }, + * ], + * clientToken: "STRING_VALUE", + * }; + * const command = new CreateUserCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param CreateUserCommandInput - {@link CreateUserCommandInput} + * @returns {@link CreateUserCommandOutput} + * @see {@link CreateUserCommandInput} for command's `input` shape. + * @see {@link CreateUserCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreateUserCommand extends $Command< + CreateUserCommandInput, + CreateUserCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateUserCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateUserCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreateUserCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreateUser", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateUserCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateUserCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateUserCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts new file mode 100644 index 000000000000..7ac246d5a3c5 --- /dev/null +++ b/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts @@ -0,0 +1,177 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CreateWebExperienceRequest, CreateWebExperienceResponse } from "../models/models_0"; +import { de_CreateWebExperienceCommand, se_CreateWebExperienceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateWebExperienceCommand}. + */ +export interface CreateWebExperienceCommandInput extends CreateWebExperienceRequest {} +/** + * @public + * + * The output of {@link CreateWebExperienceCommand}. + */ +export interface CreateWebExperienceCommandOutput extends CreateWebExperienceResponse, __MetadataBearer {} + +/** + * @public + *

Creates an Amazon Q web experience.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, CreateWebExperienceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, CreateWebExperienceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // CreateWebExperienceRequest + * applicationId: "STRING_VALUE", // required + * title: "STRING_VALUE", + * subtitle: "STRING_VALUE", + * welcomeMessage: "STRING_VALUE", + * samplePromptsControlMode: "ENABLED" || "DISABLED", + * tags: [ // Tags + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * clientToken: "STRING_VALUE", + * }; + * const command = new CreateWebExperienceCommand(input); + * const response = await client.send(command); + * // { // CreateWebExperienceResponse + * // webExperienceId: "STRING_VALUE", + * // webExperienceArn: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreateWebExperienceCommandInput - {@link CreateWebExperienceCommandInput} + * @returns {@link CreateWebExperienceCommandOutput} + * @see {@link CreateWebExperienceCommandInput} for command's `input` shape. + * @see {@link CreateWebExperienceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class CreateWebExperienceCommand extends $Command< + CreateWebExperienceCommandInput, + CreateWebExperienceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateWebExperienceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateWebExperienceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "CreateWebExperienceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "CreateWebExperience", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateWebExperienceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateWebExperienceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateWebExperienceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteApplicationCommand.ts b/clients/client-qbusiness/src/commands/DeleteApplicationCommand.ts new file mode 100644 index 000000000000..5d79a785a940 --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteApplicationCommand.ts @@ -0,0 +1,160 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteApplicationRequest, DeleteApplicationResponse } from "../models/models_0"; +import { de_DeleteApplicationCommand, se_DeleteApplicationCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteApplicationCommand}. + */ +export interface DeleteApplicationCommandInput extends DeleteApplicationRequest {} +/** + * @public + * + * The output of {@link DeleteApplicationCommand}. + */ +export interface DeleteApplicationCommandOutput extends DeleteApplicationResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteApplicationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteApplicationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteApplicationRequest + * applicationId: "STRING_VALUE", // required + * }; + * const command = new DeleteApplicationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteApplicationCommandInput - {@link DeleteApplicationCommandInput} + * @returns {@link DeleteApplicationCommandOutput} + * @see {@link DeleteApplicationCommandInput} for command's `input` shape. + * @see {@link DeleteApplicationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteApplicationCommand extends $Command< + DeleteApplicationCommandInput, + DeleteApplicationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteApplicationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteApplicationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteApplicationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteApplication", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteApplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteApplicationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteApplicationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteChatControlsConfigurationCommand.ts b/clients/client-qbusiness/src/commands/DeleteChatControlsConfigurationCommand.ts new file mode 100644 index 000000000000..bcb7ccfef7ff --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteChatControlsConfigurationCommand.ts @@ -0,0 +1,167 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteChatControlsConfigurationRequest, DeleteChatControlsConfigurationResponse } from "../models/models_0"; +import { + de_DeleteChatControlsConfigurationCommand, + se_DeleteChatControlsConfigurationCommand, +} from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteChatControlsConfigurationCommand}. + */ +export interface DeleteChatControlsConfigurationCommandInput extends DeleteChatControlsConfigurationRequest {} +/** + * @public + * + * The output of {@link DeleteChatControlsConfigurationCommand}. + */ +export interface DeleteChatControlsConfigurationCommandOutput + extends DeleteChatControlsConfigurationResponse, + __MetadataBearer {} + +/** + * @public + *

Deletes chat controls configured for an existing Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteChatControlsConfigurationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteChatControlsConfigurationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteChatControlsConfigurationRequest + * applicationId: "STRING_VALUE", // required + * }; + * const command = new DeleteChatControlsConfigurationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteChatControlsConfigurationCommandInput - {@link DeleteChatControlsConfigurationCommandInput} + * @returns {@link DeleteChatControlsConfigurationCommandOutput} + * @see {@link DeleteChatControlsConfigurationCommandInput} for command's `input` shape. + * @see {@link DeleteChatControlsConfigurationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteChatControlsConfigurationCommand extends $Command< + DeleteChatControlsConfigurationCommandInput, + DeleteChatControlsConfigurationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteChatControlsConfigurationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteChatControlsConfigurationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteChatControlsConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteChatControlsConfiguration", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: DeleteChatControlsConfigurationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_DeleteChatControlsConfigurationCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DeleteChatControlsConfigurationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteConversationCommand.ts b/clients/client-qbusiness/src/commands/DeleteConversationCommand.ts new file mode 100644 index 000000000000..4f5fefe64b31 --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteConversationCommand.ts @@ -0,0 +1,162 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteConversationRequest, DeleteConversationResponse } from "../models/models_0"; +import { de_DeleteConversationCommand, se_DeleteConversationCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteConversationCommand}. + */ +export interface DeleteConversationCommandInput extends DeleteConversationRequest {} +/** + * @public + * + * The output of {@link DeleteConversationCommand}. + */ +export interface DeleteConversationCommandOutput extends DeleteConversationResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an Amazon Q web experience conversation.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteConversationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteConversationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteConversationRequest + * conversationId: "STRING_VALUE", // required + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * }; + * const command = new DeleteConversationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteConversationCommandInput - {@link DeleteConversationCommandInput} + * @returns {@link DeleteConversationCommandOutput} + * @see {@link DeleteConversationCommandInput} for command's `input` shape. + * @see {@link DeleteConversationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link LicenseNotFoundException} (client fault) + *

You don't have permissions to perform the action because your license is inactive. Ask + * your admin to activate your license and try again after your licence is active.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteConversationCommand extends $Command< + DeleteConversationCommandInput, + DeleteConversationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteConversationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteConversationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteConversationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteConversation", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteConversationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteConversationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteConversationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteDataSourceCommand.ts b/clients/client-qbusiness/src/commands/DeleteDataSourceCommand.ts new file mode 100644 index 000000000000..1a32d9736e91 --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteDataSourceCommand.ts @@ -0,0 +1,164 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteDataSourceRequest, DeleteDataSourceResponse } from "../models/models_0"; +import { de_DeleteDataSourceCommand, se_DeleteDataSourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteDataSourceCommand}. + */ +export interface DeleteDataSourceCommandInput extends DeleteDataSourceRequest {} +/** + * @public + * + * The output of {@link DeleteDataSourceCommand}. + */ +export interface DeleteDataSourceCommandOutput extends DeleteDataSourceResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an Amazon Q data source connector. While the data source is being + * deleted, the Status field returned by a call to the + * DescribeDataSource API is set to DELETING.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteDataSourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteDataSourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteDataSourceRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * dataSourceId: "STRING_VALUE", // required + * }; + * const command = new DeleteDataSourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteDataSourceCommandInput - {@link DeleteDataSourceCommandInput} + * @returns {@link DeleteDataSourceCommandOutput} + * @see {@link DeleteDataSourceCommandInput} for command's `input` shape. + * @see {@link DeleteDataSourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteDataSourceCommand extends $Command< + DeleteDataSourceCommandInput, + DeleteDataSourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteDataSourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteDataSourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteDataSourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteDataSource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteDataSourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteDataSourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteDataSourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteGroupCommand.ts b/clients/client-qbusiness/src/commands/DeleteGroupCommand.ts new file mode 100644 index 000000000000..fcf3aa9a4ccc --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteGroupCommand.ts @@ -0,0 +1,169 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteGroupRequest, DeleteGroupResponse } from "../models/models_0"; +import { de_DeleteGroupCommand, se_DeleteGroupCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteGroupCommand}. + */ +export interface DeleteGroupCommandInput extends DeleteGroupRequest {} +/** + * @public + * + * The output of {@link DeleteGroupCommand}. + */ +export interface DeleteGroupCommandOutput extends DeleteGroupResponse, __MetadataBearer {} + +/** + * @public + *

Deletes a group so that all users and sub groups that belong to the group can no + * longer access documents only available to that group. For example, after deleting the + * group "Summer Interns", all interns who belonged to that group no longer see intern-only + * documents in their chat results.

+ *

If you want to delete, update, or replace users or sub groups of a group, you need to + * use the PutGroup operation. For example, if a user in the group + * "Engineering" leaves the engineering team and another user takes their place, you + * provide an updated list of users or sub groups that belong to the "Engineering" group + * when calling PutGroup.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteGroupCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteGroupCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteGroupRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * groupName: "STRING_VALUE", // required + * dataSourceId: "STRING_VALUE", + * }; + * const command = new DeleteGroupCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteGroupCommandInput - {@link DeleteGroupCommandInput} + * @returns {@link DeleteGroupCommandOutput} + * @see {@link DeleteGroupCommandInput} for command's `input` shape. + * @see {@link DeleteGroupCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteGroupCommand extends $Command< + DeleteGroupCommandInput, + DeleteGroupCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteGroupCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteGroupCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteGroup", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteGroupCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteGroupCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteIndexCommand.ts b/clients/client-qbusiness/src/commands/DeleteIndexCommand.ts new file mode 100644 index 000000000000..dbf7bddd6359 --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteIndexCommand.ts @@ -0,0 +1,159 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteIndexRequest, DeleteIndexResponse } from "../models/models_0"; +import { de_DeleteIndexCommand, se_DeleteIndexCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteIndexCommand}. + */ +export interface DeleteIndexCommandInput extends DeleteIndexRequest {} +/** + * @public + * + * The output of {@link DeleteIndexCommand}. + */ +export interface DeleteIndexCommandOutput extends DeleteIndexResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an Amazon Q index.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteIndexCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteIndexCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteIndexRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * }; + * const command = new DeleteIndexCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteIndexCommandInput - {@link DeleteIndexCommandInput} + * @returns {@link DeleteIndexCommandOutput} + * @see {@link DeleteIndexCommandInput} for command's `input` shape. + * @see {@link DeleteIndexCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteIndexCommand extends $Command< + DeleteIndexCommandInput, + DeleteIndexCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteIndexCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteIndexCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteIndexCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteIndex", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteIndexCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteIndexCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteIndexCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeletePluginCommand.ts b/clients/client-qbusiness/src/commands/DeletePluginCommand.ts new file mode 100644 index 000000000000..41d883a4ff0f --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeletePluginCommand.ts @@ -0,0 +1,159 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeletePluginRequest, DeletePluginResponse } from "../models/models_0"; +import { de_DeletePluginCommand, se_DeletePluginCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeletePluginCommand}. + */ +export interface DeletePluginCommandInput extends DeletePluginRequest {} +/** + * @public + * + * The output of {@link DeletePluginCommand}. + */ +export interface DeletePluginCommandOutput extends DeletePluginResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an Amazon Q plugin.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeletePluginCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeletePluginCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeletePluginRequest + * applicationId: "STRING_VALUE", // required + * pluginId: "STRING_VALUE", // required + * }; + * const command = new DeletePluginCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeletePluginCommandInput - {@link DeletePluginCommandInput} + * @returns {@link DeletePluginCommandOutput} + * @see {@link DeletePluginCommandInput} for command's `input` shape. + * @see {@link DeletePluginCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeletePluginCommand extends $Command< + DeletePluginCommandInput, + DeletePluginCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeletePluginCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeletePluginCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeletePluginCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeletePlugin", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeletePluginCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeletePluginCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeletePluginCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteRetrieverCommand.ts b/clients/client-qbusiness/src/commands/DeleteRetrieverCommand.ts new file mode 100644 index 000000000000..13948b7fa12f --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteRetrieverCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteRetrieverRequest, DeleteRetrieverResponse } from "../models/models_0"; +import { de_DeleteRetrieverCommand, se_DeleteRetrieverCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteRetrieverCommand}. + */ +export interface DeleteRetrieverCommandInput extends DeleteRetrieverRequest {} +/** + * @public + * + * The output of {@link DeleteRetrieverCommand}. + */ +export interface DeleteRetrieverCommandOutput extends DeleteRetrieverResponse, __MetadataBearer {} + +/** + * @public + *

Deletes the retriever used by an Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteRetrieverCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteRetrieverCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteRetrieverRequest + * applicationId: "STRING_VALUE", // required + * retrieverId: "STRING_VALUE", // required + * }; + * const command = new DeleteRetrieverCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteRetrieverCommandInput - {@link DeleteRetrieverCommandInput} + * @returns {@link DeleteRetrieverCommandOutput} + * @see {@link DeleteRetrieverCommandInput} for command's `input` shape. + * @see {@link DeleteRetrieverCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteRetrieverCommand extends $Command< + DeleteRetrieverCommandInput, + DeleteRetrieverCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteRetrieverCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteRetrieverCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteRetrieverCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteRetriever", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteRetrieverCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteRetrieverCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteRetrieverCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteUserCommand.ts b/clients/client-qbusiness/src/commands/DeleteUserCommand.ts new file mode 100644 index 000000000000..938669cf1924 --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteUserCommand.ts @@ -0,0 +1,159 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteUserRequest, DeleteUserResponse } from "../models/models_0"; +import { de_DeleteUserCommand, se_DeleteUserCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteUserCommand}. + */ +export interface DeleteUserCommandInput extends DeleteUserRequest {} +/** + * @public + * + * The output of {@link DeleteUserCommand}. + */ +export interface DeleteUserCommandOutput extends DeleteUserResponse, __MetadataBearer {} + +/** + * @public + *

Deletes a user by email id.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteUserCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteUserCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteUserRequest + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * }; + * const command = new DeleteUserCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteUserCommandInput - {@link DeleteUserCommandInput} + * @returns {@link DeleteUserCommandOutput} + * @see {@link DeleteUserCommandInput} for command's `input` shape. + * @see {@link DeleteUserCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteUserCommand extends $Command< + DeleteUserCommandInput, + DeleteUserCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteUserCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteUserCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteUserCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteUser", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteUserCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteUserCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteUserCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/DeleteWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/DeleteWebExperienceCommand.ts new file mode 100644 index 000000000000..1b27a94c06ba --- /dev/null +++ b/clients/client-qbusiness/src/commands/DeleteWebExperienceCommand.ts @@ -0,0 +1,161 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { DeleteWebExperienceRequest, DeleteWebExperienceResponse } from "../models/models_0"; +import { de_DeleteWebExperienceCommand, se_DeleteWebExperienceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteWebExperienceCommand}. + */ +export interface DeleteWebExperienceCommandInput extends DeleteWebExperienceRequest {} +/** + * @public + * + * The output of {@link DeleteWebExperienceCommand}. + */ +export interface DeleteWebExperienceCommandOutput extends DeleteWebExperienceResponse, __MetadataBearer {} + +/** + * @public + *

Deletes an Amazon Q web experience.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, DeleteWebExperienceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, DeleteWebExperienceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // DeleteWebExperienceRequest + * applicationId: "STRING_VALUE", // required + * webExperienceId: "STRING_VALUE", // required + * }; + * const command = new DeleteWebExperienceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteWebExperienceCommandInput - {@link DeleteWebExperienceCommandInput} + * @returns {@link DeleteWebExperienceCommandOutput} + * @see {@link DeleteWebExperienceCommandInput} for command's `input` shape. + * @see {@link DeleteWebExperienceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class DeleteWebExperienceCommand extends $Command< + DeleteWebExperienceCommandInput, + DeleteWebExperienceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteWebExperienceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteWebExperienceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "DeleteWebExperienceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "DeleteWebExperience", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteWebExperienceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteWebExperienceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteWebExperienceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetApplicationCommand.ts b/clients/client-qbusiness/src/commands/GetApplicationCommand.ts new file mode 100644 index 000000000000..582fbaab5de6 --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetApplicationCommand.ts @@ -0,0 +1,179 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { + GetApplicationRequest, + GetApplicationResponse, + GetApplicationResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_GetApplicationCommand, se_GetApplicationCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetApplicationCommand}. + */ +export interface GetApplicationCommandInput extends GetApplicationRequest {} +/** + * @public + * + * The output of {@link GetApplicationCommand}. + */ +export interface GetApplicationCommandOutput extends GetApplicationResponse, __MetadataBearer {} + +/** + * @public + *

Gets information about an existing Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetApplicationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetApplicationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetApplicationRequest + * applicationId: "STRING_VALUE", // required + * }; + * const command = new GetApplicationCommand(input); + * const response = await client.send(command); + * // { // GetApplicationResponse + * // displayName: "STRING_VALUE", + * // applicationId: "STRING_VALUE", + * // applicationArn: "STRING_VALUE", + * // roleArn: "STRING_VALUE", + * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", + * // description: "STRING_VALUE", + * // encryptionConfiguration: { // EncryptionConfiguration + * // kmsKeyId: "STRING_VALUE", + * // }, + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // attachmentsConfiguration: { // AppliedAttachmentsConfiguration + * // attachmentsControlMode: "ENABLED" || "DISABLED", + * // }, + * // }; + * + * ``` + * + * @param GetApplicationCommandInput - {@link GetApplicationCommandInput} + * @returns {@link GetApplicationCommandOutput} + * @see {@link GetApplicationCommandInput} for command's `input` shape. + * @see {@link GetApplicationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetApplicationCommand extends $Command< + GetApplicationCommandInput, + GetApplicationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetApplicationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetApplicationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetApplicationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: GetApplicationResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetApplication", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetApplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetApplicationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetApplicationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetChatControlsConfigurationCommand.ts b/clients/client-qbusiness/src/commands/GetChatControlsConfigurationCommand.ts new file mode 100644 index 000000000000..459ef072191d --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetChatControlsConfigurationCommand.ts @@ -0,0 +1,219 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetChatControlsConfigurationRequest, GetChatControlsConfigurationResponse } from "../models/models_0"; +import { + de_GetChatControlsConfigurationCommand, + se_GetChatControlsConfigurationCommand, +} from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetChatControlsConfigurationCommand}. + */ +export interface GetChatControlsConfigurationCommandInput extends GetChatControlsConfigurationRequest {} +/** + * @public + * + * The output of {@link GetChatControlsConfigurationCommand}. + */ +export interface GetChatControlsConfigurationCommandOutput + extends GetChatControlsConfigurationResponse, + __MetadataBearer {} + +/** + * @public + *

Gets information about an chat controls configured for an existing Amazon Q + * application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetChatControlsConfigurationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetChatControlsConfigurationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetChatControlsConfigurationRequest + * applicationId: "STRING_VALUE", // required + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new GetChatControlsConfigurationCommand(input); + * const response = await client.send(command); + * // { // GetChatControlsConfigurationResponse + * // responseScope: "ENTERPRISE_CONTENT_ONLY" || "EXTENDED_KNOWLEDGE_ENABLED", + * // blockedPhrases: { // BlockedPhrasesConfiguration + * // blockedPhrases: [ // BlockedPhrases + * // "STRING_VALUE", + * // ], + * // systemMessageOverride: "STRING_VALUE", + * // }, + * // topicConfigurations: [ // TopicConfigurations + * // { // TopicConfiguration + * // name: "STRING_VALUE", // required + * // description: "STRING_VALUE", + * // exampleChatMessages: [ // ExampleChatMessages + * // "STRING_VALUE", + * // ], + * // rules: [ // Rules // required + * // { // Rule + * // includedUsersAndGroups: { // UsersAndGroups + * // userIds: [ // UserIds + * // "STRING_VALUE", + * // ], + * // userGroups: [ // UserGroups + * // "STRING_VALUE", + * // ], + * // }, + * // excludedUsersAndGroups: { + * // userIds: [ + * // "STRING_VALUE", + * // ], + * // userGroups: [ + * // "STRING_VALUE", + * // ], + * // }, + * // ruleType: "CONTENT_BLOCKER_RULE" || "CONTENT_RETRIEVAL_RULE", // required + * // ruleConfiguration: { // RuleConfiguration Union: only one key present + * // contentBlockerRule: { // ContentBlockerRule + * // systemMessageOverride: "STRING_VALUE", + * // }, + * // contentRetrievalRule: { // ContentRetrievalRule + * // eligibleDataSources: [ // EligibleDataSources + * // { // EligibleDataSource + * // indexId: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }, + * // }, + * // ], + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetChatControlsConfigurationCommandInput - {@link GetChatControlsConfigurationCommandInput} + * @returns {@link GetChatControlsConfigurationCommandOutput} + * @see {@link GetChatControlsConfigurationCommandInput} for command's `input` shape. + * @see {@link GetChatControlsConfigurationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetChatControlsConfigurationCommand extends $Command< + GetChatControlsConfigurationCommandInput, + GetChatControlsConfigurationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetChatControlsConfigurationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetChatControlsConfigurationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetChatControlsConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetChatControlsConfiguration", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetChatControlsConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetChatControlsConfigurationCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetChatControlsConfigurationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetDataSourceCommand.ts b/clients/client-qbusiness/src/commands/GetDataSourceCommand.ts new file mode 100644 index 000000000000..ce3eb30fed3b --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetDataSourceCommand.ts @@ -0,0 +1,247 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetDataSourceRequest, GetDataSourceResponse } from "../models/models_0"; +import { de_GetDataSourceCommand, se_GetDataSourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetDataSourceCommand}. + */ +export interface GetDataSourceCommandInput extends GetDataSourceRequest {} +/** + * @public + * + * The output of {@link GetDataSourceCommand}. + */ +export interface GetDataSourceCommandOutput extends GetDataSourceResponse, __MetadataBearer {} + +/** + * @public + *

Gets information about an existing Amazon Q data source connector.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetDataSourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetDataSourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetDataSourceRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * dataSourceId: "STRING_VALUE", // required + * }; + * const command = new GetDataSourceCommand(input); + * const response = await client.send(command); + * // { // GetDataSourceResponse + * // applicationId: "STRING_VALUE", + * // indexId: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // dataSourceArn: "STRING_VALUE", + * // displayName: "STRING_VALUE", + * // type: "STRING_VALUE", + * // configuration: "DOCUMENT_VALUE", + * // vpcConfiguration: { // DataSourceVpcConfiguration + * // subnetIds: [ // SubnetIds // required + * // "STRING_VALUE", + * // ], + * // securityGroupIds: [ // SecurityGroupIds // required + * // "STRING_VALUE", + * // ], + * // }, + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // description: "STRING_VALUE", + * // status: "PENDING_CREATION" || "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", + * // syncSchedule: "STRING_VALUE", + * // roleArn: "STRING_VALUE", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // documentEnrichmentConfiguration: { // DocumentEnrichmentConfiguration + * // inlineConfigurations: [ // InlineDocumentEnrichmentConfigurations + * // { // InlineDocumentEnrichmentConfiguration + * // condition: { // DocumentAttributeCondition + * // key: "STRING_VALUE", // required + * // operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * // value: { // DocumentAttributeValue Union: only one key present + * // stringValue: "STRING_VALUE", + * // stringListValue: [ // DocumentAttributeStringListValue + * // "STRING_VALUE", + * // ], + * // longValue: Number("long"), + * // dateValue: new Date("TIMESTAMP"), + * // }, + * // }, + * // target: { // DocumentAttributeTarget + * // key: "STRING_VALUE", // required + * // value: {// Union: only one key present + * // stringValue: "STRING_VALUE", + * // stringListValue: [ + * // "STRING_VALUE", + * // ], + * // longValue: Number("long"), + * // dateValue: new Date("TIMESTAMP"), + * // }, + * // attributeValueOperator: "DELETE", + * // }, + * // documentContentOperator: "DELETE", + * // }, + * // ], + * // preExtractionHookConfiguration: { // HookConfiguration + * // invocationCondition: { + * // key: "STRING_VALUE", // required + * // operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * // value: {// Union: only one key present + * // stringValue: "STRING_VALUE", + * // stringListValue: [ + * // "STRING_VALUE", + * // ], + * // longValue: Number("long"), + * // dateValue: new Date("TIMESTAMP"), + * // }, + * // }, + * // lambdaArn: "STRING_VALUE", + * // s3BucketName: "STRING_VALUE", + * // roleArn: "STRING_VALUE", + * // }, + * // postExtractionHookConfiguration: { + * // invocationCondition: { + * // key: "STRING_VALUE", // required + * // operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * // value: {// Union: only one key present + * // stringValue: "STRING_VALUE", + * // stringListValue: [ + * // "STRING_VALUE", + * // ], + * // longValue: Number("long"), + * // dateValue: new Date("TIMESTAMP"), + * // }, + * // }, + * // lambdaArn: "STRING_VALUE", + * // s3BucketName: "STRING_VALUE", + * // roleArn: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetDataSourceCommandInput - {@link GetDataSourceCommandInput} + * @returns {@link GetDataSourceCommandOutput} + * @see {@link GetDataSourceCommandInput} for command's `input` shape. + * @see {@link GetDataSourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetDataSourceCommand extends $Command< + GetDataSourceCommandInput, + GetDataSourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetDataSourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetDataSourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetDataSourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetDataSource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetDataSourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetDataSourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetDataSourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetGroupCommand.ts b/clients/client-qbusiness/src/commands/GetGroupCommand.ts new file mode 100644 index 000000000000..53ef1ab3398a --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetGroupCommand.ts @@ -0,0 +1,180 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetGroupRequest, GetGroupResponse } from "../models/models_0"; +import { de_GetGroupCommand, se_GetGroupCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetGroupCommand}. + */ +export interface GetGroupCommandInput extends GetGroupRequest {} +/** + * @public + * + * The output of {@link GetGroupCommand}. + */ +export interface GetGroupCommandOutput extends GetGroupResponse, __MetadataBearer {} + +/** + * @public + *

Describes a group by group name.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetGroupCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetGroupCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetGroupRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * groupName: "STRING_VALUE", // required + * dataSourceId: "STRING_VALUE", + * }; + * const command = new GetGroupCommand(input); + * const response = await client.send(command); + * // { // GetGroupResponse + * // status: { // GroupStatusDetail + * // status: "FAILED" || "SUCCEEDED" || "PROCESSING" || "DELETING" || "DELETED", + * // lastUpdatedAt: new Date("TIMESTAMP"), + * // errorDetail: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // }, + * // statusHistory: [ // GroupStatusDetails + * // { + * // status: "FAILED" || "SUCCEEDED" || "PROCESSING" || "DELETING" || "DELETED", + * // lastUpdatedAt: new Date("TIMESTAMP"), + * // errorDetail: { + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetGroupCommandInput - {@link GetGroupCommandInput} + * @returns {@link GetGroupCommandOutput} + * @see {@link GetGroupCommandInput} for command's `input` shape. + * @see {@link GetGroupCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetGroupCommand extends $Command< + GetGroupCommandInput, + GetGroupCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetGroupCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetGroupCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetGroup", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetGroupCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetGroupCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetIndexCommand.ts b/clients/client-qbusiness/src/commands/GetIndexCommand.ts new file mode 100644 index 000000000000..2af16c10a951 --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetIndexCommand.ts @@ -0,0 +1,184 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetIndexRequest, GetIndexResponse } from "../models/models_0"; +import { de_GetIndexCommand, se_GetIndexCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetIndexCommand}. + */ +export interface GetIndexCommandInput extends GetIndexRequest {} +/** + * @public + * + * The output of {@link GetIndexCommand}. + */ +export interface GetIndexCommandOutput extends GetIndexResponse, __MetadataBearer {} + +/** + * @public + *

Gets information about an existing Amazon Q index.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetIndexCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetIndexCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetIndexRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * }; + * const command = new GetIndexCommand(input); + * const response = await client.send(command); + * // { // GetIndexResponse + * // applicationId: "STRING_VALUE", + * // indexId: "STRING_VALUE", + * // displayName: "STRING_VALUE", + * // indexArn: "STRING_VALUE", + * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", + * // description: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // capacityConfiguration: { // IndexCapacityConfiguration + * // units: Number("int"), + * // }, + * // documentAttributeConfigurations: [ // DocumentAttributeConfigurations + * // { // DocumentAttributeConfiguration + * // name: "STRING_VALUE", + * // type: "STRING" || "STRING_LIST" || "NUMBER" || "DATE", + * // search: "ENABLED" || "DISABLED", + * // }, + * // ], + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // indexStatistics: { // IndexStatistics + * // textDocumentStatistics: { // TextDocumentStatistics + * // indexedTextBytes: Number("long"), + * // indexedTextDocumentCount: Number("int"), + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetIndexCommandInput - {@link GetIndexCommandInput} + * @returns {@link GetIndexCommandOutput} + * @see {@link GetIndexCommandInput} for command's `input` shape. + * @see {@link GetIndexCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetIndexCommand extends $Command< + GetIndexCommandInput, + GetIndexCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetIndexCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetIndexCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetIndexCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetIndex", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetIndexCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetIndexCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetIndexCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetPluginCommand.ts b/clients/client-qbusiness/src/commands/GetPluginCommand.ts new file mode 100644 index 000000000000..e07f22e54668 --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetPluginCommand.ts @@ -0,0 +1,175 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetPluginRequest, GetPluginResponse } from "../models/models_0"; +import { de_GetPluginCommand, se_GetPluginCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetPluginCommand}. + */ +export interface GetPluginCommandInput extends GetPluginRequest {} +/** + * @public + * + * The output of {@link GetPluginCommand}. + */ +export interface GetPluginCommandOutput extends GetPluginResponse, __MetadataBearer {} + +/** + * @public + *

Gets information about an existing Amazon Q plugin.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetPluginCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetPluginCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetPluginRequest + * applicationId: "STRING_VALUE", // required + * pluginId: "STRING_VALUE", // required + * }; + * const command = new GetPluginCommand(input); + * const response = await client.send(command); + * // { // GetPluginResponse + * // applicationId: "STRING_VALUE", + * // pluginId: "STRING_VALUE", + * // displayName: "STRING_VALUE", + * // type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // serverUrl: "STRING_VALUE", + * // authConfiguration: { // PluginAuthConfiguration Union: only one key present + * // basicAuthConfiguration: { // BasicAuthConfiguration + * // secretArn: "STRING_VALUE", // required + * // roleArn: "STRING_VALUE", // required + * // }, + * // oAuth2ClientCredentialConfiguration: { // OAuth2ClientCredentialConfiguration + * // secretArn: "STRING_VALUE", // required + * // roleArn: "STRING_VALUE", // required + * // }, + * // }, + * // pluginArn: "STRING_VALUE", + * // state: "ENABLED" || "DISABLED", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param GetPluginCommandInput - {@link GetPluginCommandInput} + * @returns {@link GetPluginCommandOutput} + * @see {@link GetPluginCommandInput} for command's `input` shape. + * @see {@link GetPluginCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetPluginCommand extends $Command< + GetPluginCommandInput, + GetPluginCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetPluginCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetPluginCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetPluginCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetPlugin", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetPluginCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetPluginCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetPluginCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetRetrieverCommand.ts b/clients/client-qbusiness/src/commands/GetRetrieverCommand.ts new file mode 100644 index 000000000000..32cb1a1b9e8e --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetRetrieverCommand.ts @@ -0,0 +1,174 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetRetrieverRequest, GetRetrieverResponse } from "../models/models_0"; +import { de_GetRetrieverCommand, se_GetRetrieverCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetRetrieverCommand}. + */ +export interface GetRetrieverCommandInput extends GetRetrieverRequest {} +/** + * @public + * + * The output of {@link GetRetrieverCommand}. + */ +export interface GetRetrieverCommandOutput extends GetRetrieverResponse, __MetadataBearer {} + +/** + * @public + *

Gets information about an existing retriever used by an Amazon Q + * application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetRetrieverCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetRetrieverCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetRetrieverRequest + * applicationId: "STRING_VALUE", // required + * retrieverId: "STRING_VALUE", // required + * }; + * const command = new GetRetrieverCommand(input); + * const response = await client.send(command); + * // { // GetRetrieverResponse + * // applicationId: "STRING_VALUE", + * // retrieverId: "STRING_VALUE", + * // retrieverArn: "STRING_VALUE", + * // type: "NATIVE_INDEX" || "KENDRA_INDEX", + * // status: "CREATING" || "ACTIVE" || "FAILED", + * // displayName: "STRING_VALUE", + * // configuration: { // RetrieverConfiguration Union: only one key present + * // nativeIndexConfiguration: { // NativeIndexConfiguration + * // indexId: "STRING_VALUE", // required + * // }, + * // kendraIndexConfiguration: { // KendraIndexConfiguration + * // indexId: "STRING_VALUE", // required + * // }, + * // }, + * // roleArn: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param GetRetrieverCommandInput - {@link GetRetrieverCommandInput} + * @returns {@link GetRetrieverCommandOutput} + * @see {@link GetRetrieverCommandInput} for command's `input` shape. + * @see {@link GetRetrieverCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetRetrieverCommand extends $Command< + GetRetrieverCommandInput, + GetRetrieverCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetRetrieverCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetRetrieverCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetRetrieverCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetRetriever", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetRetrieverCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetRetrieverCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetRetrieverCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetUserCommand.ts b/clients/client-qbusiness/src/commands/GetUserCommand.ts new file mode 100644 index 000000000000..15d170f64f89 --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetUserCommand.ts @@ -0,0 +1,164 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetUserRequest, GetUserResponse } from "../models/models_0"; +import { de_GetUserCommand, se_GetUserCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetUserCommand}. + */ +export interface GetUserCommandInput extends GetUserRequest {} +/** + * @public + * + * The output of {@link GetUserCommand}. + */ +export interface GetUserCommandOutput extends GetUserResponse, __MetadataBearer {} + +/** + * @public + *

Describes the universally unique identifier (UUID) associated with a local user in a + * data source.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetUserCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetUserCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetUserRequest + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * }; + * const command = new GetUserCommand(input); + * const response = await client.send(command); + * // { // GetUserResponse + * // userAliases: [ // UserAliases + * // { // UserAlias + * // indexId: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // userId: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetUserCommandInput - {@link GetUserCommandInput} + * @returns {@link GetUserCommandOutput} + * @see {@link GetUserCommandInput} for command's `input` shape. + * @see {@link GetUserCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetUserCommand extends $Command { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetUserCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, GetUserCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetUserCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetUser", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetUserCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetUserCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetUserCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts new file mode 100644 index 000000000000..fa5cce1d6c3c --- /dev/null +++ b/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts @@ -0,0 +1,181 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { GetWebExperienceRequest, GetWebExperienceResponse } from "../models/models_0"; +import { de_GetWebExperienceCommand, se_GetWebExperienceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetWebExperienceCommand}. + */ +export interface GetWebExperienceCommandInput extends GetWebExperienceRequest {} +/** + * @public + * + * The output of {@link GetWebExperienceCommand}. + */ +export interface GetWebExperienceCommandOutput extends GetWebExperienceResponse, __MetadataBearer {} + +/** + * @public + *

Gets information about an existing Amazon Q web experience.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, GetWebExperienceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, GetWebExperienceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // GetWebExperienceRequest + * applicationId: "STRING_VALUE", // required + * webExperienceId: "STRING_VALUE", // required + * }; + * const command = new GetWebExperienceCommand(input); + * const response = await client.send(command); + * // { // GetWebExperienceResponse + * // applicationId: "STRING_VALUE", + * // webExperienceId: "STRING_VALUE", + * // webExperienceArn: "STRING_VALUE", + * // defaultEndpoint: "STRING_VALUE", + * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "PENDING_AUTH_CONFIG", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // title: "STRING_VALUE", + * // subtitle: "STRING_VALUE", + * // welcomeMessage: "STRING_VALUE", + * // samplePromptsControlMode: "ENABLED" || "DISABLED", + * // authenticationConfiguration: { // WebExperienceAuthConfiguration Union: only one key present + * // samlConfiguration: { // SamlConfiguration + * // metadataXML: "STRING_VALUE", // required + * // roleArn: "STRING_VALUE", // required + * // userIdAttribute: "STRING_VALUE", // required + * // userGroupAttribute: "STRING_VALUE", + * // }, + * // }, + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // }; + * + * ``` + * + * @param GetWebExperienceCommandInput - {@link GetWebExperienceCommandInput} + * @returns {@link GetWebExperienceCommandOutput} + * @see {@link GetWebExperienceCommandInput} for command's `input` shape. + * @see {@link GetWebExperienceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class GetWebExperienceCommand extends $Command< + GetWebExperienceCommandInput, + GetWebExperienceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetWebExperienceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetWebExperienceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "GetWebExperienceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "GetWebExperience", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetWebExperienceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetWebExperienceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetWebExperienceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListApplicationsCommand.ts b/clients/client-qbusiness/src/commands/ListApplicationsCommand.ts new file mode 100644 index 000000000000..9fdec016c3c7 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListApplicationsCommand.ts @@ -0,0 +1,164 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListApplicationsRequest, ListApplicationsResponse } from "../models/models_0"; +import { de_ListApplicationsCommand, se_ListApplicationsCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListApplicationsCommand}. + */ +export interface ListApplicationsCommandInput extends ListApplicationsRequest {} +/** + * @public + * + * The output of {@link ListApplicationsCommand}. + */ +export interface ListApplicationsCommandOutput extends ListApplicationsResponse, __MetadataBearer {} + +/** + * @public + *

Lists Amazon Q applications.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListApplicationsCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListApplicationsCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListApplicationsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListApplicationsCommand(input); + * const response = await client.send(command); + * // { // ListApplicationsResponse + * // nextToken: "STRING_VALUE", + * // applications: [ // Applications + * // { // Application + * // displayName: "STRING_VALUE", + * // applicationId: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListApplicationsCommandInput - {@link ListApplicationsCommandInput} + * @returns {@link ListApplicationsCommandOutput} + * @see {@link ListApplicationsCommandInput} for command's `input` shape. + * @see {@link ListApplicationsCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListApplicationsCommand extends $Command< + ListApplicationsCommandInput, + ListApplicationsCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListApplicationsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListApplicationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListApplicationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListApplications", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListApplicationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListApplicationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListApplicationsCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListConversationsCommand.ts b/clients/client-qbusiness/src/commands/ListConversationsCommand.ts new file mode 100644 index 000000000000..7f7392efd91d --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListConversationsCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListConversationsRequest, ListConversationsResponse } from "../models/models_0"; +import { de_ListConversationsCommand, se_ListConversationsCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListConversationsCommand}. + */ +export interface ListConversationsCommandInput extends ListConversationsRequest {} +/** + * @public + * + * The output of {@link ListConversationsCommand}. + */ +export interface ListConversationsCommandOutput extends ListConversationsResponse, __MetadataBearer {} + +/** + * @public + *

Lists one or more Amazon Q conversations.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListConversationsCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListConversationsCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListConversationsRequest + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListConversationsCommand(input); + * const response = await client.send(command); + * // { // ListConversationsResponse + * // nextToken: "STRING_VALUE", + * // conversations: [ // Conversations + * // { // Conversation + * // conversationId: "STRING_VALUE", + * // title: "STRING_VALUE", + * // startTime: new Date("TIMESTAMP"), + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListConversationsCommandInput - {@link ListConversationsCommandInput} + * @returns {@link ListConversationsCommandOutput} + * @see {@link ListConversationsCommandInput} for command's `input` shape. + * @see {@link ListConversationsCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link LicenseNotFoundException} (client fault) + *

You don't have permissions to perform the action because your license is inactive. Ask + * your admin to activate your license and try again after your licence is active.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListConversationsCommand extends $Command< + ListConversationsCommandInput, + ListConversationsCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListConversationsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListConversationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListConversationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListConversations", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListConversationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListConversationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListConversationsCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListDataSourceSyncJobsCommand.ts b/clients/client-qbusiness/src/commands/ListDataSourceSyncJobsCommand.ts new file mode 100644 index 000000000000..7c178dbe9fdb --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListDataSourceSyncJobsCommand.ts @@ -0,0 +1,185 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListDataSourceSyncJobsRequest, ListDataSourceSyncJobsResponse } from "../models/models_0"; +import { de_ListDataSourceSyncJobsCommand, se_ListDataSourceSyncJobsCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListDataSourceSyncJobsCommand}. + */ +export interface ListDataSourceSyncJobsCommandInput extends ListDataSourceSyncJobsRequest {} +/** + * @public + * + * The output of {@link ListDataSourceSyncJobsCommand}. + */ +export interface ListDataSourceSyncJobsCommandOutput extends ListDataSourceSyncJobsResponse, __MetadataBearer {} + +/** + * @public + *

Get information about an Amazon Q data source connector synchronization.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListDataSourceSyncJobsCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListDataSourceSyncJobsCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListDataSourceSyncJobsRequest + * dataSourceId: "STRING_VALUE", // required + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * startTime: new Date("TIMESTAMP"), + * endTime: new Date("TIMESTAMP"), + * statusFilter: "FAILED" || "SUCCEEDED" || "SYNCING" || "INCOMPLETE" || "STOPPING" || "ABORTED" || "SYNCING_INDEXING", + * }; + * const command = new ListDataSourceSyncJobsCommand(input); + * const response = await client.send(command); + * // { // ListDataSourceSyncJobsResponse + * // history: [ // DataSourceSyncJobs + * // { // DataSourceSyncJob + * // executionId: "STRING_VALUE", + * // startTime: new Date("TIMESTAMP"), + * // endTime: new Date("TIMESTAMP"), + * // status: "FAILED" || "SUCCEEDED" || "SYNCING" || "INCOMPLETE" || "STOPPING" || "ABORTED" || "SYNCING_INDEXING", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // dataSourceErrorCode: "STRING_VALUE", + * // metrics: { // DataSourceSyncJobMetrics + * // documentsAdded: "STRING_VALUE", + * // documentsModified: "STRING_VALUE", + * // documentsDeleted: "STRING_VALUE", + * // documentsFailed: "STRING_VALUE", + * // documentsScanned: "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListDataSourceSyncJobsCommandInput - {@link ListDataSourceSyncJobsCommandInput} + * @returns {@link ListDataSourceSyncJobsCommandOutput} + * @see {@link ListDataSourceSyncJobsCommandInput} for command's `input` shape. + * @see {@link ListDataSourceSyncJobsCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListDataSourceSyncJobsCommand extends $Command< + ListDataSourceSyncJobsCommandInput, + ListDataSourceSyncJobsCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListDataSourceSyncJobsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListDataSourceSyncJobsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListDataSourceSyncJobsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListDataSourceSyncJobs", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListDataSourceSyncJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListDataSourceSyncJobsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListDataSourceSyncJobsCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListDataSourcesCommand.ts b/clients/client-qbusiness/src/commands/ListDataSourcesCommand.ts new file mode 100644 index 000000000000..a22ea038561d --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListDataSourcesCommand.ts @@ -0,0 +1,171 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListDataSourcesRequest, ListDataSourcesResponse } from "../models/models_0"; +import { de_ListDataSourcesCommand, se_ListDataSourcesCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListDataSourcesCommand}. + */ +export interface ListDataSourcesCommandInput extends ListDataSourcesRequest {} +/** + * @public + * + * The output of {@link ListDataSourcesCommand}. + */ +export interface ListDataSourcesCommandOutput extends ListDataSourcesResponse, __MetadataBearer {} + +/** + * @public + *

Lists the Amazon Q data source connectors that you have created.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListDataSourcesCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListDataSourcesCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListDataSourcesRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListDataSourcesCommand(input); + * const response = await client.send(command); + * // { // ListDataSourcesResponse + * // dataSources: [ // DataSources + * // { // DataSource + * // displayName: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // type: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // status: "PENDING_CREATION" || "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListDataSourcesCommandInput - {@link ListDataSourcesCommandInput} + * @returns {@link ListDataSourcesCommandOutput} + * @see {@link ListDataSourcesCommandInput} for command's `input` shape. + * @see {@link ListDataSourcesCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListDataSourcesCommand extends $Command< + ListDataSourcesCommandInput, + ListDataSourcesCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListDataSourcesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListDataSourcesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListDataSourcesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListDataSources", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListDataSourcesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListDataSourcesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListDataSourcesCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListDocumentsCommand.ts b/clients/client-qbusiness/src/commands/ListDocumentsCommand.ts new file mode 100644 index 000000000000..894cb8ee7668 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListDocumentsCommand.ts @@ -0,0 +1,174 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListDocumentsRequest, ListDocumentsResponse } from "../models/models_0"; +import { de_ListDocumentsCommand, se_ListDocumentsCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListDocumentsCommand}. + */ +export interface ListDocumentsCommandInput extends ListDocumentsRequest {} +/** + * @public + * + * The output of {@link ListDocumentsCommand}. + */ +export interface ListDocumentsCommandOutput extends ListDocumentsResponse, __MetadataBearer {} + +/** + * @public + *

A list of documents attached to an index.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListDocumentsCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListDocumentsCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListDocumentsRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * dataSourceIds: [ // DataSourceIds + * "STRING_VALUE", + * ], + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListDocumentsCommand(input); + * const response = await client.send(command); + * // { // ListDocumentsResponse + * // documentDetailList: [ // DocumentDetailList + * // { // DocumentDetails + * // documentId: "STRING_VALUE", + * // status: "RECEIVED" || "PROCESSING" || "INDEXED" || "UPDATED" || "FAILED" || "DELETING" || "DELETED" || "DOCUMENT_FAILED_TO_INDEX", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListDocumentsCommandInput - {@link ListDocumentsCommandInput} + * @returns {@link ListDocumentsCommandOutput} + * @see {@link ListDocumentsCommandInput} for command's `input` shape. + * @see {@link ListDocumentsCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListDocumentsCommand extends $Command< + ListDocumentsCommandInput, + ListDocumentsCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListDocumentsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListDocumentsCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListDocumentsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListDocuments", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListDocumentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListDocumentsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListDocumentsCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListGroupsCommand.ts b/clients/client-qbusiness/src/commands/ListGroupsCommand.ts new file mode 100644 index 000000000000..58e7935a0594 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListGroupsCommand.ts @@ -0,0 +1,170 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListGroupsRequest, ListGroupsResponse } from "../models/models_0"; +import { de_ListGroupsCommand, se_ListGroupsCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListGroupsCommand}. + */ +export interface ListGroupsCommandInput extends ListGroupsRequest {} +/** + * @public + * + * The output of {@link ListGroupsCommand}. + */ +export interface ListGroupsCommandOutput extends ListGroupsResponse, __MetadataBearer {} + +/** + * @public + *

Provides a list of groups that are mapped to users.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListGroupsCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListGroupsCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListGroupsRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * updatedEarlierThan: new Date("TIMESTAMP"), // required + * dataSourceId: "STRING_VALUE", + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListGroupsCommand(input); + * const response = await client.send(command); + * // { // ListGroupsResponse + * // nextToken: "STRING_VALUE", + * // items: [ // GroupSummaryList + * // { // GroupSummary + * // groupName: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListGroupsCommandInput - {@link ListGroupsCommandInput} + * @returns {@link ListGroupsCommandOutput} + * @see {@link ListGroupsCommandInput} for command's `input` shape. + * @see {@link ListGroupsCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListGroupsCommand extends $Command< + ListGroupsCommandInput, + ListGroupsCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListGroupsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListGroupsCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListGroupsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListGroups", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListGroupsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListGroupsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListGroupsCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListIndicesCommand.ts b/clients/client-qbusiness/src/commands/ListIndicesCommand.ts new file mode 100644 index 000000000000..3077a56ff376 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListIndicesCommand.ts @@ -0,0 +1,167 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListIndicesRequest, ListIndicesResponse } from "../models/models_0"; +import { de_ListIndicesCommand, se_ListIndicesCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListIndicesCommand}. + */ +export interface ListIndicesCommandInput extends ListIndicesRequest {} +/** + * @public + * + * The output of {@link ListIndicesCommand}. + */ +export interface ListIndicesCommandOutput extends ListIndicesResponse, __MetadataBearer {} + +/** + * @public + *

Lists the Amazon Q indices you have created.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListIndicesCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListIndicesCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListIndicesRequest + * applicationId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListIndicesCommand(input); + * const response = await client.send(command); + * // { // ListIndicesResponse + * // nextToken: "STRING_VALUE", + * // indices: [ // Indices + * // { // Index + * // displayName: "STRING_VALUE", + * // indexId: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListIndicesCommandInput - {@link ListIndicesCommandInput} + * @returns {@link ListIndicesCommandOutput} + * @see {@link ListIndicesCommandInput} for command's `input` shape. + * @see {@link ListIndicesCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListIndicesCommand extends $Command< + ListIndicesCommandInput, + ListIndicesCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListIndicesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListIndicesCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListIndicesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListIndices", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListIndicesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListIndicesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListIndicesCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListMessagesCommand.ts b/clients/client-qbusiness/src/commands/ListMessagesCommand.ts new file mode 100644 index 000000000000..e53a7cda0a53 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListMessagesCommand.ts @@ -0,0 +1,226 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListMessagesRequest, ListMessagesResponse } from "../models/models_0"; +import { de_ListMessagesCommand, se_ListMessagesCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListMessagesCommand}. + */ +export interface ListMessagesCommandInput extends ListMessagesRequest {} +/** + * @public + * + * The output of {@link ListMessagesCommand}. + */ +export interface ListMessagesCommandOutput extends ListMessagesResponse, __MetadataBearer {} + +/** + * @public + *

Gets a list of messages associated with an Amazon Q web experience.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListMessagesCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListMessagesCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListMessagesRequest + * conversationId: "STRING_VALUE", // required + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListMessagesCommand(input); + * const response = await client.send(command); + * // { // ListMessagesResponse + * // messages: [ // Messages + * // { // Message + * // messageId: "STRING_VALUE", + * // body: "STRING_VALUE", + * // time: new Date("TIMESTAMP"), + * // type: "USER" || "SYSTEM", + * // attachments: [ // AttachmentsOutput + * // { // AttachmentOutput + * // name: "STRING_VALUE", + * // status: "FAILED" || "SUCCEEDED", + * // error: { // ErrorDetail + * // errorMessage: "STRING_VALUE", + * // errorCode: "InternalError" || "InvalidRequest" || "ResourceInactive" || "ResourceNotFound", + * // }, + * // }, + * // ], + * // sourceAttribution: [ // SourceAttributions + * // { // SourceAttribution + * // title: "STRING_VALUE", + * // snippet: "STRING_VALUE", + * // url: "STRING_VALUE", + * // citationNumber: Number("int"), + * // updatedAt: new Date("TIMESTAMP"), + * // textMessageSegments: [ // TextSegmentList + * // { // TextSegment + * // beginOffset: Number("int"), + * // endOffset: Number("int"), + * // }, + * // ], + * // }, + * // ], + * // actionReview: { // ActionReview + * // pluginId: "STRING_VALUE", + * // pluginType: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // payload: { // ActionReviewPayload + * // "": { // ActionReviewPayloadField + * // displayName: "STRING_VALUE", + * // displayOrder: Number("int"), + * // type: "STRING" || "NUMBER" || "ARRAY" || "BOOLEAN", + * // value: "DOCUMENT_VALUE", + * // allowedValues: [ // ActionReviewPayloadFieldAllowedValues + * // { // ActionReviewPayloadFieldAllowedValue + * // value: "DOCUMENT_VALUE", + * // displayValue: "DOCUMENT_VALUE", + * // }, + * // ], + * // required: true || false, + * // }, + * // }, + * // payloadFieldNameSeparator: "STRING_VALUE", + * // }, + * // actionExecution: { // ActionExecution + * // pluginId: "STRING_VALUE", // required + * // payload: { // ActionExecutionPayload // required + * // "": { // ActionExecutionPayloadField + * // value: "DOCUMENT_VALUE", // required + * // }, + * // }, + * // payloadFieldNameSeparator: "STRING_VALUE", // required + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListMessagesCommandInput - {@link ListMessagesCommandInput} + * @returns {@link ListMessagesCommandOutput} + * @see {@link ListMessagesCommandInput} for command's `input` shape. + * @see {@link ListMessagesCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link LicenseNotFoundException} (client fault) + *

You don't have permissions to perform the action because your license is inactive. Ask + * your admin to activate your license and try again after your licence is active.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListMessagesCommand extends $Command< + ListMessagesCommandInput, + ListMessagesCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListMessagesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListMessagesCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListMessagesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListMessages", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListMessagesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListMessagesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListMessagesCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListPluginsCommand.ts b/clients/client-qbusiness/src/commands/ListPluginsCommand.ts new file mode 100644 index 000000000000..7d1367f10ecd --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListPluginsCommand.ts @@ -0,0 +1,169 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListPluginsRequest, ListPluginsResponse } from "../models/models_0"; +import { de_ListPluginsCommand, se_ListPluginsCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListPluginsCommand}. + */ +export interface ListPluginsCommandInput extends ListPluginsRequest {} +/** + * @public + * + * The output of {@link ListPluginsCommand}. + */ +export interface ListPluginsCommandOutput extends ListPluginsResponse, __MetadataBearer {} + +/** + * @public + *

Lists configured Amazon Q plugins.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListPluginsCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListPluginsCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListPluginsRequest + * applicationId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListPluginsCommand(input); + * const response = await client.send(command); + * // { // ListPluginsResponse + * // nextToken: "STRING_VALUE", + * // plugins: [ // Plugins + * // { // Plugin + * // pluginId: "STRING_VALUE", + * // displayName: "STRING_VALUE", + * // type: "SERVICE_NOW" || "SALESFORCE" || "JIRA" || "ZENDESK", + * // serverUrl: "STRING_VALUE", + * // state: "ENABLED" || "DISABLED", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListPluginsCommandInput - {@link ListPluginsCommandInput} + * @returns {@link ListPluginsCommandOutput} + * @see {@link ListPluginsCommandInput} for command's `input` shape. + * @see {@link ListPluginsCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListPluginsCommand extends $Command< + ListPluginsCommandInput, + ListPluginsCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListPluginsCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListPluginsCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListPluginsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListPlugins", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListPluginsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListPluginsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListPluginsCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListRetrieversCommand.ts b/clients/client-qbusiness/src/commands/ListRetrieversCommand.ts new file mode 100644 index 000000000000..6df633838704 --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListRetrieversCommand.ts @@ -0,0 +1,169 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListRetrieversRequest, ListRetrieversResponse } from "../models/models_0"; +import { de_ListRetrieversCommand, se_ListRetrieversCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListRetrieversCommand}. + */ +export interface ListRetrieversCommandInput extends ListRetrieversRequest {} +/** + * @public + * + * The output of {@link ListRetrieversCommand}. + */ +export interface ListRetrieversCommandOutput extends ListRetrieversResponse, __MetadataBearer {} + +/** + * @public + *

Lists the retriever used by an Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListRetrieversCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListRetrieversCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListRetrieversRequest + * applicationId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListRetrieversCommand(input); + * const response = await client.send(command); + * // { // ListRetrieversResponse + * // retrievers: [ // Retrievers + * // { // Retriever + * // applicationId: "STRING_VALUE", + * // retrieverId: "STRING_VALUE", + * // type: "NATIVE_INDEX" || "KENDRA_INDEX", + * // status: "CREATING" || "ACTIVE" || "FAILED", + * // displayName: "STRING_VALUE", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListRetrieversCommandInput - {@link ListRetrieversCommandInput} + * @returns {@link ListRetrieversCommandOutput} + * @see {@link ListRetrieversCommandInput} for command's `input` shape. + * @see {@link ListRetrieversCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListRetrieversCommand extends $Command< + ListRetrieversCommandInput, + ListRetrieversCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListRetrieversCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListRetrieversCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListRetrieversCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListRetrievers", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListRetrieversCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListRetrieversCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListRetrieversCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListTagsForResourceCommand.ts b/clients/client-qbusiness/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..44c892c9a75e --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,164 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + * @public + *

Gets a list of tags associated with a specified resource. Amazon Q applications + * and data sources can have tags associated with them.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListTagsForResourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListTagsForResourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListTagsForResourceRequest + * resourceARN: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: [ // Tags + * // { // Tag + * // key: "STRING_VALUE", // required + * // value: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListTagsForResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListTagsForResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTagsForResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTagsForResourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/ListWebExperiencesCommand.ts b/clients/client-qbusiness/src/commands/ListWebExperiencesCommand.ts new file mode 100644 index 000000000000..691f2a6b2cda --- /dev/null +++ b/clients/client-qbusiness/src/commands/ListWebExperiencesCommand.ts @@ -0,0 +1,169 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { ListWebExperiencesRequest, ListWebExperiencesResponse } from "../models/models_0"; +import { de_ListWebExperiencesCommand, se_ListWebExperiencesCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListWebExperiencesCommand}. + */ +export interface ListWebExperiencesCommandInput extends ListWebExperiencesRequest {} +/** + * @public + * + * The output of {@link ListWebExperiencesCommand}. + */ +export interface ListWebExperiencesCommandOutput extends ListWebExperiencesResponse, __MetadataBearer {} + +/** + * @public + *

Lists one or more Amazon Q Web Experiences.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, ListWebExperiencesCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, ListWebExperiencesCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // ListWebExperiencesRequest + * applicationId: "STRING_VALUE", // required + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListWebExperiencesCommand(input); + * const response = await client.send(command); + * // { // ListWebExperiencesResponse + * // webExperiences: [ // WebExperiences + * // { // WebExperience + * // webExperienceId: "STRING_VALUE", + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // defaultEndpoint: "STRING_VALUE", + * // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "PENDING_AUTH_CONFIG", + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListWebExperiencesCommandInput - {@link ListWebExperiencesCommandInput} + * @returns {@link ListWebExperiencesCommandOutput} + * @see {@link ListWebExperiencesCommandInput} for command's `input` shape. + * @see {@link ListWebExperiencesCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class ListWebExperiencesCommand extends $Command< + ListWebExperiencesCommandInput, + ListWebExperiencesCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListWebExperiencesCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListWebExperiencesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "ListWebExperiencesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "ListWebExperiences", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListWebExperiencesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListWebExperiencesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListWebExperiencesCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/PutFeedbackCommand.ts b/clients/client-qbusiness/src/commands/PutFeedbackCommand.ts new file mode 100644 index 000000000000..414cea4b6759 --- /dev/null +++ b/clients/client-qbusiness/src/commands/PutFeedbackCommand.ts @@ -0,0 +1,165 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { PutFeedbackRequest } from "../models/models_0"; +import { de_PutFeedbackCommand, se_PutFeedbackCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link PutFeedbackCommand}. + */ +export interface PutFeedbackCommandInput extends PutFeedbackRequest {} +/** + * @public + * + * The output of {@link PutFeedbackCommand}. + */ +export interface PutFeedbackCommandOutput extends __MetadataBearer {} + +/** + * @public + *

Enables your end user to to provide feedback on their Amazon Q generated chat + * responses.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, PutFeedbackCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, PutFeedbackCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // PutFeedbackRequest + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * conversationId: "STRING_VALUE", // required + * messageId: "STRING_VALUE", // required + * messageCopiedAt: new Date("TIMESTAMP"), + * messageUsefulness: { // MessageUsefulnessFeedback + * usefulness: "USEFUL" || "NOT_USEFUL", // required + * reason: "NOT_FACTUALLY_CORRECT" || "HARMFUL_OR_UNSAFE" || "INCORRECT_OR_MISSING_SOURCES" || "NOT_HELPFUL" || "FACTUALLY_CORRECT" || "COMPLETE" || "RELEVANT_SOURCES" || "HELPFUL", + * comment: "STRING_VALUE", + * submittedAt: new Date("TIMESTAMP"), // required + * }, + * }; + * const command = new PutFeedbackCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param PutFeedbackCommandInput - {@link PutFeedbackCommandInput} + * @returns {@link PutFeedbackCommandOutput} + * @see {@link PutFeedbackCommandInput} for command's `input` shape. + * @see {@link PutFeedbackCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class PutFeedbackCommand extends $Command< + PutFeedbackCommandInput, + PutFeedbackCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: PutFeedbackCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, PutFeedbackCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "PutFeedbackCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "PutFeedback", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: PutFeedbackCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_PutFeedbackCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_PutFeedbackCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/PutGroupCommand.ts b/clients/client-qbusiness/src/commands/PutGroupCommand.ts new file mode 100644 index 000000000000..32d42b1274e3 --- /dev/null +++ b/clients/client-qbusiness/src/commands/PutGroupCommand.ts @@ -0,0 +1,185 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { PutGroupRequest, PutGroupResponse } from "../models/models_0"; +import { de_PutGroupCommand, se_PutGroupCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link PutGroupCommand}. + */ +export interface PutGroupCommandInput extends PutGroupRequest {} +/** + * @public + * + * The output of {@link PutGroupCommand}. + */ +export interface PutGroupCommandOutput extends PutGroupResponse, __MetadataBearer {} + +/** + * @public + *

Create, or updates, a mapping of users—who have access to a document—to + * groups.

+ *

You can also map sub groups to groups. For example, the group "Company Intellectual + * Property Teams" includes sub groups "Research" and "Engineering". These sub groups + * include their own list of users or people who work in these teams. Only users who work + * in research and engineering, and therefore belong in the intellectual property group, + * can see top-secret company documents in their Amazon Q chat results.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, PutGroupCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, PutGroupCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // PutGroupRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * groupName: "STRING_VALUE", // required + * dataSourceId: "STRING_VALUE", + * type: "INDEX" || "DATASOURCE", // required + * groupMembers: { // GroupMembers + * memberGroups: [ // MemberGroups + * { // MemberGroup + * groupName: "STRING_VALUE", // required + * type: "INDEX" || "DATASOURCE", + * }, + * ], + * memberUsers: [ // MemberUsers + * { // MemberUser + * userId: "STRING_VALUE", // required + * type: "INDEX" || "DATASOURCE", + * }, + * ], + * }, + * }; + * const command = new PutGroupCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param PutGroupCommandInput - {@link PutGroupCommandInput} + * @returns {@link PutGroupCommandOutput} + * @see {@link PutGroupCommandInput} for command's `input` shape. + * @see {@link PutGroupCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class PutGroupCommand extends $Command< + PutGroupCommandInput, + PutGroupCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: PutGroupCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, PutGroupCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "PutGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "PutGroup", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: PutGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_PutGroupCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_PutGroupCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/StartDataSourceSyncJobCommand.ts b/clients/client-qbusiness/src/commands/StartDataSourceSyncJobCommand.ts new file mode 100644 index 000000000000..5a1ea554f27b --- /dev/null +++ b/clients/client-qbusiness/src/commands/StartDataSourceSyncJobCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { StartDataSourceSyncJobRequest, StartDataSourceSyncJobResponse } from "../models/models_0"; +import { de_StartDataSourceSyncJobCommand, se_StartDataSourceSyncJobCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartDataSourceSyncJobCommand}. + */ +export interface StartDataSourceSyncJobCommandInput extends StartDataSourceSyncJobRequest {} +/** + * @public + * + * The output of {@link StartDataSourceSyncJobCommand}. + */ +export interface StartDataSourceSyncJobCommandOutput extends StartDataSourceSyncJobResponse, __MetadataBearer {} + +/** + * @public + *

Starts a data source connector synchronization job. If a synchronization job is + * already in progress, Amazon Q returns a ConflictException.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, StartDataSourceSyncJobCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, StartDataSourceSyncJobCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // StartDataSourceSyncJobRequest + * dataSourceId: "STRING_VALUE", // required + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * }; + * const command = new StartDataSourceSyncJobCommand(input); + * const response = await client.send(command); + * // { // StartDataSourceSyncJobResponse + * // executionId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param StartDataSourceSyncJobCommandInput - {@link StartDataSourceSyncJobCommandInput} + * @returns {@link StartDataSourceSyncJobCommandOutput} + * @see {@link StartDataSourceSyncJobCommandInput} for command's `input` shape. + * @see {@link StartDataSourceSyncJobCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class StartDataSourceSyncJobCommand extends $Command< + StartDataSourceSyncJobCommandInput, + StartDataSourceSyncJobCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartDataSourceSyncJobCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StartDataSourceSyncJobCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "StartDataSourceSyncJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "StartDataSourceSyncJob", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartDataSourceSyncJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartDataSourceSyncJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_StartDataSourceSyncJobCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/StopDataSourceSyncJobCommand.ts b/clients/client-qbusiness/src/commands/StopDataSourceSyncJobCommand.ts new file mode 100644 index 000000000000..91fea8b1d39f --- /dev/null +++ b/clients/client-qbusiness/src/commands/StopDataSourceSyncJobCommand.ts @@ -0,0 +1,159 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { StopDataSourceSyncJobRequest, StopDataSourceSyncJobResponse } from "../models/models_0"; +import { de_StopDataSourceSyncJobCommand, se_StopDataSourceSyncJobCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StopDataSourceSyncJobCommand}. + */ +export interface StopDataSourceSyncJobCommandInput extends StopDataSourceSyncJobRequest {} +/** + * @public + * + * The output of {@link StopDataSourceSyncJobCommand}. + */ +export interface StopDataSourceSyncJobCommandOutput extends StopDataSourceSyncJobResponse, __MetadataBearer {} + +/** + * @public + *

Stops an Amazon Q data source connector synchronization job already in + * progress.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, StopDataSourceSyncJobCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, StopDataSourceSyncJobCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // StopDataSourceSyncJobRequest + * dataSourceId: "STRING_VALUE", // required + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * }; + * const command = new StopDataSourceSyncJobCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param StopDataSourceSyncJobCommandInput - {@link StopDataSourceSyncJobCommandInput} + * @returns {@link StopDataSourceSyncJobCommandOutput} + * @see {@link StopDataSourceSyncJobCommandInput} for command's `input` shape. + * @see {@link StopDataSourceSyncJobCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class StopDataSourceSyncJobCommand extends $Command< + StopDataSourceSyncJobCommandInput, + StopDataSourceSyncJobCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StopDataSourceSyncJobCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, StopDataSourceSyncJobCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "StopDataSourceSyncJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "StopDataSourceSyncJob", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StopDataSourceSyncJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StopDataSourceSyncJobCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_StopDataSourceSyncJobCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/TagResourceCommand.ts b/clients/client-qbusiness/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..5df7b3dae632 --- /dev/null +++ b/clients/client-qbusiness/src/commands/TagResourceCommand.ts @@ -0,0 +1,166 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Adds the specified tag to the specified Amazon Q application or data source + * resource. If the tag already exists, the existing value is replaced with the new + * value.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, TagResourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, TagResourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // TagResourceRequest + * resourceARN: "STRING_VALUE", // required + * tags: [ // Tags // required + * { // Tag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: TagResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "TagResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_TagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_TagResourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UntagResourceCommand.ts b/clients/client-qbusiness/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..0182948dc67e --- /dev/null +++ b/clients/client-qbusiness/src/commands/UntagResourceCommand.ts @@ -0,0 +1,157 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Removes a tag from an Amazon Q application or a data source.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UntagResourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UntagResourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UntagResourceRequest + * resourceARN: "STRING_VALUE", // required + * tagKeys: [ // TagKeys // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UntagResourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UntagResource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UntagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UntagResourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts b/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts new file mode 100644 index 000000000000..c99761dfdf23 --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateApplicationCommand.ts @@ -0,0 +1,166 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateApplicationRequest, UpdateApplicationResponse } from "../models/models_0"; +import { de_UpdateApplicationCommand, se_UpdateApplicationCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateApplicationCommand}. + */ +export interface UpdateApplicationCommandInput extends UpdateApplicationRequest {} +/** + * @public + * + * The output of {@link UpdateApplicationCommand}. + */ +export interface UpdateApplicationCommandOutput extends UpdateApplicationResponse, __MetadataBearer {} + +/** + * @public + *

Updates an existing Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateApplicationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateApplicationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateApplicationRequest + * applicationId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", + * description: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * attachmentsConfiguration: { // AttachmentsConfiguration + * attachmentsControlMode: "ENABLED" || "DISABLED", // required + * }, + * }; + * const command = new UpdateApplicationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateApplicationCommandInput - {@link UpdateApplicationCommandInput} + * @returns {@link UpdateApplicationCommandOutput} + * @see {@link UpdateApplicationCommandInput} for command's `input` shape. + * @see {@link UpdateApplicationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateApplicationCommand extends $Command< + UpdateApplicationCommandInput, + UpdateApplicationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateApplicationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateApplicationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateApplicationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateApplication", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateApplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateApplicationCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateApplicationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateChatControlsConfigurationCommand.ts b/clients/client-qbusiness/src/commands/UpdateChatControlsConfigurationCommand.ts new file mode 100644 index 000000000000..93a00a803351 --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateChatControlsConfigurationCommand.ts @@ -0,0 +1,272 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateChatControlsConfigurationRequest, UpdateChatControlsConfigurationResponse } from "../models/models_0"; +import { + de_UpdateChatControlsConfigurationCommand, + se_UpdateChatControlsConfigurationCommand, +} from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateChatControlsConfigurationCommand}. + */ +export interface UpdateChatControlsConfigurationCommandInput extends UpdateChatControlsConfigurationRequest {} +/** + * @public + * + * The output of {@link UpdateChatControlsConfigurationCommand}. + */ +export interface UpdateChatControlsConfigurationCommandOutput + extends UpdateChatControlsConfigurationResponse, + __MetadataBearer {} + +/** + * @public + *

Updates an set of chat controls configured for an existing Amazon Q + * application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateChatControlsConfigurationCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateChatControlsConfigurationCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateChatControlsConfigurationRequest + * applicationId: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * responseScope: "ENTERPRISE_CONTENT_ONLY" || "EXTENDED_KNOWLEDGE_ENABLED", + * blockedPhrasesConfigurationUpdate: { // BlockedPhrasesConfigurationUpdate + * blockedPhrasesToCreateOrUpdate: [ // BlockedPhrases + * "STRING_VALUE", + * ], + * blockedPhrasesToDelete: [ + * "STRING_VALUE", + * ], + * systemMessageOverride: "STRING_VALUE", + * }, + * topicConfigurationsToCreateOrUpdate: [ // TopicConfigurations + * { // TopicConfiguration + * name: "STRING_VALUE", // required + * description: "STRING_VALUE", + * exampleChatMessages: [ // ExampleChatMessages + * "STRING_VALUE", + * ], + * rules: [ // Rules // required + * { // Rule + * includedUsersAndGroups: { // UsersAndGroups + * userIds: [ // UserIds + * "STRING_VALUE", + * ], + * userGroups: [ // UserGroups + * "STRING_VALUE", + * ], + * }, + * excludedUsersAndGroups: { + * userIds: [ + * "STRING_VALUE", + * ], + * userGroups: [ + * "STRING_VALUE", + * ], + * }, + * ruleType: "CONTENT_BLOCKER_RULE" || "CONTENT_RETRIEVAL_RULE", // required + * ruleConfiguration: { // RuleConfiguration Union: only one key present + * contentBlockerRule: { // ContentBlockerRule + * systemMessageOverride: "STRING_VALUE", + * }, + * contentRetrievalRule: { // ContentRetrievalRule + * eligibleDataSources: [ // EligibleDataSources + * { // EligibleDataSource + * indexId: "STRING_VALUE", + * dataSourceId: "STRING_VALUE", + * }, + * ], + * }, + * }, + * }, + * ], + * }, + * ], + * topicConfigurationsToDelete: [ + * { + * name: "STRING_VALUE", // required + * description: "STRING_VALUE", + * exampleChatMessages: [ + * "STRING_VALUE", + * ], + * rules: [ // required + * { + * includedUsersAndGroups: { + * userIds: [ + * "STRING_VALUE", + * ], + * userGroups: [ + * "STRING_VALUE", + * ], + * }, + * excludedUsersAndGroups: { + * userIds: [ + * "STRING_VALUE", + * ], + * userGroups: [ + * "STRING_VALUE", + * ], + * }, + * ruleType: "CONTENT_BLOCKER_RULE" || "CONTENT_RETRIEVAL_RULE", // required + * ruleConfiguration: {// Union: only one key present + * contentBlockerRule: { + * systemMessageOverride: "STRING_VALUE", + * }, + * contentRetrievalRule: { + * eligibleDataSources: [ + * { + * indexId: "STRING_VALUE", + * dataSourceId: "STRING_VALUE", + * }, + * ], + * }, + * }, + * }, + * ], + * }, + * ], + * }; + * const command = new UpdateChatControlsConfigurationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateChatControlsConfigurationCommandInput - {@link UpdateChatControlsConfigurationCommandInput} + * @returns {@link UpdateChatControlsConfigurationCommandOutput} + * @see {@link UpdateChatControlsConfigurationCommandInput} for command's `input` shape. + * @see {@link UpdateChatControlsConfigurationCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateChatControlsConfigurationCommand extends $Command< + UpdateChatControlsConfigurationCommandInput, + UpdateChatControlsConfigurationCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateChatControlsConfigurationCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateChatControlsConfigurationCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateChatControlsConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateChatControlsConfiguration", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: UpdateChatControlsConfigurationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_UpdateChatControlsConfigurationCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_UpdateChatControlsConfigurationCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateDataSourceCommand.ts b/clients/client-qbusiness/src/commands/UpdateDataSourceCommand.ts new file mode 100644 index 000000000000..20173ce40b8c --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateDataSourceCommand.ts @@ -0,0 +1,240 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateDataSourceRequest, UpdateDataSourceResponse } from "../models/models_0"; +import { de_UpdateDataSourceCommand, se_UpdateDataSourceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateDataSourceCommand}. + */ +export interface UpdateDataSourceCommandInput extends UpdateDataSourceRequest {} +/** + * @public + * + * The output of {@link UpdateDataSourceCommand}. + */ +export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse, __MetadataBearer {} + +/** + * @public + *

Updates an existing Amazon Q data source connector.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateDataSourceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateDataSourceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateDataSourceRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * dataSourceId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", + * configuration: "DOCUMENT_VALUE", + * vpcConfiguration: { // DataSourceVpcConfiguration + * subnetIds: [ // SubnetIds // required + * "STRING_VALUE", + * ], + * securityGroupIds: [ // SecurityGroupIds // required + * "STRING_VALUE", + * ], + * }, + * description: "STRING_VALUE", + * syncSchedule: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * documentEnrichmentConfiguration: { // DocumentEnrichmentConfiguration + * inlineConfigurations: [ // InlineDocumentEnrichmentConfigurations + * { // InlineDocumentEnrichmentConfiguration + * condition: { // DocumentAttributeCondition + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: { // DocumentAttributeValue Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ // DocumentAttributeStringListValue + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * target: { // DocumentAttributeTarget + * key: "STRING_VALUE", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * attributeValueOperator: "DELETE", + * }, + * documentContentOperator: "DELETE", + * }, + * ], + * preExtractionHookConfiguration: { // HookConfiguration + * invocationCondition: { + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * lambdaArn: "STRING_VALUE", + * s3BucketName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }, + * postExtractionHookConfiguration: { + * invocationCondition: { + * key: "STRING_VALUE", // required + * operator: "GREATER_THAN" || "GREATER_THAN_OR_EQUALS" || "LESS_THAN" || "LESS_THAN_OR_EQUALS" || "EQUALS" || "NOT_EQUALS" || "CONTAINS" || "NOT_CONTAINS" || "EXISTS" || "NOT_EXISTS" || "BEGINS_WITH", // required + * value: {// Union: only one key present + * stringValue: "STRING_VALUE", + * stringListValue: [ + * "STRING_VALUE", + * ], + * longValue: Number("long"), + * dateValue: new Date("TIMESTAMP"), + * }, + * }, + * lambdaArn: "STRING_VALUE", + * s3BucketName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }, + * }, + * }; + * const command = new UpdateDataSourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateDataSourceCommandInput - {@link UpdateDataSourceCommandInput} + * @returns {@link UpdateDataSourceCommandOutput} + * @see {@link UpdateDataSourceCommandInput} for command's `input` shape. + * @see {@link UpdateDataSourceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateDataSourceCommand extends $Command< + UpdateDataSourceCommandInput, + UpdateDataSourceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateDataSourceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateDataSourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateDataSourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateDataSource", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateDataSourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateDataSourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateDataSourceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateIndexCommand.ts b/clients/client-qbusiness/src/commands/UpdateIndexCommand.ts new file mode 100644 index 000000000000..46e24587c423 --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateIndexCommand.ts @@ -0,0 +1,174 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateIndexRequest, UpdateIndexResponse } from "../models/models_0"; +import { de_UpdateIndexCommand, se_UpdateIndexCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateIndexCommand}. + */ +export interface UpdateIndexCommandInput extends UpdateIndexRequest {} +/** + * @public + * + * The output of {@link UpdateIndexCommand}. + */ +export interface UpdateIndexCommandOutput extends UpdateIndexResponse, __MetadataBearer {} + +/** + * @public + *

Updates an Amazon Q index.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateIndexCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateIndexCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateIndexRequest + * applicationId: "STRING_VALUE", // required + * indexId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", + * description: "STRING_VALUE", + * capacityConfiguration: { // IndexCapacityConfiguration + * units: Number("int"), + * }, + * documentAttributeConfigurations: [ // DocumentAttributeConfigurations + * { // DocumentAttributeConfiguration + * name: "STRING_VALUE", + * type: "STRING" || "STRING_LIST" || "NUMBER" || "DATE", + * search: "ENABLED" || "DISABLED", + * }, + * ], + * }; + * const command = new UpdateIndexCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateIndexCommandInput - {@link UpdateIndexCommandInput} + * @returns {@link UpdateIndexCommandOutput} + * @see {@link UpdateIndexCommandInput} for command's `input` shape. + * @see {@link UpdateIndexCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateIndexCommand extends $Command< + UpdateIndexCommandInput, + UpdateIndexCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateIndexCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdateIndexCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateIndexCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateIndex", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateIndexCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateIndexCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateIndexCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts b/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts new file mode 100644 index 000000000000..ad0e381720c3 --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdatePluginCommand.ts @@ -0,0 +1,175 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdatePluginRequest, UpdatePluginResponse } from "../models/models_0"; +import { de_UpdatePluginCommand, se_UpdatePluginCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdatePluginCommand}. + */ +export interface UpdatePluginCommandInput extends UpdatePluginRequest {} +/** + * @public + * + * The output of {@link UpdatePluginCommand}. + */ +export interface UpdatePluginCommandOutput extends UpdatePluginResponse, __MetadataBearer {} + +/** + * @public + *

Updates an Amazon Q plugin.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdatePluginCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdatePluginCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdatePluginRequest + * applicationId: "STRING_VALUE", // required + * pluginId: "STRING_VALUE", // required + * displayName: "STRING_VALUE", + * state: "ENABLED" || "DISABLED", + * serverUrl: "STRING_VALUE", + * authConfiguration: { // PluginAuthConfiguration Union: only one key present + * basicAuthConfiguration: { // BasicAuthConfiguration + * secretArn: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * }, + * oAuth2ClientCredentialConfiguration: { // OAuth2ClientCredentialConfiguration + * secretArn: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * }, + * }, + * }; + * const command = new UpdatePluginCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdatePluginCommandInput - {@link UpdatePluginCommandInput} + * @returns {@link UpdatePluginCommandOutput} + * @see {@link UpdatePluginCommandInput} for command's `input` shape. + * @see {@link UpdatePluginCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdatePluginCommand extends $Command< + UpdatePluginCommandInput, + UpdatePluginCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdatePluginCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdatePluginCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdatePluginCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdatePlugin", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdatePluginCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdatePluginCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdatePluginCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateRetrieverCommand.ts b/clients/client-qbusiness/src/commands/UpdateRetrieverCommand.ts new file mode 100644 index 000000000000..6766bcf9a10b --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateRetrieverCommand.ts @@ -0,0 +1,174 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateRetrieverRequest, UpdateRetrieverResponse } from "../models/models_0"; +import { de_UpdateRetrieverCommand, se_UpdateRetrieverCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateRetrieverCommand}. + */ +export interface UpdateRetrieverCommandInput extends UpdateRetrieverRequest {} +/** + * @public + * + * The output of {@link UpdateRetrieverCommand}. + */ +export interface UpdateRetrieverCommandOutput extends UpdateRetrieverResponse, __MetadataBearer {} + +/** + * @public + *

Updates the retriever used for your Amazon Q application.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateRetrieverCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateRetrieverCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateRetrieverRequest + * applicationId: "STRING_VALUE", // required + * retrieverId: "STRING_VALUE", // required + * configuration: { // RetrieverConfiguration Union: only one key present + * nativeIndexConfiguration: { // NativeIndexConfiguration + * indexId: "STRING_VALUE", // required + * }, + * kendraIndexConfiguration: { // KendraIndexConfiguration + * indexId: "STRING_VALUE", // required + * }, + * }, + * displayName: "STRING_VALUE", + * roleArn: "STRING_VALUE", + * }; + * const command = new UpdateRetrieverCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateRetrieverCommandInput - {@link UpdateRetrieverCommandInput} + * @returns {@link UpdateRetrieverCommandOutput} + * @see {@link UpdateRetrieverCommandInput} for command's `input` shape. + * @see {@link UpdateRetrieverCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateRetrieverCommand extends $Command< + UpdateRetrieverCommandInput, + UpdateRetrieverCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateRetrieverCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateRetrieverCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateRetrieverCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateRetriever", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateRetrieverCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateRetrieverCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateRetrieverCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateUserCommand.ts b/clients/client-qbusiness/src/commands/UpdateUserCommand.ts new file mode 100644 index 000000000000..6c9a352858f4 --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateUserCommand.ts @@ -0,0 +1,194 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateUserRequest, UpdateUserResponse } from "../models/models_0"; +import { de_UpdateUserCommand, se_UpdateUserCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateUserCommand}. + */ +export interface UpdateUserCommandInput extends UpdateUserRequest {} +/** + * @public + * + * The output of {@link UpdateUserCommand}. + */ +export interface UpdateUserCommandOutput extends UpdateUserResponse, __MetadataBearer {} + +/** + * @public + *

Updates a information associated with a user id.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateUserCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateUserCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateUserRequest + * applicationId: "STRING_VALUE", // required + * userId: "STRING_VALUE", // required + * userAliasesToUpdate: [ // UserAliases + * { // UserAlias + * indexId: "STRING_VALUE", + * dataSourceId: "STRING_VALUE", + * userId: "STRING_VALUE", // required + * }, + * ], + * userAliasesToDelete: [ + * { + * indexId: "STRING_VALUE", + * dataSourceId: "STRING_VALUE", + * userId: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new UpdateUserCommand(input); + * const response = await client.send(command); + * // { // UpdateUserResponse + * // userAliasesAdded: [ // UserAliases + * // { // UserAlias + * // indexId: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // userId: "STRING_VALUE", // required + * // }, + * // ], + * // userAliasesUpdated: [ + * // { + * // indexId: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // userId: "STRING_VALUE", // required + * // }, + * // ], + * // userAliasesDeleted: [ + * // { + * // indexId: "STRING_VALUE", + * // dataSourceId: "STRING_VALUE", + * // userId: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param UpdateUserCommandInput - {@link UpdateUserCommandInput} + * @returns {@link UpdateUserCommandOutput} + * @see {@link UpdateUserCommandInput} for command's `input` shape. + * @see {@link UpdateUserCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You have exceeded the set limits for your Amazon Q service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateUserCommand extends $Command< + UpdateUserCommandInput, + UpdateUserCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateUserCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdateUserCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateUserCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateUser", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateUserCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateUserCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateUserCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts new file mode 100644 index 000000000000..c861f12740c4 --- /dev/null +++ b/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { UpdateWebExperienceRequest, UpdateWebExperienceResponse } from "../models/models_0"; +import { de_UpdateWebExperienceCommand, se_UpdateWebExperienceCommand } from "../protocols/Aws_restJson1"; +import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UpdateWebExperienceCommand}. + */ +export interface UpdateWebExperienceCommandInput extends UpdateWebExperienceRequest {} +/** + * @public + * + * The output of {@link UpdateWebExperienceCommand}. + */ +export interface UpdateWebExperienceCommandOutput extends UpdateWebExperienceResponse, __MetadataBearer {} + +/** + * @public + *

Updates an Amazon Q web experience.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QBusinessClient, UpdateWebExperienceCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import + * // const { QBusinessClient, UpdateWebExperienceCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import + * const client = new QBusinessClient(config); + * const input = { // UpdateWebExperienceRequest + * applicationId: "STRING_VALUE", // required + * webExperienceId: "STRING_VALUE", // required + * authenticationConfiguration: { // WebExperienceAuthConfiguration Union: only one key present + * samlConfiguration: { // SamlConfiguration + * metadataXML: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", // required + * userIdAttribute: "STRING_VALUE", // required + * userGroupAttribute: "STRING_VALUE", + * }, + * }, + * title: "STRING_VALUE", + * subtitle: "STRING_VALUE", + * welcomeMessage: "STRING_VALUE", + * samplePromptsControlMode: "ENABLED" || "DISABLED", + * }; + * const command = new UpdateWebExperienceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateWebExperienceCommandInput - {@link UpdateWebExperienceCommandInput} + * @returns {@link UpdateWebExperienceCommandOutput} + * @see {@link UpdateWebExperienceCommandInput} for command's `input` shape. + * @see {@link UpdateWebExperienceCommandOutput} for command's `response` shape. + * @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ * + * @throws {@link ConflictException} (client fault) + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ * + * @throws {@link InternalServerException} (server fault) + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ * + * @throws {@link ValidationException} (client fault) + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ * + * @throws {@link QBusinessServiceException} + *

Base exception class for all service exceptions from QBusiness service.

+ * + */ +export class UpdateWebExperienceCommand extends $Command< + UpdateWebExperienceCommandInput, + UpdateWebExperienceCommandOutput, + QBusinessClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateWebExperienceCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: QBusinessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, UpdateWebExperienceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "QBusinessClient"; + const commandName = "UpdateWebExperienceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "ExpertQ", + operation: "UpdateWebExperience", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UpdateWebExperienceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UpdateWebExperienceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UpdateWebExperienceCommand(output, context); + } +} diff --git a/clients/client-qbusiness/src/commands/index.ts b/clients/client-qbusiness/src/commands/index.ts new file mode 100644 index 000000000000..cf3a34e3aa54 --- /dev/null +++ b/clients/client-qbusiness/src/commands/index.ts @@ -0,0 +1,56 @@ +// smithy-typescript generated code +export * from "./BatchDeleteDocumentCommand"; +export * from "./BatchPutDocumentCommand"; +export * from "./ChatSyncCommand"; +export * from "./CreateApplicationCommand"; +export * from "./CreateDataSourceCommand"; +export * from "./CreateIndexCommand"; +export * from "./CreatePluginCommand"; +export * from "./CreateRetrieverCommand"; +export * from "./CreateUserCommand"; +export * from "./CreateWebExperienceCommand"; +export * from "./DeleteApplicationCommand"; +export * from "./DeleteChatControlsConfigurationCommand"; +export * from "./DeleteConversationCommand"; +export * from "./DeleteDataSourceCommand"; +export * from "./DeleteGroupCommand"; +export * from "./DeleteIndexCommand"; +export * from "./DeletePluginCommand"; +export * from "./DeleteRetrieverCommand"; +export * from "./DeleteUserCommand"; +export * from "./DeleteWebExperienceCommand"; +export * from "./GetApplicationCommand"; +export * from "./GetChatControlsConfigurationCommand"; +export * from "./GetDataSourceCommand"; +export * from "./GetGroupCommand"; +export * from "./GetIndexCommand"; +export * from "./GetPluginCommand"; +export * from "./GetRetrieverCommand"; +export * from "./GetUserCommand"; +export * from "./GetWebExperienceCommand"; +export * from "./ListApplicationsCommand"; +export * from "./ListConversationsCommand"; +export * from "./ListDataSourceSyncJobsCommand"; +export * from "./ListDataSourcesCommand"; +export * from "./ListDocumentsCommand"; +export * from "./ListGroupsCommand"; +export * from "./ListIndicesCommand"; +export * from "./ListMessagesCommand"; +export * from "./ListPluginsCommand"; +export * from "./ListRetrieversCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./ListWebExperiencesCommand"; +export * from "./PutFeedbackCommand"; +export * from "./PutGroupCommand"; +export * from "./StartDataSourceSyncJobCommand"; +export * from "./StopDataSourceSyncJobCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateApplicationCommand"; +export * from "./UpdateChatControlsConfigurationCommand"; +export * from "./UpdateDataSourceCommand"; +export * from "./UpdateIndexCommand"; +export * from "./UpdatePluginCommand"; +export * from "./UpdateRetrieverCommand"; +export * from "./UpdateUserCommand"; +export * from "./UpdateWebExperienceCommand"; diff --git a/clients/client-qbusiness/src/endpoint/EndpointParameters.ts b/clients/client-qbusiness/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..4e1abde1bd1d --- /dev/null +++ b/clients/client-qbusiness/src/endpoint/EndpointParameters.ts @@ -0,0 +1,31 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} + +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; + +export const resolveClientEndpointParameters = ( + options: T & ClientInputEndpointParameters +): T & ClientResolvedEndpointParameters => { + return { + ...options, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "qbusiness", + }; +}; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-qbusiness/src/endpoint/endpointResolver.ts b/clients/client-qbusiness/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..5a2f95973187 --- /dev/null +++ b/clients/client-qbusiness/src/endpoint/endpointResolver.ts @@ -0,0 +1,16 @@ +// smithy-typescript generated code +import { EndpointV2, Logger } from "@smithy/types"; +import { EndpointParams, resolveEndpoint } from "@smithy/util-endpoints"; + +import { EndpointParameters } from "./EndpointParameters"; +import { ruleSet } from "./ruleset"; + +export const defaultEndpointResolver = ( + endpointParams: EndpointParameters, + context: { logger?: Logger } = {} +): EndpointV2 => { + return resolveEndpoint(ruleSet, { + endpointParams: endpointParams as EndpointParams, + logger: context.logger, + }); +}; diff --git a/clients/client-qbusiness/src/endpoint/ruleset.ts b/clients/client-qbusiness/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..dcd74106b30a --- /dev/null +++ b/clients/client-qbusiness/src/endpoint/ruleset.ts @@ -0,0 +1,29 @@ +// @ts-nocheck +// generated code, do not edit +import { RuleSetObject } from "@smithy/types"; + +/* This file is compressed. Log this object + or see "smithy.rules#endpointRuleSet" + in codegen/sdk-codegen/aws-models/qbusiness.json */ + +const r="argv", +s="ref"; +const a=false, +b=true, +c="isSet", +d="booleanEquals", +e="error", +f="endpoint", +g="tree", +h="PartitionResult", +i="getAttr", +j={"required":false,"type":"String"}, +k={[s]:"Endpoint"}, +l={}, +m={[s]:h}, +n={[e]:"FIPS is enabled but this partition does not support FIPS","type":e}, +o=[{"fn":d,[r]:[{[s]:"UseFIPS"},true]}], +p=[{[s]:"Region"}], +q=[{"fn":d,[r]:[{"fn":i,[r]:[m,"supportsFIPS"]},true]}]; +const _data={version:"1.0",parameters:{Region:j,UseFIPS:{required:b,default:a,type:"Boolean"},Endpoint:j},rules:[{conditions:[{fn:c,[r]:[k]}],rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:e},{endpoint:{url:k,properties:l,headers:l},type:f}],type:g},{conditions:[{fn:c,[r]:p}],rules:[{conditions:[{fn:"aws.partition",[r]:p,assign:h}],rules:[{conditions:[{fn:d,[r]:[b,{fn:i,[r]:[m,"supportsDualStack"]}]}],rules:[{conditions:o,rules:[{conditions:q,rules:[{endpoint:{url:"https://qbusiness-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:f}],type:g},n],type:g},{endpoint:{url:"https://qbusiness.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:f}],type:g},{conditions:o,rules:[{conditions:q,rules:[{endpoint:{url:"https://qbusiness-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:f}],type:g},n],type:g},{endpoint:{url:"https://qbusiness.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:f}],type:g}],type:g},{error:"Invalid Configuration: Missing Region",type:e}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-qbusiness/src/extensionConfiguration.ts b/clients/client-qbusiness/src/extensionConfiguration.ts new file mode 100644 index 000000000000..4d2b3e95d632 --- /dev/null +++ b/clients/client-qbusiness/src/extensionConfiguration.ts @@ -0,0 +1,12 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +/** + * @internal + */ +export interface QBusinessExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration {} diff --git a/clients/client-qbusiness/src/index.ts b/clients/client-qbusiness/src/index.ts new file mode 100644 index 000000000000..7ce72b2ac4fa --- /dev/null +++ b/clients/client-qbusiness/src/index.ts @@ -0,0 +1,20 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + *

+ *

+ * + * @packageDocumentation + */ +export * from "./QBusinessClient"; +export * from "./QBusiness"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export { RuntimeExtension } from "./runtimeExtensions"; +export { QBusinessExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +import "@aws-sdk/util-endpoints"; + +export { QBusinessServiceException } from "./models/QBusinessServiceException"; diff --git a/clients/client-qbusiness/src/models/QBusinessServiceException.ts b/clients/client-qbusiness/src/models/QBusinessServiceException.ts new file mode 100644 index 000000000000..4b11cc96adcd --- /dev/null +++ b/clients/client-qbusiness/src/models/QBusinessServiceException.ts @@ -0,0 +1,22 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export { __ServiceException, __ServiceExceptionOptions }; + +/** + * @public + * + * Base exception class for all service exceptions from QBusiness service. + */ +export class QBusinessServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, QBusinessServiceException.prototype); + } +} diff --git a/clients/client-qbusiness/src/models/index.ts b/clients/client-qbusiness/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-qbusiness/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-qbusiness/src/models/models_0.ts b/clients/client-qbusiness/src/models/models_0.ts new file mode 100644 index 000000000000..a8826cbdddde --- /dev/null +++ b/clients/client-qbusiness/src/models/models_0.ts @@ -0,0 +1,5891 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; +import { DocumentType as __DocumentType } from "@smithy/types"; + +import { QBusinessServiceException as __BaseException } from "./QBusinessServiceException"; + +/** + * @public + * @enum + */ +export const MemberRelation = { + AND: "AND", + OR: "OR", +} as const; + +/** + * @public + */ +export type MemberRelation = (typeof MemberRelation)[keyof typeof MemberRelation]; + +/** + * @public + * @enum + */ +export const ReadAccessType = { + ALLOW: "ALLOW", + DENY: "DENY", +} as const; + +/** + * @public + */ +export type ReadAccessType = (typeof ReadAccessType)[keyof typeof ReadAccessType]; + +/** + * @public + * @enum + */ +export const MembershipType = { + DATASOURCE: "DATASOURCE", + INDEX: "INDEX", +} as const; + +/** + * @public + */ +export type MembershipType = (typeof MembershipType)[keyof typeof MembershipType]; + +/** + * @public + *

Provides information about a group associated with the principal.

+ */ +export interface PrincipalGroup { + /** + * @public + *

The name of the group.

+ */ + name?: string; + + /** + * @public + *

Provides information about whether to allow or deny access to the principal.

+ */ + access: ReadAccessType | undefined; + + /** + * @public + *

The type of group.

+ */ + membershipType?: MembershipType; +} + +/** + * @public + *

Provides information about a user associated with a principal.

+ */ +export interface PrincipalUser { + /** + * @public + *

The identifier of the user.

+ */ + id?: string; + + /** + * @public + *

Provides information about whether to allow or deny access to the principal.

+ */ + access: ReadAccessType | undefined; + + /** + * @public + *

The type of group.

+ */ + membershipType?: MembershipType; +} + +/** + * @public + *

Provides user and group information used for filtering documents to use for generating + * Amazon Q conversation responses.

+ */ +export type Principal = Principal.GroupMember | Principal.UserMember | Principal.$UnknownMember; + +/** + * @public + */ +export namespace Principal { + /** + * @public + *

The user associated with the principal.

+ */ + export interface UserMember { + user: PrincipalUser; + group?: never; + $unknown?: never; + } + + /** + * @public + *

The group associated with the principal.

+ */ + export interface GroupMember { + user?: never; + group: PrincipalGroup; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + user?: never; + group?: never; + $unknown: [string, any]; + } + + export interface Visitor { + user: (value: PrincipalUser) => T; + group: (value: PrincipalGroup) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: Principal, visitor: Visitor): T => { + if (value.user !== undefined) return visitor.user(value.user); + if (value.group !== undefined) return visitor.group(value.group); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

A list of principals. Each principal can be either a USER or a + * GROUP and can be designated document access permissions of either + * ALLOW or DENY.

+ */ +export interface AccessControl { + /** + * @public + *

Contains a list of principals, where a principal can be either a USER or + * a GROUP. Each principal can be have the following type of document access: + * ALLOW or DENY.

+ */ + principals: Principal[] | undefined; + + /** + * @public + *

Describes the member relation within a principal list.

+ */ + memberRelation?: MemberRelation; +} + +/** + * @public + *

Used to configure access permissions for a document.

+ */ +export interface AccessConfiguration { + /** + * @public + *

A list of AccessControlList objects.

+ */ + accessControls: AccessControl[] | undefined; + + /** + * @public + *

Describes the member relation within the AccessControlList object.

+ */ + memberRelation?: MemberRelation; +} + +/** + * @public + *

You don't have access to perform this action. Make sure you have the required + * permission policies and user accounts and try again.

+ */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + } +} + +/** + * @public + *

A user input field in an plugin action execution payload.

+ */ +export interface ActionExecutionPayloadField { + /** + * @public + *

The content of a user input field in an plugin action execution payload.

+ */ + value: __DocumentType | undefined; +} + +/** + * @public + *

Performs an Amazon Q plugin action during a non-streaming chat + * conversation.

+ */ +export interface ActionExecution { + /** + * @public + *

The identifier of the plugin the action is attached to.

+ */ + pluginId: string | undefined; + + /** + * @public + *

A mapping of field names to the field values in input that an end user provides to + * Amazon Q requests to perform their plugin action.

+ */ + payload: Record | undefined; + + /** + * @public + *

A string used to retain information about the hierarchical contexts within an action + * execution event payload.

+ */ + payloadFieldNameSeparator: string | undefined; +} + +/** + * @public + * @enum + */ +export const ActionPayloadFieldType = { + ARRAY: "ARRAY", + BOOLEAN: "BOOLEAN", + NUMBER: "NUMBER", + STRING: "STRING", +} as const; + +/** + * @public + */ +export type ActionPayloadFieldType = (typeof ActionPayloadFieldType)[keyof typeof ActionPayloadFieldType]; + +/** + * @public + *

Information about the field values that an end user can use to provide to + * Amazon Q for Amazon Q to perform the requested plugin action.

+ */ +export interface ActionReviewPayloadFieldAllowedValue { + /** + * @public + *

The field value.

+ */ + value?: __DocumentType; + + /** + * @public + *

The name of the field.

+ */ + displayValue?: __DocumentType; +} + +/** + * @public + *

A user input field in an plugin action review payload.

+ */ +export interface ActionReviewPayloadField { + /** + * @public + *

The name of the field.

+ */ + displayName?: string; + + /** + * @public + *

The display order of fields in a payload.

+ */ + displayOrder?: number; + + /** + * @public + *

The type of field.

+ */ + type?: ActionPayloadFieldType; + + /** + * @public + *

The field value.

+ */ + value?: __DocumentType; + + /** + * @public + *

Information about the field values that an end user can use to provide to + * Amazon Q for Amazon Q to perform the requested plugin action.

+ */ + allowedValues?: ActionReviewPayloadFieldAllowedValue[]; + + /** + * @public + *

Information about whether the field is required.

+ */ + required?: boolean; +} + +/** + * @public + * @enum + */ +export const PluginType = { + JIRA: "JIRA", + SALESFORCE: "SALESFORCE", + SERVICE_NOW: "SERVICE_NOW", + ZENDESK: "ZENDESK", +} as const; + +/** + * @public + */ +export type PluginType = (typeof PluginType)[keyof typeof PluginType]; + +/** + * @public + *

An output event that Amazon Q returns to an user who wants to perform a plugin + * action during a non-streaming chat conversation. It contains information about the + * selected action with a list of possible user input fields, some pre-populated by + * Amazon Q.

+ */ +export interface ActionReview { + /** + * @public + *

The identifier of the plugin associated with the action review.

+ */ + pluginId?: string; + + /** + * @public + *

The type of plugin.

+ */ + pluginType?: PluginType; + + /** + * @public + *

Field values that an end user needs to provide to Amazon Q for Amazon Q to + * perform the requested plugin action.

+ */ + payload?: Record; + + /** + * @public + *

A string used to retain information about the hierarchical contexts within an action + * review payload.

+ */ + payloadFieldNameSeparator?: string; +} + +/** + * @public + * @enum + */ +export const ApplicationStatus = { + ACTIVE: "ACTIVE", + CREATING: "CREATING", + DELETING: "DELETING", + FAILED: "FAILED", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type ApplicationStatus = (typeof ApplicationStatus)[keyof typeof ApplicationStatus]; + +/** + * @public + *

Summary information for an Amazon Q application.

+ */ +export interface Application { + /** + * @public + *

The name of the Amazon Q application.

+ */ + displayName?: string; + + /** + * @public + *

The identifier for the Amazon Q application.

+ */ + applicationId?: string; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The status of the Amazon Q application. The application is ready to use when the + * status is ACTIVE.

+ */ + status?: ApplicationStatus; +} + +/** + * @public + *

You are trying to perform an action that conflicts with the current status of your + * resource. Fix any inconsistences with your resources and try again.

+ */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + * @public + *

The identifier of the resource affected.

+ */ + resourceId: string | undefined; + + /** + * @public + *

The type of the resource affected.

+ */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + } +} + +/** + * @public + * @enum + */ +export const AttachmentsControlMode = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type AttachmentsControlMode = (typeof AttachmentsControlMode)[keyof typeof AttachmentsControlMode]; + +/** + * @public + *

Configuration information for the file upload during chat feature.

+ */ +export interface AttachmentsConfiguration { + /** + * @public + *

Status information about whether file upload functionality is activated or deactivated + * for your end user.

+ */ + attachmentsControlMode: AttachmentsControlMode | undefined; +} + +/** + * @public + *

Provides the identifier of the KMS key used to encrypt data indexed by + * Amazon Q. Amazon Q doesn't support asymmetric keys.

+ */ +export interface EncryptionConfiguration { + /** + * @public + *

The identifier of the KMS key. Amazon Q doesn't support asymmetric + * keys.

+ */ + kmsKeyId?: string; +} + +/** + * @public + *

A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and + * values can consist of Unicode letters, digits, white space, and any of the following + * symbols: _ . : / = + - @.

+ */ +export interface Tag { + /** + * @public + *

The key for the tag. Keys are not case sensitive and must be unique for the + * Amazon Q application or data source.

+ */ + key: string | undefined; + + /** + * @public + *

The value associated with the tag. The value may be an empty string but it can't be + * null.

+ */ + value: string | undefined; +} + +/** + * @public + */ +export interface CreateApplicationRequest { + /** + * @public + *

A name for the Amazon Q application.

+ */ + displayName: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon + * CloudWatch logs and metrics.

+ */ + roleArn: string | undefined; + + /** + * @public + *

A description for the Amazon Q application.

+ */ + description?: string; + + /** + * @public + *

The identifier of the KMS key that is used to encrypt your data. + * Amazon Q doesn't support asymmetric keys.

+ */ + encryptionConfiguration?: EncryptionConfiguration; + + /** + * @public + *

A list of key-value pairs that identify or categorize your Amazon Q application. + * You can also use tags to help control access to the application. Tag keys and values can + * consist of Unicode letters, digits, white space, and any of the following symbols: _ . : + * / = + - @.

+ */ + tags?: Tag[]; + + /** + * @public + *

A token that you provide to identify the request to create your Amazon Q + * application.

+ */ + clientToken?: string; + + /** + * @public + *

An option to allow end users to upload files directly during chat.

+ */ + attachmentsConfiguration?: AttachmentsConfiguration; +} + +/** + * @public + */ +export interface CreateApplicationResponse { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q application.

+ */ + applicationArn?: string; +} + +/** + * @public + *

An issue occurred with the internal server used for your Amazon Q service. Wait + * some minutes and try again, or contact Support for help.

+ */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + } +} + +/** + * @public + *

The resource you want to use doesn’t exist. Make sure you have provided the correct + * resource and try again.

+ */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + * @public + *

The identifier of the resource affected.

+ */ + resourceId: string | undefined; + + /** + * @public + *

The type of the resource affected.

+ */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + } +} + +/** + * @public + *

You have exceeded the set limits for your Amazon Q service.

+ */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + * @public + *

The identifier of the resource affected.

+ */ + resourceId: string | undefined; + + /** + * @public + *

The type of the resource affected.

+ */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + this.resourceId = opts.resourceId; + this.resourceType = opts.resourceType; + } +} + +/** + * @public + *

The request was denied due to throttling. Reduce the number of requests and try + * again.

+ */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + } +} + +/** + * @public + *

The input failed to meet the constraints specified by Amazon Q in a specified + * field.

+ */ +export interface ValidationExceptionField { + /** + * @public + *

The field name where the invalid entry was detected.

+ */ + name: string | undefined; + + /** + * @public + *

A message about the validation exception.

+ */ + message: string | undefined; +} + +/** + * @public + * @enum + */ +export const ValidationExceptionReason = { + CANNOT_PARSE: "CANNOT_PARSE", + FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED", + UNKNOWN_OPERATION: "UNKNOWN_OPERATION", +} as const; + +/** + * @public + */ +export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason]; + +/** + * @public + *

The input doesn't meet the constraints set by the Amazon Q service. Provide the + * correct input and try again.

+ */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + * @public + *

The reason for the ValidationException.

+ */ + reason: ValidationExceptionReason | undefined; + + /** + * @public + *

The input field(s) that failed validation.

+ */ + fields?: ValidationExceptionField[]; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.reason = opts.reason; + this.fields = opts.fields; + } +} + +/** + * @public + */ +export interface DeleteApplicationRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; +} + +/** + * @public + */ +export interface DeleteApplicationResponse {} + +/** + * @public + */ +export interface GetApplicationRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; +} + +/** + * @public + *

Configuration information about the file upload during chat feature for your + * application.

+ */ +export interface AppliedAttachmentsConfiguration { + /** + * @public + *

Information about whether file upload during chat functionality is activated for your + * application.

+ */ + attachmentsControlMode?: AttachmentsControlMode; +} + +/** + * @public + * @enum + */ +export const ErrorCode = { + INTERNAL_ERROR: "InternalError", + INVALID_REQUEST: "InvalidRequest", + RESOURCE_INACTIVE: "ResourceInactive", + RESOURCE_NOT_FOUND: "ResourceNotFound", +} as const; + +/** + * @public + */ +export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode]; + +/** + * @public + *

Provides information about a data source sync error.

+ */ +export interface ErrorDetail { + /** + * @public + *

The message explaining the data source sync error.

+ */ + errorMessage?: string; + + /** + * @public + *

The code associated with the data source sync error.

+ */ + errorCode?: ErrorCode; +} + +/** + * @public + */ +export interface GetApplicationResponse { + /** + * @public + *

The name of the Amazon Q application.

+ */ + displayName?: string; + + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q application.

+ */ + applicationArn?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the IAM with permissions to access + * your CloudWatch logs and metrics.

+ */ + roleArn?: string; + + /** + * @public + *

The status of the Amazon Q application.

+ */ + status?: ApplicationStatus; + + /** + * @public + *

A description for the Amazon Q application.

+ */ + description?: string; + + /** + * @public + *

The identifier of the Amazon Web Services + * KMS key that is used to encrypt your data. Amazon Q doesn't support + * asymmetric keys.

+ */ + encryptionConfiguration?: EncryptionConfiguration; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was last updated.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

If the Status field is set to ERROR, the + * ErrorMessage field contains a description of the error that caused the + * synchronization to fail.

+ */ + error?: ErrorDetail; + + /** + * @public + *

Settings for whether end users can upload files directly during chat.

+ */ + attachmentsConfiguration?: AppliedAttachmentsConfiguration; +} + +/** + * @public + *

Provides information about index capacity configuration.

+ */ +export interface IndexCapacityConfiguration { + /** + * @public + *

The number of storage units configured for an Amazon Q index.

+ */ + units?: number; +} + +/** + * @public + */ +export interface CreateIndexRequest { + /** + * @public + *

The identifier of the Amazon Q application using the index.

+ */ + applicationId: string | undefined; + + /** + * @public + *

A name for the Amazon Q index.

+ */ + displayName: string | undefined; + + /** + * @public + *

A description for the Amazon Q index.

+ */ + description?: string; + + /** + * @public + *

A list of key-value pairs that identify or categorize the index. You can also use tags + * to help control access to the index. Tag keys and values can consist of Unicode letters, + * digits, white space, and any of the following symbols: _ . : / = + - @.

+ */ + tags?: Tag[]; + + /** + * @public + *

The capacity units you want to provision for your index. You can add and remove + * capacity to fit your usage needs.

+ */ + capacityConfiguration?: IndexCapacityConfiguration; + + /** + * @public + *

A token that you provide to identify the request to create an index. Multiple calls to + * the CreateIndex API with the same client token will create only one + * index.

+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface CreateIndexResponse { + /** + * @public + *

The identifier for the Amazon Q index.

+ */ + indexId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of an Amazon Q index.

+ */ + indexArn?: string; +} + +/** + * @public + * @enum + */ +export const DocumentEnrichmentConditionOperator = { + BEGINS_WITH: "BEGINS_WITH", + CONTAINS: "CONTAINS", + EQUALS: "EQUALS", + EXISTS: "EXISTS", + GREATER_THAN: "GREATER_THAN", + GREATER_THAN_OR_EQUALS: "GREATER_THAN_OR_EQUALS", + LESS_THAN: "LESS_THAN", + LESS_THAN_OR_EQUALS: "LESS_THAN_OR_EQUALS", + NOT_CONTAINS: "NOT_CONTAINS", + NOT_EQUALS: "NOT_EQUALS", + NOT_EXISTS: "NOT_EXISTS", +} as const; + +/** + * @public + */ +export type DocumentEnrichmentConditionOperator = + (typeof DocumentEnrichmentConditionOperator)[keyof typeof DocumentEnrichmentConditionOperator]; + +/** + * @public + *

The value of a document attribute. You can only provide one value for a document + * attribute.

+ */ +export type DocumentAttributeValue = + | DocumentAttributeValue.DateValueMember + | DocumentAttributeValue.LongValueMember + | DocumentAttributeValue.StringListValueMember + | DocumentAttributeValue.StringValueMember + | DocumentAttributeValue.$UnknownMember; + +/** + * @public + */ +export namespace DocumentAttributeValue { + /** + * @public + *

A string.

+ */ + export interface StringValueMember { + stringValue: string; + stringListValue?: never; + longValue?: never; + dateValue?: never; + $unknown?: never; + } + + /** + * @public + *

A list of strings.

+ */ + export interface StringListValueMember { + stringValue?: never; + stringListValue: string[]; + longValue?: never; + dateValue?: never; + $unknown?: never; + } + + /** + * @public + *

A long integer value.

+ */ + export interface LongValueMember { + stringValue?: never; + stringListValue?: never; + longValue: number; + dateValue?: never; + $unknown?: never; + } + + /** + * @public + *

A date expressed as an ISO 8601 string.

+ *

It's important for the time zone to be included in the ISO 8601 date-time format. For + * example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 + * at 12:30PM (plus 10 seconds) in Central European Time.

+ */ + export interface DateValueMember { + stringValue?: never; + stringListValue?: never; + longValue?: never; + dateValue: Date; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + stringValue?: never; + stringListValue?: never; + longValue?: never; + dateValue?: never; + $unknown: [string, any]; + } + + export interface Visitor { + stringValue: (value: string) => T; + stringListValue: (value: string[]) => T; + longValue: (value: number) => T; + dateValue: (value: Date) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: DocumentAttributeValue, visitor: Visitor): T => { + if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue); + if (value.stringListValue !== undefined) return visitor.stringListValue(value.stringListValue); + if (value.longValue !== undefined) return visitor.longValue(value.longValue); + if (value.dateValue !== undefined) return visitor.dateValue(value.dateValue); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + *

The condition used for the target document attribute or metadata field when ingesting + * documents into Amazon Q. You use this with + * DocumentAttributeTarget + * to apply the condition.

+ *

For example, you can create the 'Department' target field and have it prefill + * department names associated with the documents based on information in the 'Source_URI' + * field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI + * value, then prefill the target field 'Department' with the target value 'Finance' for + * the document.

+ *

Amazon Q can't create a target field if it has not already been created as an + * index field. After you create your index field, you can create a document metadata field + * using DocumentAttributeTarget. Amazon Q then will map your newly + * created metadata field to your index field.

+ */ +export interface DocumentAttributeCondition { + /** + * @public + *

The identifier of the document attribute used for the condition.

+ *

For example, 'Source_URI' could be an identifier for the attribute or metadata field + * that contains source URIs associated with the documents.

+ *

Amazon Q currently doesn't support _document_body as an attribute + * key used for the condition.

+ */ + key: string | undefined; + + /** + * @public + *

The identifier of the document attribute used for the condition.

+ *

For example, 'Source_URI' could be an identifier for the attribute or metadata field + * that contains source URIs associated with the documents.

+ *

Amazon Kendra currently does not support _document_body as an + * attribute key used for the condition.

+ */ + operator: DocumentEnrichmentConditionOperator | undefined; + + /** + * @public + *

The value of a document attribute. You can only provide one value for a document + * attribute.

+ */ + value?: DocumentAttributeValue; +} + +/** + * @public + * @enum + */ +export const DocumentContentOperator = { + DELETE: "DELETE", +} as const; + +/** + * @public + */ +export type DocumentContentOperator = (typeof DocumentContentOperator)[keyof typeof DocumentContentOperator]; + +/** + * @public + * @enum + */ +export const AttributeValueOperator = { + DELETE: "DELETE", +} as const; + +/** + * @public + */ +export type AttributeValueOperator = (typeof AttributeValueOperator)[keyof typeof AttributeValueOperator]; + +/** + * @public + *

The target document attribute or metadata field you want to alter when ingesting + * documents into Amazon Q.

+ *

For example, you can delete all customer identification numbers associated with the + * documents, stored in the document metadata field called 'Customer_ID' by setting the + * target key as 'Customer_ID' and the deletion flag to TRUE. This removes all + * customer ID values in the field 'Customer_ID'. This would scrub personally identifiable + * information from each document's metadata.

+ *

Amazon Q can't create a target field if it has not already been created as an + * index field. After you create your index field, you can create a document metadata field + * using + * DocumentAttributeTarget + * . Amazon Q + * will then map your newly created document attribute to your index field.

+ *

You can also use this with + * DocumentAttributeCondition + * .

+ */ +export interface DocumentAttributeTarget { + /** + * @public + *

The identifier of the target document attribute or metadata field. For example, + * 'Department' could be an identifier for the target attribute or metadata field that + * includes the department names associated with the documents.

+ */ + key: string | undefined; + + /** + * @public + *

The value of a document attribute. You can only provide one value for a document + * attribute.

+ */ + value?: DocumentAttributeValue; + + /** + * @public + *

+ * TRUE to delete the existing target value for your specified target + * attribute key. You cannot create a target value and set this to + * TRUE.

+ */ + attributeValueOperator?: AttributeValueOperator; +} + +/** + * @public + *

Provides the configuration information for applying basic logic to alter document + * metadata and content when ingesting documents into Amazon Q.

+ *

To apply advanced logic, to go beyond what you can do with basic logic, see + * HookConfiguration + * .

+ *

For more information, see Custom document enrichment.

+ */ +export interface InlineDocumentEnrichmentConfiguration { + /** + * @public + *

The condition used for the target document attribute or metadata field when ingesting + * documents into Amazon Q. You use this with + * DocumentAttributeTarget + * to apply the condition.

+ *

For example, you can create the 'Department' target field and have it prefill + * department names associated with the documents based on information in the 'Source_URI' + * field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI + * value, then prefill the target field 'Department' with the target value 'Finance' for + * the document.

+ *

Amazon Q can't create a target field if it has not already been created as an + * index field. After you create your index field, you can create a document metadata field + * using DocumentAttributeTarget. Amazon Q then will map your newly + * created metadata field to your index field.

+ */ + condition?: DocumentAttributeCondition; + + /** + * @public + *

The target document attribute or metadata field you want to alter when ingesting + * documents into Amazon Q.

+ *

For example, you can delete all customer identification numbers associated with the + * documents, stored in the document metadata field called 'Customer_ID' by setting the + * target key as 'Customer_ID' and the deletion flag to TRUE. This removes all + * customer ID values in the field 'Customer_ID'. This would scrub personally identifiable + * information from each document's metadata.

+ *

Amazon Q can't create a target field if it has not already been created as an + * index field. After you create your index field, you can create a document metadata field + * using + * DocumentAttributeTarget + * . Amazon Q + * will then map your newly created document attribute to your index field.

+ *

You can also use this with + * DocumentAttributeCondition + * .

+ */ + target?: DocumentAttributeTarget; + + /** + * @public + *

+ * TRUE to delete content if the condition used for the target attribute is + * met.

+ */ + documentContentOperator?: DocumentContentOperator; +} + +/** + * @public + *

Provides the configuration information for invoking a Lambda function in + * Lambda to alter document metadata and content when ingesting + * documents into Amazon Q.

+ *

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on + * the original or raw documents.

+ *

If you want to apply advanced alterations on the Amazon Q structured documents, + * you must configure your Lambda function using PostExtractionHookConfiguration.

+ *

You can only invoke one Lambda function. However, this function can invoke + * other functions it requires.

+ *

For more information, see Custom document enrichment.

+ */ +export interface HookConfiguration { + /** + * @public + *

The condition used for when a Lambda function should be invoked.

+ *

For example, you can specify a condition that if there are empty date-time values, + * then Amazon Q should invoke a function that inserts the current date-time.

+ */ + invocationCondition?: DocumentAttributeCondition; + + /** + * @public + *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda + * function during ingestion. For more information, see IAM roles for Custom + * Document Enrichment (CDE).

+ */ + lambdaArn?: string; + + /** + * @public + *

Stores the original, raw documents or the structured, parsed documents before and + * after altering them. For more information, see Data contracts for Lambda functions.

+ */ + s3BucketName?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of a role with permission to run + * PreExtractionHookConfiguration and + * PostExtractionHookConfiguration for altering document metadata and + * content during the document ingestion process.

+ */ + roleArn?: string; +} + +/** + * @public + *

Provides the configuration information for altering document metadata and content + * during the document ingestion process.

+ *

For more information, see Custom document + * enrichment.

+ */ +export interface DocumentEnrichmentConfiguration { + /** + * @public + *

Configuration information to alter document attributes or metadata fields and content + * when ingesting documents into Amazon Q.

+ */ + inlineConfigurations?: InlineDocumentEnrichmentConfiguration[]; + + /** + * @public + *

Provides the configuration information for invoking a Lambda function in + * Lambda to alter document metadata and content when ingesting + * documents into Amazon Q.

+ *

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on + * the original or raw documents.

+ *

If you want to apply advanced alterations on the Amazon Q structured documents, + * you must configure your Lambda function using PostExtractionHookConfiguration.

+ *

You can only invoke one Lambda function. However, this function can invoke + * other functions it requires.

+ *

For more information, see Custom document enrichment.

+ */ + preExtractionHookConfiguration?: HookConfiguration; + + /** + * @public + *

Provides the configuration information for invoking a Lambda function in + * Lambda to alter document metadata and content when ingesting + * documents into Amazon Q.

+ *

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on + * the original or raw documents.

+ *

If you want to apply advanced alterations on the Amazon Q structured documents, + * you must configure your Lambda function using PostExtractionHookConfiguration.

+ *

You can only invoke one Lambda function. However, this function can invoke + * other functions it requires.

+ *

For more information, see Custom document enrichment.

+ */ + postExtractionHookConfiguration?: HookConfiguration; +} + +/** + * @public + *

Provides configuration information needed to connect to an Amazon VPC (Virtual + * Private Cloud).

+ */ +export interface DataSourceVpcConfiguration { + /** + * @public + *

A list of identifiers for subnets within your Amazon VPC. The subnets should + * be able to connect to each other in the VPC, and they should have outgoing access to the + * Internet through a NAT device.

+ */ + subnetIds: string[] | undefined; + + /** + * @public + *

A list of identifiers of security groups within your Amazon VPC. The security + * groups should enable Amazon Q to connect to the data source.

+ */ + securityGroupIds: string[] | undefined; +} + +/** + * @public + */ +export interface CreateDataSourceRequest { + /** + * @public + *

The identifier of the Amazon Q application the data source will be attached + * to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index that you want to use with the data source + * connector.

+ */ + indexId: string | undefined; + + /** + * @public + *

A name for the data source connector.

+ */ + displayName: string | undefined; + + /** + * @public + *

Configuration information to connect to your data source repository. For configuration + * templates for your specific data source, see Supported + * connectors.

+ */ + configuration: __DocumentType | undefined; + + /** + * @public + *

Configuration information for an Amazon VPC (Virtual Private Cloud) to connect + * to your data source. For more information, see Using + * Amazon VPC with Amazon Q connectors.

+ */ + vpcConfiguration?: DataSourceVpcConfiguration; + + /** + * @public + *

A description for the data source connector.

+ */ + description?: string; + + /** + * @public + *

A list of key-value pairs that identify or categorize the data source connector. You + * can also use tags to help control access to the data source connector. Tag keys and + * values can consist of Unicode letters, digits, white space, and any of the following + * symbols: _ . : / = + - @.

+ */ + tags?: Tag[]; + + /** + * @public + *

Sets the frequency for Amazon Q to check the documents in your data source + * repository and update your index. If you don't set a schedule, Amazon Q won't + * periodically update the index.

+ *

Specify a cron- format schedule string or an empty string to indicate + * that the index is updated on demand. You can't specify the Schedule + * parameter when the Type parameter is set to CUSTOM. If you do, + * you receive a ValidationException exception.

+ */ + syncSchedule?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role with permission to access + * the data source and required resources.

+ */ + roleArn?: string; + + /** + * @public + *

A token you provide to identify a request to create a data source connector. Multiple + * calls to the CreateDataSource API with the same client token will create + * only one data source connector.

+ */ + clientToken?: string; + + /** + * @public + *

Provides the configuration information for altering document metadata and content + * during the document ingestion process.

+ *

For more information, see Custom document + * enrichment.

+ */ + documentEnrichmentConfiguration?: DocumentEnrichmentConfiguration; +} + +/** + * @public + */ +export interface CreateDataSourceResponse { + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of a data source in an Amazon Q application. + *

+ */ + dataSourceArn?: string; +} + +/** + * @public + */ +export interface DeleteDataSourceRequest { + /** + * @public + *

The identifier of the Amazon Q application used with the data source + * connector.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index used with the data source connector.

+ */ + indexId: string | undefined; + + /** + * @public + *

The identifier of the data source connector that you want to delete.

+ */ + dataSourceId: string | undefined; +} + +/** + * @public + */ +export interface DeleteDataSourceResponse {} + +/** + * @public + */ +export interface GetDataSourceRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identfier of the index used with the data source connector.

+ */ + indexId: string | undefined; + + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId: string | undefined; +} + +/** + * @public + * @enum + */ +export const DataSourceStatus = { + ACTIVE: "ACTIVE", + CREATING: "CREATING", + DELETING: "DELETING", + FAILED: "FAILED", + PENDING_CREATION: "PENDING_CREATION", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type DataSourceStatus = (typeof DataSourceStatus)[keyof typeof DataSourceStatus]; + +/** + * @public + */ +export interface GetDataSourceResponse { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId?: string; + + /** + * @public + *

The identifier of the index linked to the data source connector.

+ */ + indexId?: string; + + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the data source.

+ */ + dataSourceArn?: string; + + /** + * @public + *

The name for the data source connector.

+ */ + displayName?: string; + + /** + * @public + *

The type of the data source connector. For example, S3.

+ */ + type?: string; + + /** + * @public + *

The details of how the data source connector is configured.

+ */ + configuration?: __DocumentType; + + /** + * @public + *

Configuration information for an Amazon VPC (Virtual Private Cloud) to connect + * to your data source.

+ */ + vpcConfiguration?: DataSourceVpcConfiguration; + + /** + * @public + *

The Unix timestamp when the data source connector was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the data source connector was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The description for the data source connector.

+ */ + description?: string; + + /** + * @public + *

The current status of the data source connector. When the Status field + * value is FAILED, the ErrorMessage field contains a description + * of the error that caused the data source connector to fail.

+ */ + status?: DataSourceStatus; + + /** + * @public + *

The schedule for Amazon Q to update the index.

+ */ + syncSchedule?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the role with permission to access the data source + * and required resources.

+ */ + roleArn?: string; + + /** + * @public + *

When the Status field value is FAILED, the + * ErrorMessage field contains a description of the error that caused the + * data source connector to fail.

+ */ + error?: ErrorDetail; + + /** + * @public + *

Provides the configuration information for altering document metadata and content + * during the document ingestion process.

+ *

For more information, see Custom document + * enrichment.

+ */ + documentEnrichmentConfiguration?: DocumentEnrichmentConfiguration; +} + +/** + * @public + */ +export interface ListDataSourcesRequest { + /** + * @public + *

The identifier of the Amazon Q application linked to the data source + * connectors.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index used with one or more data source connectors.

+ */ + indexId: string | undefined; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of Amazon Q data source + * connectors.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of data source connectors to return.

+ */ + maxResults?: number; +} + +/** + * @public + *

A data source in an Amazon Q application.

+ */ +export interface DataSource { + /** + * @public + *

The name of the Amazon Q data source.

+ */ + displayName?: string; + + /** + * @public + *

The identifier of the Amazon Q data source.

+ */ + dataSourceId?: string; + + /** + * @public + *

The type of the Amazon Q data source.

+ */ + type?: string; + + /** + * @public + *

The Unix timestamp when the Amazon Q data source was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the Amazon Q data source was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The status of the Amazon Q data source.

+ */ + status?: DataSourceStatus; +} + +/** + * @public + */ +export interface ListDataSourcesResponse { + /** + * @public + *

An array of summary information for one or more data source connector.

+ */ + dataSources?: DataSource[]; + + /** + * @public + *

If the response is truncated, Amazon Q returns this token. You can use this token + * in a subsequent request to retrieve the next set of data source connectors.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface UpdateDataSourceRequest { + /** + * @public + *

The identifier of the Amazon Q application the data source is attached + * to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index attached to the data source connector.

+ */ + indexId: string | undefined; + + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId: string | undefined; + + /** + * @public + *

A name of the data source connector.

+ */ + displayName?: string; + + /** + * @public + *

Provides the configuration information for an Amazon Q data source.

+ */ + configuration?: __DocumentType; + + /** + * @public + *

Provides configuration information needed to connect to an Amazon VPC (Virtual + * Private Cloud).

+ */ + vpcConfiguration?: DataSourceVpcConfiguration; + + /** + * @public + *

The description of the data source connector.

+ */ + description?: string; + + /** + * @public + *

The chosen update frequency for your data source.

+ */ + syncSchedule?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role with permission to access + * the data source and required resources.

+ */ + roleArn?: string; + + /** + * @public + *

Provides the configuration information for altering document metadata and content + * during the document ingestion process.

+ *

For more information, see Custom document + * enrichment.

+ */ + documentEnrichmentConfiguration?: DocumentEnrichmentConfiguration; +} + +/** + * @public + */ +export interface UpdateDataSourceResponse {} + +/** + * @public + */ +export interface DeleteIndexRequest { + /** + * @public + *

The identifier of the Amazon Q application the Amazon Q index is linked + * to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q index.

+ */ + indexId: string | undefined; +} + +/** + * @public + */ +export interface DeleteIndexResponse {} + +/** + * @public + */ +export interface GetIndexRequest { + /** + * @public + *

The identifier of the Amazon Q application connected to the index.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q index you want information on.

+ */ + indexId: string | undefined; +} + +/** + * @public + * @enum + */ +export const Status = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type Status = (typeof Status)[keyof typeof Status]; + +/** + * @public + * @enum + */ +export const AttributeType = { + DATE: "DATE", + NUMBER: "NUMBER", + STRING: "STRING", + STRING_LIST: "STRING_LIST", +} as const; + +/** + * @public + */ +export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType]; + +/** + * @public + *

Configuration information for document attributes. Document attributes are metadata or + * fields associated with your documents. For example, the company department name + * associated with each document.

+ *

For more information, see Understanding document attributes.

+ */ +export interface DocumentAttributeConfiguration { + /** + * @public + *

The name of the document attribute.

+ */ + name?: string; + + /** + * @public + *

The type of document attribute.

+ */ + type?: AttributeType; + + /** + * @public + *

Information about whether the document attribute can be used by an end user to search + * for information on their web experience.

+ */ + search?: Status; +} + +/** + * @public + *

Provides information about text documents in an index.

+ */ +export interface TextDocumentStatistics { + /** + * @public + *

The total size, in bytes, of the indexed documents.

+ */ + indexedTextBytes?: number; + + /** + * @public + *

The number of text documents indexed.

+ */ + indexedTextDocumentCount?: number; +} + +/** + * @public + *

Provides information about the number of documents in an index.

+ */ +export interface IndexStatistics { + /** + * @public + *

The number of documents indexed.

+ */ + textDocumentStatistics?: TextDocumentStatistics; +} + +/** + * @public + * @enum + */ +export const IndexStatus = { + ACTIVE: "ACTIVE", + CREATING: "CREATING", + DELETING: "DELETING", + FAILED: "FAILED", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type IndexStatus = (typeof IndexStatus)[keyof typeof IndexStatus]; + +/** + * @public + */ +export interface GetIndexResponse { + /** + * @public + *

The identifier of the Amazon Q application associated with the index.

+ */ + applicationId?: string; + + /** + * @public + *

The identifier of the Amazon Q index.

+ */ + indexId?: string; + + /** + * @public + *

The name of the Amazon Q index.

+ */ + displayName?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q index.

+ */ + indexArn?: string; + + /** + * @public + *

The current status of the index. When the value is ACTIVE, the index is + * ready for use. If the Status field value is FAILED, the + * ErrorMessage field contains a message that explains why.

+ */ + status?: IndexStatus; + + /** + * @public + *

The description for the Amazon Q index.

+ */ + description?: string; + + /** + * @public + *

The Unix timestamp when the Amazon Q index was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the Amazon Q index was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The storage capacity units chosen for your Amazon Q index.

+ */ + capacityConfiguration?: IndexCapacityConfiguration; + + /** + * @public + *

Configuration information for document attributes or metadata. Document metadata are + * fields associated with your documents. For example, the company department name + * associated with each document. For more information, see Understanding document attributes.

+ */ + documentAttributeConfigurations?: DocumentAttributeConfiguration[]; + + /** + * @public + *

When the Status field value is FAILED, the + * ErrorMessage field contains a message that explains why.

+ */ + error?: ErrorDetail; + + /** + * @public + *

Provides information about the number of documents indexed.

+ */ + indexStatistics?: IndexStatistics; +} + +/** + * @public + */ +export interface ListIndicesRequest { + /** + * @public + *

The identifier of the Amazon Q application connected to the index.

+ */ + applicationId: string | undefined; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to retrieve, + * Amazon Q returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of Amazon Q indices.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of indices to return.

+ */ + maxResults?: number; +} + +/** + * @public + *

Summary information for your Amazon Q index.

+ */ +export interface Index { + /** + * @public + *

The name of the index.

+ */ + displayName?: string; + + /** + * @public + *

The identifier for the index.

+ */ + indexId?: string; + + /** + * @public + *

The Unix timestamp when the index was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the index was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The current status of the index. When the status is ACTIVE, the index is + * ready.

+ */ + status?: IndexStatus; +} + +/** + * @public + */ +export interface ListIndicesResponse { + /** + * @public + *

If the response is truncated, Amazon Q returns this token that you can use in the + * subsequent request to retrieve the next set of indexes.

+ */ + nextToken?: string; + + /** + * @public + *

An array of information on the items in one or more indexes.

+ */ + indices?: Index[]; +} + +/** + * @public + */ +export interface UpdateIndexRequest { + /** + * @public + *

The identifier of the Amazon Q application connected to the index.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q index.

+ */ + indexId: string | undefined; + + /** + * @public + *

The name of the Amazon Q index.

+ */ + displayName?: string; + + /** + * @public + *

The description of the Amazon Q index.

+ */ + description?: string; + + /** + * @public + *

The storage capacity units you want to provision for your Amazon Q index. You can + * add and remove capacity to fit your usage needs.

+ */ + capacityConfiguration?: IndexCapacityConfiguration; + + /** + * @public + *

Configuration information for document metadata or fields. Document metadata are + * fields or attributes associated with your documents. For example, the company department + * name associated with each document. For more information, see Understanding document attributes.

+ */ + documentAttributeConfigurations?: DocumentAttributeConfiguration[]; +} + +/** + * @public + */ +export interface UpdateIndexResponse {} + +/** + * @public + */ +export interface ListApplicationsRequest { + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of Amazon Q applications.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of Amazon Q applications to return.

+ */ + maxResults?: number; +} + +/** + * @public + */ +export interface ListApplicationsResponse { + /** + * @public + *

If the response is truncated, Amazon Q returns this token. You can use this token + * in a subsequent request to retrieve the next set of applications.

+ */ + nextToken?: string; + + /** + * @public + *

An array of summary information on the configuration of one or more Amazon Q + * applications.

+ */ + applications?: Application[]; +} + +/** + * @public + *

Information about the basic authentication credentials used to configure a + * plugin.

+ */ +export interface BasicAuthConfiguration { + /** + * @public + *

The ARN of the Secrets Manager secret that stores the basic authentication + * credentials used for plugin configuration..

+ */ + secretArn: string | undefined; + + /** + * @public + *

The ARN of an IAM role used by Amazon Q to access the basic + * authentication credentials stored in a Secrets Manager secret.

+ */ + roleArn: string | undefined; +} + +/** + * @public + *

Information about the OAuth 2.0 authentication credential/token used to configure a + * plugin.

+ */ +export interface OAuth2ClientCredentialConfiguration { + /** + * @public + *

The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token + * used for plugin configuration.

+ */ + secretArn: string | undefined; + + /** + * @public + *

The ARN of an IAM role used by Amazon Q to access the OAuth 2.0 + * authentication credentials stored in a Secrets Manager secret.

+ */ + roleArn: string | undefined; +} + +/** + * @public + *

Authentication configuration information for an Amazon Q plugin.

+ */ +export type PluginAuthConfiguration = + | PluginAuthConfiguration.BasicAuthConfigurationMember + | PluginAuthConfiguration.OAuth2ClientCredentialConfigurationMember + | PluginAuthConfiguration.$UnknownMember; + +/** + * @public + */ +export namespace PluginAuthConfiguration { + /** + * @public + *

Information about the basic authentication credentials used to configure a + * plugin.

+ */ + export interface BasicAuthConfigurationMember { + basicAuthConfiguration: BasicAuthConfiguration; + oAuth2ClientCredentialConfiguration?: never; + $unknown?: never; + } + + /** + * @public + *

Information about the OAuth 2.0 authentication credential/token used to configure a + * plugin.

+ */ + export interface OAuth2ClientCredentialConfigurationMember { + basicAuthConfiguration?: never; + oAuth2ClientCredentialConfiguration: OAuth2ClientCredentialConfiguration; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + basicAuthConfiguration?: never; + oAuth2ClientCredentialConfiguration?: never; + $unknown: [string, any]; + } + + export interface Visitor { + basicAuthConfiguration: (value: BasicAuthConfiguration) => T; + oAuth2ClientCredentialConfiguration: (value: OAuth2ClientCredentialConfiguration) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: PluginAuthConfiguration, visitor: Visitor): T => { + if (value.basicAuthConfiguration !== undefined) return visitor.basicAuthConfiguration(value.basicAuthConfiguration); + if (value.oAuth2ClientCredentialConfiguration !== undefined) + return visitor.oAuth2ClientCredentialConfiguration(value.oAuth2ClientCredentialConfiguration); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface CreatePluginRequest { + /** + * @public + *

The identifier of the application that will contain the plugin.

+ */ + applicationId: string | undefined; + + /** + * @public + *

A the name for your plugin.

+ */ + displayName: string | undefined; + + /** + * @public + *

The type of plugin you want to create.

+ */ + type: PluginType | undefined; + + /** + * @public + *

The source URL used for plugin configuration.

+ */ + serverUrl: string | undefined; + + /** + * @public + *

Authentication configuration information for an Amazon Q plugin.

+ */ + authConfiguration: PluginAuthConfiguration | undefined; + + /** + * @public + *

A list of key-value pairs that identify or categorize the data source connector. You + * can also use tags to help control access to the data source connector. Tag keys and + * values can consist of Unicode letters, digits, white space, and any of the following + * symbols: _ . : / = + - @.

+ */ + tags?: Tag[]; + + /** + * @public + *

A token that you provide to identify the request to create your Amazon Q + * plugin.

+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface CreatePluginResponse { + /** + * @public + *

The identifier of the plugin created.

+ */ + pluginId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of a plugin.

+ */ + pluginArn?: string; +} + +/** + * @public + */ +export interface DeletePluginRequest { + /** + * @public + *

The identifier the application attached to the Amazon Q plugin.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the plugin being deleted.

+ */ + pluginId: string | undefined; +} + +/** + * @public + */ +export interface DeletePluginResponse {} + +/** + * @public + */ +export interface GetPluginRequest { + /** + * @public + *

The identifier of the application which contains the plugin.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the plugin.

+ */ + pluginId: string | undefined; +} + +/** + * @public + * @enum + */ +export const PluginState = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type PluginState = (typeof PluginState)[keyof typeof PluginState]; + +/** + * @public + */ +export interface GetPluginResponse { + /** + * @public + *

The identifier of the application which contains the plugin.

+ */ + applicationId?: string; + + /** + * @public + *

The identifier of the plugin.

+ */ + pluginId?: string; + + /** + * @public + *

The name of the plugin.

+ */ + displayName?: string; + + /** + * @public + *

The type of the plugin.

+ */ + type?: PluginType; + + /** + * @public + *

The source URL used for plugin configuration.

+ */ + serverUrl?: string; + + /** + * @public + *

Authentication configuration information for an Amazon Q plugin.

+ */ + authConfiguration?: PluginAuthConfiguration; + + /** + * @public + *

The Amazon Resource Name (ARN) of the role with permission to access resources needed + * to create the plugin.

+ */ + pluginArn?: string; + + /** + * @public + *

The current state of the plugin.

+ */ + state?: PluginState; + + /** + * @public + *

The timestamp for when the plugin was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The timestamp for when the plugin was last updated.

+ */ + updatedAt?: Date; +} + +/** + * @public + */ +export interface ListPluginsRequest { + /** + * @public + *

The identifier of the application the plugin is attached to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of plugins.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of documents to return.

+ */ + maxResults?: number; +} + +/** + * @public + *

Information about an Amazon Q plugin and its configuration.

+ */ +export interface Plugin { + /** + * @public + *

The identifier of the plugin.

+ */ + pluginId?: string; + + /** + * @public + *

The name of the plugin.

+ */ + displayName?: string; + + /** + * @public + *

The type of the plugin.

+ */ + type?: PluginType; + + /** + * @public + *

The plugin server URL used for configuration.

+ */ + serverUrl?: string; + + /** + * @public + *

The current status of the plugin.

+ */ + state?: PluginState; + + /** + * @public + *

The timestamp for when the plugin was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The timestamp for when the plugin was last updated.

+ */ + updatedAt?: Date; +} + +/** + * @public + */ +export interface ListPluginsResponse { + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of plugins.

+ */ + nextToken?: string; + + /** + * @public + *

Information about a configured plugin.

+ */ + plugins?: Plugin[]; +} + +/** + * @public + */ +export interface UpdatePluginRequest { + /** + * @public + *

The identifier of the application the plugin is attached to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the plugin.

+ */ + pluginId: string | undefined; + + /** + * @public + *

The name of the plugin.

+ */ + displayName?: string; + + /** + * @public + *

The status of the plugin.

+ */ + state?: PluginState; + + /** + * @public + *

The source URL used for plugin configuration.

+ */ + serverUrl?: string; + + /** + * @public + *

The authentication configuration the plugin is using.

+ */ + authConfiguration?: PluginAuthConfiguration; +} + +/** + * @public + */ +export interface UpdatePluginResponse {} + +/** + * @public + *

Stores an Amazon Kendra index as a retriever.

+ */ +export interface KendraIndexConfiguration { + /** + * @public + *

The identifier of the Amazon Kendra index.

+ */ + indexId: string | undefined; +} + +/** + * @public + *

Configuration information for an Amazon Q index.

+ */ +export interface NativeIndexConfiguration { + /** + * @public + *

The identifier for the Amazon Q index.

+ */ + indexId: string | undefined; +} + +/** + * @public + *

Provides information on how the retriever used for your Amazon Q application is + * configured.

+ */ +export type RetrieverConfiguration = + | RetrieverConfiguration.KendraIndexConfigurationMember + | RetrieverConfiguration.NativeIndexConfigurationMember + | RetrieverConfiguration.$UnknownMember; + +/** + * @public + */ +export namespace RetrieverConfiguration { + /** + * @public + *

Provides information on how a Amazon Q index used as a retriever for your + * Amazon Q application is configured.

+ */ + export interface NativeIndexConfigurationMember { + nativeIndexConfiguration: NativeIndexConfiguration; + kendraIndexConfiguration?: never; + $unknown?: never; + } + + /** + * @public + *

Provides information on how the Amazon Kendra index used as a retriever for your + * Amazon Q application is configured.

+ */ + export interface KendraIndexConfigurationMember { + nativeIndexConfiguration?: never; + kendraIndexConfiguration: KendraIndexConfiguration; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + nativeIndexConfiguration?: never; + kendraIndexConfiguration?: never; + $unknown: [string, any]; + } + + export interface Visitor { + nativeIndexConfiguration: (value: NativeIndexConfiguration) => T; + kendraIndexConfiguration: (value: KendraIndexConfiguration) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: RetrieverConfiguration, visitor: Visitor): T => { + if (value.nativeIndexConfiguration !== undefined) + return visitor.nativeIndexConfiguration(value.nativeIndexConfiguration); + if (value.kendraIndexConfiguration !== undefined) + return visitor.kendraIndexConfiguration(value.kendraIndexConfiguration); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const RetrieverType = { + KENDRA_INDEX: "KENDRA_INDEX", + NATIVE_INDEX: "NATIVE_INDEX", +} as const; + +/** + * @public + */ +export type RetrieverType = (typeof RetrieverType)[keyof typeof RetrieverType]; + +/** + * @public + */ +export interface CreateRetrieverRequest { + /** + * @public + *

The identifier of your Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The type of retriever you are using.

+ */ + type: RetrieverType | undefined; + + /** + * @public + *

The name of your retriever.

+ */ + displayName: string | undefined; + + /** + * @public + *

Provides information on how the retriever used for your Amazon Q application is + * configured.

+ */ + configuration: RetrieverConfiguration | undefined; + + /** + * @public + *

The ARN of an IAM role used by Amazon Q to access the basic + * authentication credentials stored in a Secrets Manager secret.

+ */ + roleArn?: string; + + /** + * @public + *

A token that you provide to identify the request to create your Amazon Q + * application retriever.

+ */ + clientToken?: string; + + /** + * @public + *

A list of key-value pairs that identify or categorize the retriever. You can also use + * tags to help control access to the retriever. Tag keys and values can consist of Unicode + * letters, digits, white space, and any of the following symbols: _ . : / = + - @.

+ */ + tags?: Tag[]; +} + +/** + * @public + */ +export interface CreateRetrieverResponse { + /** + * @public + *

The identifier of the retriever you are using.

+ */ + retrieverId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role associated with a retriever.

+ */ + retrieverArn?: string; +} + +/** + * @public + */ +export interface DeleteRetrieverRequest { + /** + * @public + *

The identifier of the Amazon Q application using the retriever.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the retriever being deleted.

+ */ + retrieverId: string | undefined; +} + +/** + * @public + */ +export interface DeleteRetrieverResponse {} + +/** + * @public + */ +export interface GetRetrieverRequest { + /** + * @public + *

The identifier of the Amazon Q application using the retriever.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the retriever.

+ */ + retrieverId: string | undefined; +} + +/** + * @public + * @enum + */ +export const RetrieverStatus = { + ACTIVE: "ACTIVE", + CREATING: "CREATING", + FAILED: "FAILED", +} as const; + +/** + * @public + */ +export type RetrieverStatus = (typeof RetrieverStatus)[keyof typeof RetrieverStatus]; + +/** + * @public + */ +export interface GetRetrieverResponse { + /** + * @public + *

The identifier of the Amazon Q application using the retriever.

+ */ + applicationId?: string; + + /** + * @public + *

The identifier of the retriever.

+ */ + retrieverId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the IAM role associated with the retriever.

+ */ + retrieverArn?: string; + + /** + * @public + *

The type of the retriever.

+ */ + type?: RetrieverType; + + /** + * @public + *

The status of the retriever.

+ */ + status?: RetrieverStatus; + + /** + * @public + *

The name of the retriever.

+ */ + displayName?: string; + + /** + * @public + *

Provides information on how the retriever used for your Amazon Q application is + * configured.

+ */ + configuration?: RetrieverConfiguration; + + /** + * @public + *

The Amazon Resource Name (ARN) of the role with the permission to access the retriever + * and required resources.

+ */ + roleArn?: string; + + /** + * @public + *

The Unix timestamp when the retriever was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the retriever was last updated.

+ */ + updatedAt?: Date; +} + +/** + * @public + */ +export interface ListRetrieversRequest { + /** + * @public + *

The identifier of the Amazon Q application using the retriever.

+ */ + applicationId: string | undefined; + + /** + * @public + *

If the number of retrievers returned exceeds maxResults, Amazon Q + * returns a next token as a pagination token to retrieve the next set of + * retrievers.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of retrievers returned.

+ */ + maxResults?: number; +} + +/** + * @public + *

Summary information for the retriever used for your Amazon Q application.

+ */ +export interface Retriever { + /** + * @public + *

The identifier of the Amazon Q application using the retriever.

+ */ + applicationId?: string; + + /** + * @public + *

The identifier of the retriever used by your Amazon Q application.

+ */ + retrieverId?: string; + + /** + * @public + *

The type of your retriever.

+ */ + type?: RetrieverType; + + /** + * @public + *

The status of your retriever.

+ */ + status?: RetrieverStatus; + + /** + * @public + *

The name of your retriever.

+ */ + displayName?: string; +} + +/** + * @public + */ +export interface ListRetrieversResponse { + /** + * @public + *

An array of summary information for one or more retrievers.

+ */ + retrievers?: Retriever[]; + + /** + * @public + *

If the response is truncated, Amazon Q returns this token, which you can use in a + * later request to list the next set of retrievers.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface UpdateRetrieverRequest { + /** + * @public + *

The identifier of your Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of your retriever.

+ */ + retrieverId: string | undefined; + + /** + * @public + *

Provides information on how the retriever used for your Amazon Q application is + * configured.

+ */ + configuration?: RetrieverConfiguration; + + /** + * @public + *

The name of your retriever.

+ */ + displayName?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role with permission to access the retriever + * and required resources.

+ */ + roleArn?: string; +} + +/** + * @public + */ +export interface UpdateRetrieverResponse {} + +/** + * @public + */ +export interface UpdateApplicationRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

A name for the Amazon Q application.

+ */ + displayName?: string; + + /** + * @public + *

A description for the Amazon Q application.

+ */ + description?: string; + + /** + * @public + *

An Amazon Web Services Identity and Access Management (IAM) role that + * gives Amazon Q permission to access Amazon CloudWatch logs and + * metrics.

+ */ + roleArn?: string; + + /** + * @public + *

An option to allow end users to upload files directly during chat.

+ */ + attachmentsConfiguration?: AttachmentsConfiguration; +} + +/** + * @public + */ +export interface UpdateApplicationResponse {} + +/** + * @public + * @enum + */ +export const WebExperienceSamplePromptsControlMode = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type WebExperienceSamplePromptsControlMode = + (typeof WebExperienceSamplePromptsControlMode)[keyof typeof WebExperienceSamplePromptsControlMode]; + +/** + * @public + */ +export interface CreateWebExperienceRequest { + /** + * @public + *

The identifier of the Amazon Q web experience.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The title for your Amazon Q web experience.

+ */ + title?: string; + + /** + * @public + *

A subtitle to personalize your Amazon Q web experience.

+ */ + subtitle?: string; + + /** + * @public + *

The customized welcome message for end users of an Amazon Q web + * experience.

+ */ + welcomeMessage?: string; + + /** + * @public + *

Determines whether sample prompts are enabled in the web experience for an end + * user.

+ */ + samplePromptsControlMode?: WebExperienceSamplePromptsControlMode; + + /** + * @public + *

A list of key-value pairs that identify or categorize your Amazon Q web + * experience. You can also use tags to help control access to the web experience. Tag keys + * and values can consist of Unicode letters, digits, white space, and any of the following + * symbols: _ . : / = + - @.

+ */ + tags?: Tag[]; + + /** + * @public + *

A token you provide to identify a request to create an Amazon Q web experience. + *

+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface CreateWebExperienceResponse { + /** + * @public + *

The identifier of the Amazon Q web experience.

+ */ + webExperienceId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of an Amazon Q web experience.

+ */ + webExperienceArn?: string; +} + +/** + * @public + */ +export interface DeleteWebExperienceRequest { + /** + * @public + *

The identifier of the Amazon Q application linked to the Amazon Q web + * experience.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q web experience being deleted.

+ */ + webExperienceId: string | undefined; +} + +/** + * @public + */ +export interface DeleteWebExperienceResponse {} + +/** + * @public + */ +export interface GetWebExperienceRequest { + /** + * @public + *

The identifier of the Amazon Q application linked to the web experience.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q web experience.

+ */ + webExperienceId: string | undefined; +} + +/** + * @public + *

Provides the SAML 2.0 compliant identity provider (IdP) configuration information + * Amazon Q needs to deploy a Amazon Q web experience.

+ */ +export interface SamlConfiguration { + /** + * @public + *

The metadata XML that your IdP generated.

+ */ + metadataXML: string | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role assumed by users when + * they authenticate into their Amazon Q web experience, containing the relevant + * Amazon Q permissions for conversing with Amazon Q.

+ */ + roleArn: string | undefined; + + /** + * @public + *

The user attribute name in your IdP that maps to the user email.

+ */ + userIdAttribute: string | undefined; + + /** + * @public + *

The group attribute name in your IdP that maps to user groups.

+ */ + userGroupAttribute?: string; +} + +/** + * @public + *

Provides the authorization configuration information needed to deploy a Amazon Q + * web experience to end users.

+ */ +export type WebExperienceAuthConfiguration = + | WebExperienceAuthConfiguration.SamlConfigurationMember + | WebExperienceAuthConfiguration.$UnknownMember; + +/** + * @public + */ +export namespace WebExperienceAuthConfiguration { + /** + * @public + *

Provides the SAML 2.0 compliant identity provider (IdP) configuration information + * Amazon Q needs to deploy a Amazon Q web experience.

+ */ + export interface SamlConfigurationMember { + samlConfiguration: SamlConfiguration; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + samlConfiguration?: never; + $unknown: [string, any]; + } + + export interface Visitor { + samlConfiguration: (value: SamlConfiguration) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: WebExperienceAuthConfiguration, visitor: Visitor): T => { + if (value.samlConfiguration !== undefined) return visitor.samlConfiguration(value.samlConfiguration); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const WebExperienceStatus = { + ACTIVE: "ACTIVE", + CREATING: "CREATING", + DELETING: "DELETING", + FAILED: "FAILED", + PENDING_AUTH_CONFIG: "PENDING_AUTH_CONFIG", +} as const; + +/** + * @public + */ +export type WebExperienceStatus = (typeof WebExperienceStatus)[keyof typeof WebExperienceStatus]; + +/** + * @public + */ +export interface GetWebExperienceResponse { + /** + * @public + *

The identifier of the Amazon Q application linked to the web experience.

+ */ + applicationId?: string; + + /** + * @public + *

The identifier of the Amazon Q web experience.

+ */ + webExperienceId?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the role with the permission to access the + * Amazon Q web experience and required resources.

+ */ + webExperienceArn?: string; + + /** + * @public + *

The endpoint of your Amazon Q web experience.

+ */ + defaultEndpoint?: string; + + /** + * @public + *

The current status of the Amazon Q web experience. When the Status + * field value is FAILED, the ErrorMessage field contains a + * description of the error that caused the data source connector to fail.

+ */ + status?: WebExperienceStatus; + + /** + * @public + *

The Unix timestamp when the retriever was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when the data source connector was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The title for your Amazon Q web experience.

+ */ + title?: string; + + /** + * @public + *

The subtitle for your Amazon Q web experience.

+ */ + subtitle?: string; + + /** + * @public + *

The customized welcome message for end users of an Amazon Q web + * experience.

+ */ + welcomeMessage?: string; + + /** + * @public + *

Determines whether sample prompts are enabled in the web experience for an end + * user.

+ */ + samplePromptsControlMode?: WebExperienceSamplePromptsControlMode; + + /** + * @public + *

The authentication configuration information for your Amazon Q web + * experience.

+ */ + authenticationConfiguration?: WebExperienceAuthConfiguration; + + /** + * @public + *

When the Status field value is FAILED, the + * ErrorMessage field contains a description of the error that caused the + * data source connector to fail.

+ */ + error?: ErrorDetail; +} + +/** + * @public + */ +export interface ListWebExperiencesRequest { + /** + * @public + *

The identifier of the Amazon Q application linked to the listed web + * experiences.

+ */ + applicationId: string | undefined; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of Amazon Q conversations.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of Amazon Q Web Experiences to return.

+ */ + maxResults?: number; +} + +/** + * @public + *

Provides information for an Amazon Q web experience.

+ */ +export interface WebExperience { + /** + * @public + *

The identifier of your Amazon Q web experience.

+ */ + webExperienceId?: string; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was last updated.

+ */ + createdAt?: Date; + + /** + * @public + *

The Unix timestamp when your Amazon Q web experience was updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

The endpoint URLs for your Amazon Q web experience. The URLs are unique and fully + * hosted by Amazon Web Services.

+ */ + defaultEndpoint?: string; + + /** + * @public + *

The status of your Amazon Q web experience.

+ */ + status?: WebExperienceStatus; +} + +/** + * @public + */ +export interface ListWebExperiencesResponse { + /** + * @public + *

An array of summary information for one or more Amazon Q experiences.

+ */ + webExperiences?: WebExperience[]; + + /** + * @public + *

If the response is truncated, Amazon Q returns this token, which you can use in a + * later request to list the next set of messages.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface UpdateWebExperienceRequest { + /** + * @public + *

The identifier of the Amazon Q application attached to the web experience.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q web experience.

+ */ + webExperienceId: string | undefined; + + /** + * @public + *

The authentication configuration of the Amazon Q web experience.

+ */ + authenticationConfiguration?: WebExperienceAuthConfiguration; + + /** + * @public + *

The title of the Amazon Q web experience.

+ */ + title?: string; + + /** + * @public + *

The subtitle of the Amazon Q web experience.

+ */ + subtitle?: string; + + /** + * @public + *

A customized welcome message for an end user in an Amazon Q web + * experience.

+ */ + welcomeMessage?: string; + + /** + * @public + *

Determines whether sample prompts are enabled in the web experience for an end + * user.

+ */ + samplePromptsControlMode?: WebExperienceSamplePromptsControlMode; +} + +/** + * @public + */ +export interface UpdateWebExperienceResponse {} + +/** + * @public + *

A file directly uploaded into a web experience chat.

+ */ +export interface AttachmentInput { + /** + * @public + *

The name of the file.

+ */ + name: string | undefined; + + /** + * @public + *

The data contained within the uploaded file.

+ */ + data: Uint8Array | undefined; +} + +/** + * @public + * @enum + */ +export const AttachmentStatus = { + FAILED: "FAILED", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type AttachmentStatus = (typeof AttachmentStatus)[keyof typeof AttachmentStatus]; + +/** + * @public + *

The details of a file uploaded during chat.

+ */ +export interface AttachmentOutput { + /** + * @public + *

The name of a file uploaded during chat.

+ */ + name?: string; + + /** + * @public + *

The status of a file uploaded during chat.

+ */ + status?: AttachmentStatus; + + /** + * @public + *

An error associated with a file uploaded during chat.

+ */ + error?: ErrorDetail; +} + +/** + * @public + *

A document attribute or metadata field.

+ */ +export interface DocumentAttribute { + /** + * @public + *

The identifier for the attribute.

+ */ + name: string | undefined; + + /** + * @public + *

The value of the attribute.

+ */ + value: DocumentAttributeValue | undefined; +} + +/** + * @public + *

A document deleted from an Amazon Q data source connector.

+ */ +export interface DeleteDocument { + /** + * @public + *

The identifier of the deleted document.

+ */ + documentId: string | undefined; +} + +/** + * @public + */ +export interface BatchDeleteDocumentRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q index that contains the documents to + * delete.

+ */ + indexId: string | undefined; + + /** + * @public + *

Documents deleted from the Amazon Q index.

+ */ + documents: DeleteDocument[] | undefined; + + /** + * @public + *

The identifier of the data source sync during which the documents were deleted.

+ */ + dataSourceSyncId?: string; +} + +/** + * @public + *

A list of documents that could not be removed from an Amazon Q index. Each entry + * contains an error message that indicates why the document couldn't be removed from the + * index.

+ */ +export interface FailedDocument { + /** + * @public + *

The identifier of the document that couldn't be removed from the Amazon Q + * index.

+ */ + id?: string; + + /** + * @public + *

An explanation for why the document couldn't be removed from the index.

+ */ + error?: ErrorDetail; + + /** + * @public + *

The identifier of the Amazon Q data source connector that contains the failed + * document.

+ */ + dataSourceId?: string; +} + +/** + * @public + */ +export interface BatchDeleteDocumentResponse { + /** + * @public + *

A list of documents that couldn't be removed from the Amazon Q index. Each entry + * contains an error message that indicates why the document couldn't be removed from the + * index.

+ */ + failedDocuments?: FailedDocument[]; +} + +/** + * @public + *

Information required for Amazon Q to find a specific file in an Amazon S3 + * bucket.

+ */ +export interface S3 { + /** + * @public + *

The name of the S3 bucket that contains the file.

+ */ + bucket: string | undefined; + + /** + * @public + *

The name of the file.

+ */ + key: string | undefined; +} + +/** + * @public + *

The contents of a document.

+ */ +export type DocumentContent = DocumentContent.BlobMember | DocumentContent.S3Member | DocumentContent.$UnknownMember; + +/** + * @public + */ +export namespace DocumentContent { + /** + * @public + *

The contents of the document. Documents passed to the blob parameter must + * be base64 encoded. Your code might not need to encode the document file bytes if you're + * using an Amazon Web Services SDK to call Amazon Q APIs. If you are calling the + * Amazon Q endpoint directly using REST, you must base64 encode the contents before + * sending.

+ */ + export interface BlobMember { + blob: Uint8Array; + s3?: never; + $unknown?: never; + } + + /** + * @public + *

The path to the document in an Amazon S3 bucket.

+ */ + export interface S3Member { + blob?: never; + s3: S3; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + blob?: never; + s3?: never; + $unknown: [string, any]; + } + + export interface Visitor { + blob: (value: Uint8Array) => T; + s3: (value: S3) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: DocumentContent, visitor: Visitor): T => { + if (value.blob !== undefined) return visitor.blob(value.blob); + if (value.s3 !== undefined) return visitor.s3(value.s3); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const ContentType = { + CSV: "CSV", + HTML: "HTML", + JSON: "JSON", + MD: "MD", + MS_EXCEL: "MS_EXCEL", + MS_WORD: "MS_WORD", + PDF: "PDF", + PLAIN_TEXT: "PLAIN_TEXT", + PPT: "PPT", + RTF: "RTF", + XML: "XML", + XSLT: "XSLT", +} as const; + +/** + * @public + */ +export type ContentType = (typeof ContentType)[keyof typeof ContentType]; + +/** + * @public + *

A document in an Amazon Q application.

+ */ +export interface Document { + /** + * @public + *

The identifier of the document.

+ */ + id: string | undefined; + + /** + * @public + *

Custom attributes to apply to the document for refining Amazon Q web experience + * responses.

+ */ + attributes?: DocumentAttribute[]; + + /** + * @public + *

The contents of the document.

+ */ + content?: DocumentContent; + + /** + * @public + *

The file type of the document in the Blob field.

+ *

If you want to index snippets or subsets of HTML documents instead of the entirety of + * the HTML documents, you add the HTML start and closing tags + * (<HTML>content</HTML>) around the content.

+ */ + contentType?: ContentType; + + /** + * @public + *

The title of the document.

+ */ + title?: string; + + /** + * @public + *

Configuration information for access permission to a document.

+ */ + accessConfiguration?: AccessConfiguration; + + /** + * @public + *

The configuration information for altering document metadata and content during the + * document ingestion process.

+ */ + documentEnrichmentConfiguration?: DocumentEnrichmentConfiguration; +} + +/** + * @public + */ +export interface BatchPutDocumentRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q index to add the documents to.

+ */ + indexId: string | undefined; + + /** + * @public + *

One or more documents to add to the index.

+ */ + documents: Document[] | undefined; + + /** + * @public + *

The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 + * bucket.

+ */ + roleArn?: string; + + /** + * @public + *

The identifier of the data source sync during which the documents were added.

+ */ + dataSourceSyncId?: string; +} + +/** + * @public + */ +export interface BatchPutDocumentResponse { + /** + * @public + *

A list of documents that were not added to the Amazon Q index because the + * document failed a validation check. Each document contains an error message that + * indicates why the document couldn't be added to the index.

+ */ + failedDocuments?: FailedDocument[]; +} + +/** + * @public + *

Provides information about the phrases blocked from chat by your chat control + * configuration.

+ */ +export interface BlockedPhrasesConfiguration { + /** + * @public + *

A list of phrases blocked from a Amazon Q web experience chat.

+ */ + blockedPhrases?: string[]; + + /** + * @public + *

The configured custom message displayed to an end user informing them that they've + * used a blocked phrase during chat.

+ */ + systemMessageOverride?: string; +} + +/** + * @public + *

Updates a blocked phrases configuration in your Amazon Q application.

+ */ +export interface BlockedPhrasesConfigurationUpdate { + /** + * @public + *

Creates or updates a blocked phrases configuration in your Amazon Q + * application.

+ */ + blockedPhrasesToCreateOrUpdate?: string[]; + + /** + * @public + *

Deletes a blocked phrases configuration in your Amazon Q application.

+ */ + blockedPhrasesToDelete?: string[]; + + /** + * @public + *

The configured custom message displayed to your end user when they use blocked phrase + * during chat.

+ */ + systemMessageOverride?: string; +} + +/** + * @public + *

Provides information about a text extract in a chat response that can be attributed to + * a source document.

+ */ +export interface TextSegment { + /** + * @public + *

The zero-based location in the response string where the source attribution + * starts.

+ */ + beginOffset?: number; + + /** + * @public + *

The zero-based location in the response string where the source attribution + * ends.

+ */ + endOffset?: number; +} + +/** + * @public + *

The documents used to generate an Amazon Q web experience response.

+ */ +export interface SourceAttribution { + /** + * @public + *

The title of the document which is the source for the Amazon Q generated + * response.

+ */ + title?: string; + + /** + * @public + *

The content extract from the document on which the generated response is based. + *

+ */ + snippet?: string; + + /** + * @public + *

The URL of the document which is the source for the Amazon Q generated response. + *

+ */ + url?: string; + + /** + * @public + *

The number attached to a citation in an Amazon Q generated response.

+ */ + citationNumber?: number; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was last updated.

+ */ + updatedAt?: Date; + + /** + * @public + *

A text extract from a source document that is used for source attribution.

+ */ + textMessageSegments?: TextSegment[]; +} + +/** + * @public + */ +export interface ChatSyncOutput { + /** + * @public + *

The identifier of the Amazon Q conversation.

+ */ + conversationId?: string; + + /** + * @public + *

An AI-generated message in a conversation.

+ */ + systemMessage?: string; + + /** + * @public + *

The identifier of an Amazon Q AI generated message within the + * conversation.

+ */ + systemMessageId?: string; + + /** + * @public + *

The identifier of an Amazon Q end user text input message within the + * conversation.

+ */ + userMessageId?: string; + + /** + * @public + *

A request from Amazon Q to the end user for information Amazon Q needs to + * successfully complete a requested plugin action.

+ */ + actionReview?: ActionReview; + + /** + * @public + *

The source documents used to generate the conversation response.

+ */ + sourceAttributions?: SourceAttribution[]; + + /** + * @public + *

A list of files which failed to upload during chat.

+ */ + failedAttachments?: AttachmentOutput[]; +} + +/** + * @public + *

You don't have permissions to perform the action because your license is inactive. Ask + * your admin to activate your license and try again after your licence is active.

+ */ +export class LicenseNotFoundException extends __BaseException { + readonly name: "LicenseNotFoundException" = "LicenseNotFoundException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "LicenseNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, LicenseNotFoundException.prototype); + } +} + +/** + * @public + *

A rule for configuring how Amazon Q responds when it encounters a a blocked + * topic. You can configure a custom message to inform your end users that they have asked + * about a restricted topic and suggest any next steps they should take.

+ */ +export interface ContentBlockerRule { + /** + * @public + *

The configured custom message displayed to an end user informing them that they've + * used a blocked phrase during chat.

+ */ + systemMessageOverride?: string; +} + +/** + * @public + *

The identifier of the data source Amazon Q will generate responses from.

+ */ +export interface EligibleDataSource { + /** + * @public + *

The identifier of the index the data source is attached to.

+ */ + indexId?: string; + + /** + * @public + *

The identifier of the data source.

+ */ + dataSourceId?: string; +} + +/** + * @public + *

Rules for retrieving content from data sources connected to a Amazon Q + * application for a specific topic control configuration.

+ */ +export interface ContentRetrievalRule { + /** + * @public + *

Specifies data sources in a Amazon Q application to use for content + * generation.

+ */ + eligibleDataSources?: EligibleDataSource[]; +} + +/** + * @public + *

A conversation in an Amazon Q application.

+ */ +export interface Conversation { + /** + * @public + *

The identifier of the Amazon Q conversation.

+ */ + conversationId?: string; + + /** + * @public + *

The title of the conversation.

+ */ + title?: string; + + /** + * @public + *

The start time of the conversation.

+ */ + startTime?: Date; +} + +/** + * @public + *

Aliases attached to a user id within an Amazon Q application.

+ */ +export interface UserAlias { + /** + * @public + *

The identifier of the index that the user aliases are associated with.

+ */ + indexId?: string; + + /** + * @public + *

The identifier of the data source that the user aliases are associated with.

+ */ + dataSourceId?: string; + + /** + * @public + *

The identifier of the user id associated with the user aliases.

+ */ + userId: string | undefined; +} + +/** + * @public + */ +export interface CreateUserRequest { + /** + * @public + *

The identifier of the application for which the user mapping will be created.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The user emails attached to a user mapping.

+ */ + userId: string | undefined; + + /** + * @public + *

The list of user aliases in the mapping.

+ */ + userAliases?: UserAlias[]; + + /** + * @public + *

A token that you provide to identify the request to create your Amazon Q user + * mapping.

+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface CreateUserResponse {} + +/** + * @public + *

Maps a batch delete document request to a specific Amazon Q data source connector + * sync job.

+ */ +export interface DataSourceSyncJobMetrics { + /** + * @public + *

The current count of documents added from the data source during the data source + * sync.

+ */ + documentsAdded?: string; + + /** + * @public + *

The current count of documents modified in the data source during the data source + * sync.

+ */ + documentsModified?: string; + + /** + * @public + *

The current count of documents deleted from the data source during the data source + * sync.

+ */ + documentsDeleted?: string; + + /** + * @public + *

The current count of documents that failed to sync from the data source during the + * data source sync.

+ */ + documentsFailed?: string; + + /** + * @public + *

The current count of documents crawled by the ongoing sync job in the data + * source.

+ */ + documentsScanned?: string; +} + +/** + * @public + * @enum + */ +export const DataSourceSyncJobStatus = { + ABORTED: "ABORTED", + FAILED: "FAILED", + INCOMPLETE: "INCOMPLETE", + STOPPING: "STOPPING", + SUCCEEDED: "SUCCEEDED", + SYNCING: "SYNCING", + SYNCING_INDEXING: "SYNCING_INDEXING", +} as const; + +/** + * @public + */ +export type DataSourceSyncJobStatus = (typeof DataSourceSyncJobStatus)[keyof typeof DataSourceSyncJobStatus]; + +/** + * @public + *

Provides information about an Amazon Q data source connector synchronization + * job.

+ */ +export interface DataSourceSyncJob { + /** + * @public + *

The identifier of a data source synchronization job.

+ */ + executionId?: string; + + /** + * @public + *

The Unix time stamp when the data source synchronization job started.

+ */ + startTime?: Date; + + /** + * @public + *

The Unix timestamp when the synchronization job completed.

+ */ + endTime?: Date; + + /** + * @public + *

The status of the synchronization job. When the Status field is set to + * SUCCEEDED, the synchronization job is done. If the status code is + * FAILED, the ErrorCode and ErrorMessage fields + * give you the reason for the failure.

+ */ + status?: DataSourceSyncJobStatus; + + /** + * @public + *

If the Status field is set to FAILED, the + * ErrorCode field indicates the reason the synchronization failed.

+ */ + error?: ErrorDetail; + + /** + * @public + *

If the reason that the synchronization failed is due to an error with the underlying + * data source, this field contains a code that identifies the error.

+ */ + dataSourceErrorCode?: string; + + /** + * @public + *

Maps a batch delete document request to a specific data source sync job. This is + * optional and should only be supplied when documents are deleted by a data source + * connector.

+ */ + metrics?: DataSourceSyncJobMetrics; +} + +/** + * @public + */ +export interface DeleteChatControlsConfigurationRequest { + /** + * @public + *

The identifier of the application the chat controls have been configured for.

+ */ + applicationId: string | undefined; +} + +/** + * @public + */ +export interface DeleteChatControlsConfigurationResponse {} + +/** + * @public + */ +export interface DeleteConversationRequest { + /** + * @public + *

The identifier of the Amazon Q web experience conversation being deleted.

+ */ + conversationId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q application associated with the + * conversation.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the user who is deleting the conversation.

+ */ + userId: string | undefined; +} + +/** + * @public + */ +export interface DeleteConversationResponse {} + +/** + * @public + */ +export interface DeleteGroupRequest { + /** + * @public + *

The identifier of the application in which the group mapping belongs.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index you want to delete the group from.

+ */ + indexId: string | undefined; + + /** + * @public + *

The name of the group you want to delete.

+ */ + groupName: string | undefined; + + /** + * @public + *

The identifier of the data source linked to the group

+ *

A group can be tied to multiple data sources. You can delete a group from accessing + * documents in a certain data source. For example, the groups "Research", "Engineering", + * and "Sales and Marketing" are all tied to the company's documents stored in the data + * sources Confluence and Salesforce. You want to delete "Research" and "Engineering" + * groups from Salesforce, so that these groups cannot access customer-related documents + * stored in Salesforce. Only "Sales and Marketing" should access documents in the + * Salesforce data source.

+ */ + dataSourceId?: string; +} + +/** + * @public + */ +export interface DeleteGroupResponse {} + +/** + * @public + */ +export interface DeleteUserRequest { + /** + * @public + *

The identifier of the application from which the user is being deleted.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The user email being deleted.

+ */ + userId: string | undefined; +} + +/** + * @public + */ +export interface DeleteUserResponse {} + +/** + * @public + * @enum + */ +export const DocumentStatus = { + DELETED: "DELETED", + DELETING: "DELETING", + DOCUMENT_FAILED_TO_INDEX: "DOCUMENT_FAILED_TO_INDEX", + FAILED: "FAILED", + INDEXED: "INDEXED", + PROCESSING: "PROCESSING", + RECEIVED: "RECEIVED", + UPDATED: "UPDATED", +} as const; + +/** + * @public + */ +export type DocumentStatus = (typeof DocumentStatus)[keyof typeof DocumentStatus]; + +/** + * @public + *

The details of a document within an Amazon Q index.

+ */ +export interface DocumentDetails { + /** + * @public + *

The identifier of the document.

+ */ + documentId?: string; + + /** + * @public + *

The current status of the document.

+ */ + status?: DocumentStatus; + + /** + * @public + *

An error message associated with the document.

+ */ + error?: ErrorDetail; + + /** + * @public + *

The timestamp for when the document was created.

+ */ + createdAt?: Date; + + /** + * @public + *

The timestamp for when the document was last updated.

+ */ + updatedAt?: Date; +} + +/** + * @public + */ +export interface GetChatControlsConfigurationRequest { + /** + * @public + *

The identifier of the application for which the chat controls are configured.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The maximum number of configured chat controls to return.

+ */ + maxResults?: number; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of Amazon Q chat controls + * configured.

+ */ + nextToken?: string; +} + +/** + * @public + * @enum + */ +export const ResponseScope = { + ENTERPRISE_CONTENT_ONLY: "ENTERPRISE_CONTENT_ONLY", + EXTENDED_KNOWLEDGE_ENABLED: "EXTENDED_KNOWLEDGE_ENABLED", +} as const; + +/** + * @public + */ +export type ResponseScope = (typeof ResponseScope)[keyof typeof ResponseScope]; + +/** + * @public + *

Provides information about users and groups associated with a topic control + * rule.

+ */ +export interface UsersAndGroups { + /** + * @public + *

The user ids associated with a topic control rule.

+ */ + userIds?: string[]; + + /** + * @public + *

The user groups associated with a topic control rule.

+ */ + userGroups?: string[]; +} + +/** + * @public + *

Provides configuration information about a rule.

+ */ +export type RuleConfiguration = + | RuleConfiguration.ContentBlockerRuleMember + | RuleConfiguration.ContentRetrievalRuleMember + | RuleConfiguration.$UnknownMember; + +/** + * @public + */ +export namespace RuleConfiguration { + /** + * @public + *

A rule for configuring how Amazon Q responds when it encounters a a blocked + * topic.

+ */ + export interface ContentBlockerRuleMember { + contentBlockerRule: ContentBlockerRule; + contentRetrievalRule?: never; + $unknown?: never; + } + + /** + * @public + *

Rules for retrieving content from data sources connected to a Amazon Q + * application for a specific topic control configuration.

+ */ + export interface ContentRetrievalRuleMember { + contentBlockerRule?: never; + contentRetrievalRule: ContentRetrievalRule; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + contentBlockerRule?: never; + contentRetrievalRule?: never; + $unknown: [string, any]; + } + + export interface Visitor { + contentBlockerRule: (value: ContentBlockerRule) => T; + contentRetrievalRule: (value: ContentRetrievalRule) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: RuleConfiguration, visitor: Visitor): T => { + if (value.contentBlockerRule !== undefined) return visitor.contentBlockerRule(value.contentBlockerRule); + if (value.contentRetrievalRule !== undefined) return visitor.contentRetrievalRule(value.contentRetrievalRule); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const RuleType = { + CONTENT_BLOCKER_RULE: "CONTENT_BLOCKER_RULE", + CONTENT_RETRIEVAL_RULE: "CONTENT_RETRIEVAL_RULE", +} as const; + +/** + * @public + */ +export type RuleType = (typeof RuleType)[keyof typeof RuleType]; + +/** + * @public + *

Guardrail rules for an Amazon Q application. Amazon Q supports only one rule + * at a time.

+ */ +export interface Rule { + /** + * @public + *

Users and groups to be included in a rule.

+ */ + includedUsersAndGroups?: UsersAndGroups; + + /** + * @public + *

Users and groups to be excluded from a rule.

+ */ + excludedUsersAndGroups?: UsersAndGroups; + + /** + * @public + *

The type fo rule.

+ */ + ruleType: RuleType | undefined; + + /** + * @public + *

The configuration information for a rule.

+ */ + ruleConfiguration?: RuleConfiguration; +} + +/** + * @public + *

The topic specific controls configured for an Amazon Q application.

+ */ +export interface TopicConfiguration { + /** + * @public + *

A name for your topic control configuration.

+ */ + name: string | undefined; + + /** + * @public + *

A description for your topic control configuration. Use this outline how the large + * language model (LLM) should use this topic control configuration.

+ */ + description?: string; + + /** + * @public + *

A list of example phrases that you expect the end user to use in relation to the + * topic.

+ */ + exampleChatMessages?: string[]; + + /** + * @public + *

Rules defined for a topic configuration.

+ */ + rules: Rule[] | undefined; +} + +/** + * @public + */ +export interface GetChatControlsConfigurationResponse { + /** + * @public + *

The response scope configured for a Amazon Q application. This determines whether + * your application uses its retrieval augmented generation (RAG) system to generate + * answers only from your enterprise data, or also uses the large language models (LLM) + * knowledge to respons to end user questions in chat.

+ */ + responseScope?: ResponseScope; + + /** + * @public + *

The phrases blocked from chat by your chat control configuration.

+ */ + blockedPhrases?: BlockedPhrasesConfiguration; + + /** + * @public + *

The topic specific controls configured for a Amazon Q application.

+ */ + topicConfigurations?: TopicConfiguration[]; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of Amazon Q chat controls + * configured.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface GetGroupRequest { + /** + * @public + *

The identifier of the application id the group is attached to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index the group is attached to.

+ */ + indexId: string | undefined; + + /** + * @public + *

The name of the group.

+ */ + groupName: string | undefined; + + /** + * @public + *

The identifier of the data source the group is attached to.

+ */ + dataSourceId?: string; +} + +/** + * @public + * @enum + */ +export const GroupStatus = { + DELETED: "DELETED", + DELETING: "DELETING", + FAILED: "FAILED", + PROCESSING: "PROCESSING", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type GroupStatus = (typeof GroupStatus)[keyof typeof GroupStatus]; + +/** + * @public + *

Provides the details of a group's status.

+ */ +export interface GroupStatusDetail { + /** + * @public + *

The status of a group.

+ */ + status?: GroupStatus; + + /** + * @public + *

The Unix timestamp when the Amazon Q application was last updated.

+ */ + lastUpdatedAt?: Date; + + /** + * @public + *

The details of an error associated a group status.

+ */ + errorDetail?: ErrorDetail; +} + +/** + * @public + */ +export interface GetGroupResponse { + /** + * @public + *

The current status of the group.

+ */ + status?: GroupStatusDetail; + + /** + * @public + *

The status history of the group.

+ */ + statusHistory?: GroupStatusDetail[]; +} + +/** + * @public + */ +export interface GetUserRequest { + /** + * @public + *

The identifier of the application connected to the user.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The user email address attached to the user.

+ */ + userId: string | undefined; +} + +/** + * @public + */ +export interface GetUserResponse { + /** + * @public + *

A list of user aliases attached to a user.

+ */ + userAliases?: UserAlias[]; +} + +/** + * @public + */ +export interface ListConversationsRequest { + /** + * @public + *

The identifier of the Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the user involved in the Amazon Q web experience conversation. + *

+ */ + userId: string | undefined; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of Amazon Q conversations.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of Amazon Q conversations to return.

+ */ + maxResults?: number; +} + +/** + * @public + */ +export interface ListConversationsResponse { + /** + * @public + *

If the response is truncated, Amazon Q returns this token, which you can use in a + * later request to list the next set of messages.

+ */ + nextToken?: string; + + /** + * @public + *

An array of summary information on the configuration of one or more Amazon Q web + * experiences.

+ */ + conversations?: Conversation[]; +} + +/** + * @public + */ +export interface ListDataSourceSyncJobsRequest { + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q application connected to the data source.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index used with the Amazon Q data source connector.

+ */ + indexId: string | undefined; + + /** + * @public + *

If the maxResults response was incpmplete because there is more data to + * retriever, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of responses.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of synchronization jobs to return in the response.

+ */ + maxResults?: number; + + /** + * @public + *

The start time of the data source connector sync.

+ */ + startTime?: Date; + + /** + * @public + *

The end time of the data source connector sync.

+ */ + endTime?: Date; + + /** + * @public + *

Only returns synchronization jobs with the Status field equal to the + * specified status.

+ */ + statusFilter?: DataSourceSyncJobStatus; +} + +/** + * @public + */ +export interface ListDataSourceSyncJobsResponse { + /** + * @public + *

A history of synchronization jobs for the data source connector.

+ */ + history?: DataSourceSyncJob[]; + + /** + * @public + *

If the response is truncated, Amazon Q returns this token. You can use this token + * in any subsequent request to retrieve the next set of jobs.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface ListDocumentsRequest { + /** + * @public + *

The identifier of the application id the documents are attached to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index the documents are attached to.

+ */ + indexId: string | undefined; + + /** + * @public + *

The identifier of the data sources the documents are attached to.

+ */ + dataSourceIds?: string[]; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of documents.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of documents to return.

+ */ + maxResults?: number; +} + +/** + * @public + */ +export interface ListDocumentsResponse { + /** + * @public + *

A list of document details.

+ */ + documentDetailList?: DocumentDetails[]; + + /** + * @public + *

If the maxResults response was incomplete because there is more data to + * retrieve, Amazon Q returns a pagination token in the response. You can use this + * pagination token to retrieve the next set of documents.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface ListGroupsRequest { + /** + * @public + *

The identifier of the application for getting a list of groups mapped to users.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index for getting a list of groups mapped to users.

+ */ + indexId: string | undefined; + + /** + * @public + *

The timestamp identifier used for the latest PUT or DELETE + * action for mapping users to their groups.

+ */ + updatedEarlierThan: Date | undefined; + + /** + * @public + *

The identifier of the data source for getting a list of groups mapped to users.

+ */ + dataSourceId?: string; + + /** + * @public + *

If the previous response was incomplete (because there is more data to retrieve), + * Amazon Q returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of groups that are mapped to users.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of returned groups that are mapped to users.

+ */ + maxResults?: number; +} + +/** + * @public + *

Summary information for groups.

+ */ +export interface GroupSummary { + /** + * @public + *

The name of the group the summary information is for.

+ */ + groupName?: string; +} + +/** + * @public + */ +export interface ListGroupsResponse { + /** + * @public + *

If the response is truncated, Amazon Q returns this token that you can use in the + * subsequent request to retrieve the next set of groups that are mapped to users.

+ */ + nextToken?: string; + + /** + * @public + *

Summary information for list of groups that are mapped to users.

+ */ + items?: GroupSummary[]; +} + +/** + * @public + */ +export interface ListMessagesRequest { + /** + * @public + *

The identifier of the Amazon Q web experience conversation.

+ */ + conversationId: string | undefined; + + /** + * @public + *

The identifier for the Amazon Q application.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the user involved in the Amazon Q web experience + * conversation.

+ */ + userId: string | undefined; + + /** + * @public + *

If the number of retrievers returned exceeds maxResults, Amazon Q + * returns a next token as a pagination token to retrieve the next set of messages.

+ */ + nextToken?: string; + + /** + * @public + *

The maximum number of messages to return.

+ */ + maxResults?: number; +} + +/** + * @public + * @enum + */ +export const MessageType = { + SYSTEM: "SYSTEM", + USER: "USER", +} as const; + +/** + * @public + */ +export type MessageType = (typeof MessageType)[keyof typeof MessageType]; + +/** + * @public + *

A message in an Amazon Q web experience.

+ */ +export interface Message { + /** + * @public + *

The identifier of the Amazon Q web experience message.

+ */ + messageId?: string; + + /** + * @public + *

The content of the Amazon Q web experience message.

+ */ + body?: string; + + /** + * @public + *

The timestamp of the first Amazon Q web experience message.

+ */ + time?: Date; + + /** + * @public + *

The type of Amazon Q message, whether HUMAN or AI + * generated.

+ */ + type?: MessageType; + + /** + * @public + *

A file directly uploaded into an Amazon Q web experience chat.

+ */ + attachments?: AttachmentOutput[]; + + /** + * @public + *

The source documents used to generate Amazon Q web experience message.

+ */ + sourceAttribution?: SourceAttribution[]; + + /** + * @public + *

An output event that Amazon Q returns to an user who wants to perform a plugin + * action during a non-streaming chat conversation. It contains information about the + * selected action with a list of possible user input fields, some pre-populated by + * Amazon Q.

+ */ + actionReview?: ActionReview; + + /** + * @public + *

Performs an Amazon Q plugin action during a non-streaming chat + * conversation.

+ */ + actionExecution?: ActionExecution; +} + +/** + * @public + */ +export interface ListMessagesResponse { + /** + * @public + *

An array of information on one or more messages.

+ */ + messages?: Message[]; + + /** + * @public + *

If the response is truncated, Amazon Q returns this token, which you can use in a + * later request to list the next set of messages.

+ */ + nextToken?: string; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q application or data source to get + * a list of tags for.

+ */ + resourceARN: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + * @public + *

A list of tags associated with the Amazon Q application or data source.

+ */ + tags?: Tag[]; +} + +/** + * @public + * @enum + */ +export const MessageUsefulnessReason = { + COMPLETE: "COMPLETE", + FACTUALLY_CORRECT: "FACTUALLY_CORRECT", + HARMFUL_OR_UNSAFE: "HARMFUL_OR_UNSAFE", + HELPFUL: "HELPFUL", + INCORRECT_OR_MISSING_SOURCES: "INCORRECT_OR_MISSING_SOURCES", + NOT_FACTUALLY_CORRECT: "NOT_FACTUALLY_CORRECT", + NOT_HELPFUL: "NOT_HELPFUL", + RELEVANT_SOURCES: "RELEVANT_SOURCES", +} as const; + +/** + * @public + */ +export type MessageUsefulnessReason = (typeof MessageUsefulnessReason)[keyof typeof MessageUsefulnessReason]; + +/** + * @public + * @enum + */ +export const MessageUsefulness = { + NOT_USEFUL: "NOT_USEFUL", + USEFUL: "USEFUL", +} as const; + +/** + * @public + */ +export type MessageUsefulness = (typeof MessageUsefulness)[keyof typeof MessageUsefulness]; + +/** + * @public + *

End user feedback on an AI-generated web experience chat message usefulness.

+ */ +export interface MessageUsefulnessFeedback { + /** + * @public + *

The usefulness value assigned by an end user to a message.

+ */ + usefulness: MessageUsefulness | undefined; + + /** + * @public + *

The reason for a usefulness rating.

+ */ + reason?: MessageUsefulnessReason; + + /** + * @public + *

A comment given by an end user on the usefulness of an AI-generated chat + * message.

+ */ + comment?: string; + + /** + * @public + *

The timestamp for when the feedback was submitted.

+ */ + submittedAt: Date | undefined; +} + +/** + * @public + */ +export interface PutFeedbackRequest { + /** + * @public + *

The identifier of the application associated with the feedback.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the user giving the feedback.

+ */ + userId: string | undefined; + + /** + * @public + *

The identifier of the conversation the feedback is attached to.

+ */ + conversationId: string | undefined; + + /** + * @public + *

The identifier of the chat message that the feedback was given for.

+ */ + messageId: string | undefined; + + /** + * @public + *

The timestamp for when the feedback was recorded.

+ */ + messageCopiedAt?: Date; + + /** + * @public + *

The feedback usefulness value given by the user to the chat message.

+ */ + messageUsefulness?: MessageUsefulnessFeedback; +} + +/** + * @public + *

The sub groups that belong to a group.

+ */ +export interface MemberGroup { + /** + * @public + *

The name of the sub group.

+ */ + groupName: string | undefined; + + /** + * @public + *

The type of the sub group.

+ */ + type?: MembershipType; +} + +/** + * @public + *

The users that belong to a group.

+ */ +export interface MemberUser { + /** + * @public + *

The identifier of the user you want to map to a group.

+ */ + userId: string | undefined; + + /** + * @public + *

The type of the user.

+ */ + type?: MembershipType; +} + +/** + * @public + *

A list of users or sub groups that belong to a group. This is for generating + * Amazon Q chat results only from document a user has access to.

+ */ +export interface GroupMembers { + /** + * @public + *

A list of sub groups that belong to a group. For example, the sub groups "Research", + * "Engineering", and "Sales and Marketing" all belong to the group "Company".

+ */ + memberGroups?: MemberGroup[]; + + /** + * @public + *

A list of users that belong to a group. For example, a list of interns all belong to + * the "Interns" group.

+ */ + memberUsers?: MemberUser[]; +} + +/** + * @public + */ +export interface PutGroupRequest { + /** + * @public + *

The identifier of the application in which the user and group mapping belongs.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index in which you want to map users to their groups.

+ */ + indexId: string | undefined; + + /** + * @public + *

The list that contains your users or sub groups that belong the same group. For + * example, the group "Company" includes the user "CEO" and the sub groups "Research", + * "Engineering", and "Sales and Marketing".

+ *

If you have more than 1000 users and/or sub groups for a single group, you need to + * provide the path to the S3 file that lists your users and sub groups for a group. Your + * sub groups can contain more than 1000 users, but the list of sub groups that belong to a + * group (and/or users) must be no more than 1000.

+ */ + groupName: string | undefined; + + /** + * @public + *

The identifier of the data source for which you want to map users to their groups. + * This is useful if a group is tied to multiple data sources, but you only want the group + * to access documents of a certain data source. For example, the groups "Research", + * "Engineering", and "Sales and Marketing" are all tied to the company's documents stored + * in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only + * needs access to customer-related documents stored in Salesforce.

+ */ + dataSourceId?: string; + + /** + * @public + *

The type of the group.

+ */ + type: MembershipType | undefined; + + /** + * @public + *

A list of users or sub groups that belong to a group. This is for generating + * Amazon Q chat results only from document a user has access to.

+ */ + groupMembers: GroupMembers | undefined; +} + +/** + * @public + */ +export interface PutGroupResponse {} + +/** + * @public + */ +export interface StartDataSourceSyncJobRequest { + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId: string | undefined; + + /** + * @public + *

The identifier of Amazon Q application the data source is connected to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index used with the data source connector.

+ */ + indexId: string | undefined; +} + +/** + * @public + */ +export interface StartDataSourceSyncJobResponse { + /** + * @public + *

The identifier for a particular synchronization job.

+ */ + executionId?: string; +} + +/** + * @public + */ +export interface StopDataSourceSyncJobRequest { + /** + * @public + *

The identifier of the data source connector.

+ */ + dataSourceId: string | undefined; + + /** + * @public + *

The identifier of the Amazon Q application that the data source is connected + * to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the index used with the Amazon Q data source connector.

+ */ + indexId: string | undefined; +} + +/** + * @public + */ +export interface StopDataSourceSyncJobResponse {} + +/** + * @public + */ +export interface TagResourceRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q application or data source to + * tag.

+ */ + resourceARN: string | undefined; + + /** + * @public + *

A list of tag keys to add to the Amazon Q application or data source. If a tag + * already exists, the existing value is replaced with the new value.

+ */ + tags: Tag[] | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} + +/** + * @public + */ +export interface UntagResourceRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the Amazon Q application, or data source to + * remove the tag from.

+ */ + resourceARN: string | undefined; + + /** + * @public + *

A list of tag keys to remove from the Amazon Q application or data source. If a + * tag key does not exist on the resource, it is ignored.

+ */ + tagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @public + */ +export interface UpdateChatControlsConfigurationRequest { + /** + * @public + *

The identifier of the application for which the chat controls are configured.

+ */ + applicationId: string | undefined; + + /** + * @public + *

A token that you provide to identify the request to update a Amazon Q application + * chat configuration.

+ */ + clientToken?: string; + + /** + * @public + *

The response scope configured for your application. This determines whether your + * application uses its retrieval augmented generation (RAG) system to generate answers + * only from your enterprise data, or also uses the large language models (LLM) knowledge + * to respons to end user questions in chat.

+ */ + responseScope?: ResponseScope; + + /** + * @public + *

The phrases blocked from chat by your chat control configuration.

+ */ + blockedPhrasesConfigurationUpdate?: BlockedPhrasesConfigurationUpdate; + + /** + * @public + *

The configured topic specific chat controls you want to update.

+ */ + topicConfigurationsToCreateOrUpdate?: TopicConfiguration[]; + + /** + * @public + *

The configured topic specific chat controls you want to delete.

+ */ + topicConfigurationsToDelete?: TopicConfiguration[]; +} + +/** + * @public + */ +export interface UpdateChatControlsConfigurationResponse {} + +/** + * @public + */ +export interface UpdateUserRequest { + /** + * @public + *

The identifier of the application the user is attached to.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The email id attached to the user.

+ */ + userId: string | undefined; + + /** + * @public + *

The user aliases attached to the user id that are to be updated.

+ */ + userAliasesToUpdate?: UserAlias[]; + + /** + * @public + *

The user aliases attached to the user id that are to be deleted.

+ */ + userAliasesToDelete?: UserAlias[]; +} + +/** + * @public + */ +export interface UpdateUserResponse { + /** + * @public + *

The user aliases that have been to be added to a user id.

+ */ + userAliasesAdded?: UserAlias[]; + + /** + * @public + *

The user aliases attached to a user id that have been updated.

+ */ + userAliasesUpdated?: UserAlias[]; + + /** + * @public + *

The user aliases that have been deleted from a user id.

+ */ + userAliasesDeleted?: UserAlias[]; +} + +/** + * @public + *

Enables filtering of Amazon Q web experience responses based on document + * attributes or metadata fields.

+ */ +export interface AttributeFilter { + /** + * @public + *

Performs a logical AND operation on all supplied filters.

+ */ + andAllFilters?: AttributeFilter[]; + + /** + * @public + *

Performs a logical OR operation on all supplied filters.

+ */ + orAllFilters?: AttributeFilter[]; + + /** + * @public + *

Performs a logical NOT operation on all supplied filters.

+ */ + notFilter?: AttributeFilter; + + /** + * @public + *

Performs an equals operation on two document attributes or metadata fields.

+ */ + equalsTo?: DocumentAttribute; + + /** + * @public + *

Returns true when a document contains all the specified document + * attributes or metadata fields.

+ */ + containsAll?: DocumentAttribute; + + /** + * @public + *

Returns true when a document contains any of the specified document + * attributes or metadata fields.

+ */ + containsAny?: DocumentAttribute; + + /** + * @public + *

Performs a greater than operation on two document attributes or metadata fields. Use + * with a document attribute of type Date or Long.

+ */ + greaterThan?: DocumentAttribute; + + /** + * @public + *

Performs a greater or equals than operation on two document attributes or metadata + * fields. Use with a document attribute of type Date or Long. + *

+ */ + greaterThanOrEquals?: DocumentAttribute; + + /** + * @public + *

Performs a less than operation on two document attributes or metadata fields. Use with + * a document attribute of type Date or Long.

+ */ + lessThan?: DocumentAttribute; + + /** + * @public + *

Performs a less than or equals operation on two document attributes or metadata + * fields. Use with a document attribute of type Date or Long. + *

+ */ + lessThanOrEquals?: DocumentAttribute; +} + +/** + * @public + */ +export interface ChatSyncInput { + /** + * @public + *

The identifier of the Amazon Q application linked to the Amazon Q + * conversation.

+ */ + applicationId: string | undefined; + + /** + * @public + *

The identifier of the user attached to the chat input.

+ */ + userId: string | undefined; + + /** + * @public + *

The groups that a user associated with the chat input belongs to.

+ */ + userGroups?: string[]; + + /** + * @public + *

A end user message in a conversation.

+ */ + userMessage?: string; + + /** + * @public + *

A list of files uploaded directly during chat. You can upload a maximum of 5 files of + * upto 10 MB each.

+ */ + attachments?: AttachmentInput[]; + + /** + * @public + *

A request from an end user to perform an Amazon Q plugin action.

+ */ + actionExecution?: ActionExecution; + + /** + * @public + *

The identifier of the Amazon Q conversation.

+ */ + conversationId?: string; + + /** + * @public + *

The identifier of the previous end user text input message in a conversation.

+ */ + parentMessageId?: string; + + /** + * @public + *

Enables filtering of Amazon Q web experience responses based on document + * attributes or metadata fields.

+ */ + attributeFilter?: AttributeFilter; + + /** + * @public + *

A token that you provide to identify a chat request.

+ */ + clientToken?: string; +} + +/** + * @internal + */ +export const EncryptionConfigurationFilterSensitiveLog = (obj: EncryptionConfiguration): any => ({ + ...obj, + ...(obj.kmsKeyId && { kmsKeyId: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const CreateApplicationRequestFilterSensitiveLog = (obj: CreateApplicationRequest): any => ({ + ...obj, + ...(obj.encryptionConfiguration && { + encryptionConfiguration: EncryptionConfigurationFilterSensitiveLog(obj.encryptionConfiguration), + }), +}); + +/** + * @internal + */ +export const GetApplicationResponseFilterSensitiveLog = (obj: GetApplicationResponse): any => ({ + ...obj, + ...(obj.encryptionConfiguration && { + encryptionConfiguration: EncryptionConfigurationFilterSensitiveLog(obj.encryptionConfiguration), + }), +}); diff --git a/clients/client-qbusiness/src/pagination/GetChatControlsConfigurationPaginator.ts b/clients/client-qbusiness/src/pagination/GetChatControlsConfigurationPaginator.ts new file mode 100644 index 000000000000..4718f5bc5860 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/GetChatControlsConfigurationPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + GetChatControlsConfigurationCommand, + GetChatControlsConfigurationCommandInput, + GetChatControlsConfigurationCommandOutput, +} from "../commands/GetChatControlsConfigurationCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: GetChatControlsConfigurationCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetChatControlsConfigurationCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateGetChatControlsConfiguration( + config: QBusinessPaginationConfiguration, + input: GetChatControlsConfigurationCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: GetChatControlsConfigurationCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/Interfaces.ts b/clients/client-qbusiness/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..8b2e290b81c9 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { QBusinessClient } from "../QBusinessClient"; + +/** + * @public + */ +export interface QBusinessPaginationConfiguration extends PaginationConfiguration { + client: QBusinessClient; +} diff --git a/clients/client-qbusiness/src/pagination/ListApplicationsPaginator.ts b/clients/client-qbusiness/src/pagination/ListApplicationsPaginator.ts new file mode 100644 index 000000000000..75dc7b0deae7 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListApplicationsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListApplicationsCommand, + ListApplicationsCommandInput, + ListApplicationsCommandOutput, +} from "../commands/ListApplicationsCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListApplicationsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListApplicationsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListApplications( + config: QBusinessPaginationConfiguration, + input: ListApplicationsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListApplicationsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListConversationsPaginator.ts b/clients/client-qbusiness/src/pagination/ListConversationsPaginator.ts new file mode 100644 index 000000000000..68553aa60fc0 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListConversationsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListConversationsCommand, + ListConversationsCommandInput, + ListConversationsCommandOutput, +} from "../commands/ListConversationsCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListConversationsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListConversationsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListConversations( + config: QBusinessPaginationConfiguration, + input: ListConversationsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListConversationsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListDataSourceSyncJobsPaginator.ts b/clients/client-qbusiness/src/pagination/ListDataSourceSyncJobsPaginator.ts new file mode 100644 index 000000000000..1368801165ca --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListDataSourceSyncJobsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListDataSourceSyncJobsCommand, + ListDataSourceSyncJobsCommandInput, + ListDataSourceSyncJobsCommandOutput, +} from "../commands/ListDataSourceSyncJobsCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListDataSourceSyncJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListDataSourceSyncJobsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListDataSourceSyncJobs( + config: QBusinessPaginationConfiguration, + input: ListDataSourceSyncJobsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListDataSourceSyncJobsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListDataSourcesPaginator.ts b/clients/client-qbusiness/src/pagination/ListDataSourcesPaginator.ts new file mode 100644 index 000000000000..96df0e4174f3 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListDataSourcesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListDataSourcesCommand, + ListDataSourcesCommandInput, + ListDataSourcesCommandOutput, +} from "../commands/ListDataSourcesCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListDataSourcesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListDataSourcesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListDataSources( + config: QBusinessPaginationConfiguration, + input: ListDataSourcesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListDataSourcesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListDocumentsPaginator.ts b/clients/client-qbusiness/src/pagination/ListDocumentsPaginator.ts new file mode 100644 index 000000000000..1e8555cc82ef --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListDocumentsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListDocumentsCommand, + ListDocumentsCommandInput, + ListDocumentsCommandOutput, +} from "../commands/ListDocumentsCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListDocumentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListDocumentsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListDocuments( + config: QBusinessPaginationConfiguration, + input: ListDocumentsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListDocumentsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListGroupsPaginator.ts b/clients/client-qbusiness/src/pagination/ListGroupsPaginator.ts new file mode 100644 index 000000000000..1e24c5a40b74 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListGroupsPaginator.ts @@ -0,0 +1,46 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { ListGroupsCommand, ListGroupsCommandInput, ListGroupsCommandOutput } from "../commands/ListGroupsCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListGroupsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListGroupsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListGroups( + config: QBusinessPaginationConfiguration, + input: ListGroupsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListGroupsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListIndicesPaginator.ts b/clients/client-qbusiness/src/pagination/ListIndicesPaginator.ts new file mode 100644 index 000000000000..5f319017bb20 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListIndicesPaginator.ts @@ -0,0 +1,46 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { ListIndicesCommand, ListIndicesCommandInput, ListIndicesCommandOutput } from "../commands/ListIndicesCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListIndicesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListIndicesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListIndices( + config: QBusinessPaginationConfiguration, + input: ListIndicesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListIndicesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListMessagesPaginator.ts b/clients/client-qbusiness/src/pagination/ListMessagesPaginator.ts new file mode 100644 index 000000000000..2167e8423b41 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListMessagesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListMessagesCommand, + ListMessagesCommandInput, + ListMessagesCommandOutput, +} from "../commands/ListMessagesCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListMessagesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListMessagesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListMessages( + config: QBusinessPaginationConfiguration, + input: ListMessagesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListMessagesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListPluginsPaginator.ts b/clients/client-qbusiness/src/pagination/ListPluginsPaginator.ts new file mode 100644 index 000000000000..d405572b62f3 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListPluginsPaginator.ts @@ -0,0 +1,46 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { ListPluginsCommand, ListPluginsCommandInput, ListPluginsCommandOutput } from "../commands/ListPluginsCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListPluginsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListPluginsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListPlugins( + config: QBusinessPaginationConfiguration, + input: ListPluginsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListPluginsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListRetrieversPaginator.ts b/clients/client-qbusiness/src/pagination/ListRetrieversPaginator.ts new file mode 100644 index 000000000000..4201a33d4132 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListRetrieversPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListRetrieversCommand, + ListRetrieversCommandInput, + ListRetrieversCommandOutput, +} from "../commands/ListRetrieversCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListRetrieversCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListRetrieversCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListRetrievers( + config: QBusinessPaginationConfiguration, + input: ListRetrieversCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListRetrieversCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/ListWebExperiencesPaginator.ts b/clients/client-qbusiness/src/pagination/ListWebExperiencesPaginator.ts new file mode 100644 index 000000000000..bf5b02d073c1 --- /dev/null +++ b/clients/client-qbusiness/src/pagination/ListWebExperiencesPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListWebExperiencesCommand, + ListWebExperiencesCommandInput, + ListWebExperiencesCommandOutput, +} from "../commands/ListWebExperiencesCommand"; +import { QBusinessClient } from "../QBusinessClient"; +import { QBusinessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: QBusinessClient, + input: ListWebExperiencesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListWebExperiencesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListWebExperiences( + config: QBusinessPaginationConfiguration, + input: ListWebExperiencesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListWebExperiencesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof QBusinessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected QBusiness | QBusinessClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-qbusiness/src/pagination/index.ts b/clients/client-qbusiness/src/pagination/index.ts new file mode 100644 index 000000000000..5cb1190a24df --- /dev/null +++ b/clients/client-qbusiness/src/pagination/index.ts @@ -0,0 +1,14 @@ +export * from "./GetChatControlsConfigurationPaginator"; +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListApplicationsPaginator"; +export * from "./ListConversationsPaginator"; +export * from "./ListDataSourceSyncJobsPaginator"; +export * from "./ListDataSourcesPaginator"; +export * from "./ListDocumentsPaginator"; +export * from "./ListGroupsPaginator"; +export * from "./ListIndicesPaginator"; +export * from "./ListMessagesPaginator"; +export * from "./ListPluginsPaginator"; +export * from "./ListRetrieversPaginator"; +export * from "./ListWebExperiencesPaginator"; diff --git a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..6210a41d34bb --- /dev/null +++ b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts @@ -0,0 +1,6928 @@ +// smithy-typescript generated code +import { awsExpectUnion as __expectUnion } from "@aws-sdk/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectBoolean as __expectBoolean, + expectInt32 as __expectInt32, + expectLong as __expectLong, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectObject as __expectObject, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + map, + parseEpochTimestamp as __parseEpochTimestamp, + resolvedPath as __resolvedPath, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + DocumentType as __DocumentType, + Endpoint as __Endpoint, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { + BatchDeleteDocumentCommandInput, + BatchDeleteDocumentCommandOutput, +} from "../commands/BatchDeleteDocumentCommand"; +import { BatchPutDocumentCommandInput, BatchPutDocumentCommandOutput } from "../commands/BatchPutDocumentCommand"; +import { ChatSyncCommandInput, ChatSyncCommandOutput } from "../commands/ChatSyncCommand"; +import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "../commands/CreateApplicationCommand"; +import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "../commands/CreateDataSourceCommand"; +import { CreateIndexCommandInput, CreateIndexCommandOutput } from "../commands/CreateIndexCommand"; +import { CreatePluginCommandInput, CreatePluginCommandOutput } from "../commands/CreatePluginCommand"; +import { CreateRetrieverCommandInput, CreateRetrieverCommandOutput } from "../commands/CreateRetrieverCommand"; +import { CreateUserCommandInput, CreateUserCommandOutput } from "../commands/CreateUserCommand"; +import { + CreateWebExperienceCommandInput, + CreateWebExperienceCommandOutput, +} from "../commands/CreateWebExperienceCommand"; +import { DeleteApplicationCommandInput, DeleteApplicationCommandOutput } from "../commands/DeleteApplicationCommand"; +import { + DeleteChatControlsConfigurationCommandInput, + DeleteChatControlsConfigurationCommandOutput, +} from "../commands/DeleteChatControlsConfigurationCommand"; +import { DeleteConversationCommandInput, DeleteConversationCommandOutput } from "../commands/DeleteConversationCommand"; +import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "../commands/DeleteDataSourceCommand"; +import { DeleteGroupCommandInput, DeleteGroupCommandOutput } from "../commands/DeleteGroupCommand"; +import { DeleteIndexCommandInput, DeleteIndexCommandOutput } from "../commands/DeleteIndexCommand"; +import { DeletePluginCommandInput, DeletePluginCommandOutput } from "../commands/DeletePluginCommand"; +import { DeleteRetrieverCommandInput, DeleteRetrieverCommandOutput } from "../commands/DeleteRetrieverCommand"; +import { DeleteUserCommandInput, DeleteUserCommandOutput } from "../commands/DeleteUserCommand"; +import { + DeleteWebExperienceCommandInput, + DeleteWebExperienceCommandOutput, +} from "../commands/DeleteWebExperienceCommand"; +import { GetApplicationCommandInput, GetApplicationCommandOutput } from "../commands/GetApplicationCommand"; +import { + GetChatControlsConfigurationCommandInput, + GetChatControlsConfigurationCommandOutput, +} from "../commands/GetChatControlsConfigurationCommand"; +import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "../commands/GetDataSourceCommand"; +import { GetGroupCommandInput, GetGroupCommandOutput } from "../commands/GetGroupCommand"; +import { GetIndexCommandInput, GetIndexCommandOutput } from "../commands/GetIndexCommand"; +import { GetPluginCommandInput, GetPluginCommandOutput } from "../commands/GetPluginCommand"; +import { GetRetrieverCommandInput, GetRetrieverCommandOutput } from "../commands/GetRetrieverCommand"; +import { GetUserCommandInput, GetUserCommandOutput } from "../commands/GetUserCommand"; +import { GetWebExperienceCommandInput, GetWebExperienceCommandOutput } from "../commands/GetWebExperienceCommand"; +import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "../commands/ListApplicationsCommand"; +import { ListConversationsCommandInput, ListConversationsCommandOutput } from "../commands/ListConversationsCommand"; +import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "../commands/ListDataSourcesCommand"; +import { + ListDataSourceSyncJobsCommandInput, + ListDataSourceSyncJobsCommandOutput, +} from "../commands/ListDataSourceSyncJobsCommand"; +import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "../commands/ListDocumentsCommand"; +import { ListGroupsCommandInput, ListGroupsCommandOutput } from "../commands/ListGroupsCommand"; +import { ListIndicesCommandInput, ListIndicesCommandOutput } from "../commands/ListIndicesCommand"; +import { ListMessagesCommandInput, ListMessagesCommandOutput } from "../commands/ListMessagesCommand"; +import { ListPluginsCommandInput, ListPluginsCommandOutput } from "../commands/ListPluginsCommand"; +import { ListRetrieversCommandInput, ListRetrieversCommandOutput } from "../commands/ListRetrieversCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { ListWebExperiencesCommandInput, ListWebExperiencesCommandOutput } from "../commands/ListWebExperiencesCommand"; +import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "../commands/PutFeedbackCommand"; +import { PutGroupCommandInput, PutGroupCommandOutput } from "../commands/PutGroupCommand"; +import { + StartDataSourceSyncJobCommandInput, + StartDataSourceSyncJobCommandOutput, +} from "../commands/StartDataSourceSyncJobCommand"; +import { + StopDataSourceSyncJobCommandInput, + StopDataSourceSyncJobCommandOutput, +} from "../commands/StopDataSourceSyncJobCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "../commands/UpdateApplicationCommand"; +import { + UpdateChatControlsConfigurationCommandInput, + UpdateChatControlsConfigurationCommandOutput, +} from "../commands/UpdateChatControlsConfigurationCommand"; +import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "../commands/UpdateDataSourceCommand"; +import { UpdateIndexCommandInput, UpdateIndexCommandOutput } from "../commands/UpdateIndexCommand"; +import { UpdatePluginCommandInput, UpdatePluginCommandOutput } from "../commands/UpdatePluginCommand"; +import { UpdateRetrieverCommandInput, UpdateRetrieverCommandOutput } from "../commands/UpdateRetrieverCommand"; +import { UpdateUserCommandInput, UpdateUserCommandOutput } from "../commands/UpdateUserCommand"; +import { + UpdateWebExperienceCommandInput, + UpdateWebExperienceCommandOutput, +} from "../commands/UpdateWebExperienceCommand"; +import { + AccessConfiguration, + AccessControl, + AccessDeniedException, + ActionExecution, + ActionExecutionPayloadField, + ActionReview, + ActionReviewPayloadField, + ActionReviewPayloadFieldAllowedValue, + Application, + AttachmentInput, + AttachmentsConfiguration, + AttributeFilter, + BasicAuthConfiguration, + BlockedPhrasesConfigurationUpdate, + ConflictException, + ContentBlockerRule, + ContentRetrievalRule, + Conversation, + DataSource, + DataSourceSyncJob, + DataSourceVpcConfiguration, + DeleteDocument, + Document, + DocumentAttribute, + DocumentAttributeCondition, + DocumentAttributeConfiguration, + DocumentAttributeTarget, + DocumentAttributeValue, + DocumentContent, + DocumentDetails, + DocumentEnrichmentConfiguration, + EligibleDataSource, + EncryptionConfiguration, + GroupMembers, + GroupStatusDetail, + HookConfiguration, + Index, + IndexCapacityConfiguration, + InlineDocumentEnrichmentConfiguration, + InternalServerException, + KendraIndexConfiguration, + LicenseNotFoundException, + MemberGroup, + MemberUser, + Message, + MessageUsefulnessFeedback, + NativeIndexConfiguration, + OAuth2ClientCredentialConfiguration, + Plugin, + PluginAuthConfiguration, + Principal, + PrincipalGroup, + PrincipalUser, + ResourceNotFoundException, + RetrieverConfiguration, + Rule, + RuleConfiguration, + S3, + SamlConfiguration, + ServiceQuotaExceededException, + SourceAttribution, + Tag, + ThrottlingException, + TopicConfiguration, + UserAlias, + UsersAndGroups, + ValidationException, + WebExperience, + WebExperienceAuthConfiguration, +} from "../models/models_0"; +import { QBusinessServiceException as __BaseException } from "../models/QBusinessServiceException"; + +/** + * serializeAws_restJson1BatchDeleteDocumentCommand + */ +export const se_BatchDeleteDocumentCommand = async ( + input: BatchDeleteDocumentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/documents/delete"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + body = JSON.stringify( + take(input, { + dataSourceSyncId: [], + documents: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1BatchPutDocumentCommand + */ +export const se_BatchPutDocumentCommand = async ( + input: BatchPutDocumentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/documents"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + body = JSON.stringify( + take(input, { + dataSourceSyncId: [], + documents: (_) => se_Documents(_, context), + roleArn: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ChatSyncCommand + */ +export const se_ChatSyncCommand = async ( + input: ChatSyncCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/conversations"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + sync: [, ""], + userId: [, __expectNonNull(input.userId!, `userId`)], + userGroups: [() => input.userGroups !== void 0, () => (input.userGroups! || []).map((_entry) => _entry as any)], + }); + let body: any; + body = JSON.stringify( + take(input, { + actionExecution: (_) => se_ActionExecution(_, context), + attachments: (_) => se_AttachmentsInput(_, context), + attributeFilter: (_) => se_AttributeFilter(_, context), + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + conversationId: [], + parentMessageId: [], + userMessage: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1CreateApplicationCommand + */ +export const se_CreateApplicationCommand = async ( + input: CreateApplicationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; + let body: any; + body = JSON.stringify( + take(input, { + attachmentsConfiguration: (_) => _json(_), + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + description: [], + displayName: [], + encryptionConfiguration: (_) => _json(_), + roleArn: [], + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateDataSourceCommand + */ +export const se_CreateDataSourceCommand = async ( + input: CreateDataSourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + configuration: (_) => se_DataSourceConfiguration(_, context), + description: [], + displayName: [], + documentEnrichmentConfiguration: (_) => se_DocumentEnrichmentConfiguration(_, context), + roleArn: [], + syncSchedule: [], + tags: (_) => _json(_), + vpcConfiguration: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateIndexCommand + */ +export const se_CreateIndexCommand = async ( + input: CreateIndexCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/indices"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + capacityConfiguration: (_) => _json(_), + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + description: [], + displayName: [], + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreatePluginCommand + */ +export const se_CreatePluginCommand = async ( + input: CreatePluginCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/plugins"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + authConfiguration: (_) => _json(_), + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + displayName: [], + serverUrl: [], + tags: (_) => _json(_), + type: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateRetrieverCommand + */ +export const se_CreateRetrieverCommand = async ( + input: CreateRetrieverCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/retrievers"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + configuration: (_) => _json(_), + displayName: [], + roleArn: [], + tags: (_) => _json(_), + type: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateUserCommand + */ +export const se_CreateUserCommand = async ( + input: CreateUserCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/users"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + userAliases: (_) => _json(_), + userId: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1CreateWebExperienceCommand + */ +export const se_CreateWebExperienceCommand = async ( + input: CreateWebExperienceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/experiences"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + samplePromptsControlMode: [], + subtitle: [], + tags: (_) => _json(_), + title: [], + welcomeMessage: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteApplicationCommand + */ +export const se_DeleteApplicationCommand = async ( + input: DeleteApplicationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteChatControlsConfigurationCommand + */ +export const se_DeleteChatControlsConfigurationCommand = async ( + input: DeleteChatControlsConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/chatcontrols"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteConversationCommand + */ +export const se_DeleteConversationCommand = async ( + input: DeleteConversationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/conversations/{conversationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "conversationId", + () => input.conversationId!, + "{conversationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + userId: [, __expectNonNull(input.userId!, `userId`)], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteDataSourceCommand + */ +export const se_DeleteDataSourceCommand = async ( + input: DeleteDataSourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "dataSourceId", + () => input.dataSourceId!, + "{dataSourceId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteGroupCommand + */ +export const se_DeleteGroupCommand = async ( + input: DeleteGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/groups/{groupName}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "groupName", () => input.groupName!, "{groupName}", false); + const query: any = map({ + dataSourceId: [, input.dataSourceId!], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteIndexCommand + */ +export const se_DeleteIndexCommand = async ( + input: DeleteIndexCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeletePluginCommand + */ +export const se_DeletePluginCommand = async ( + input: DeletePluginCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/plugins/{pluginId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "pluginId", () => input.pluginId!, "{pluginId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteRetrieverCommand + */ +export const se_DeleteRetrieverCommand = async ( + input: DeleteRetrieverCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/retrievers/{retrieverId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "retrieverId", () => input.retrieverId!, "{retrieverId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteUserCommand + */ +export const se_DeleteUserCommand = async ( + input: DeleteUserCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/users/{userId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1DeleteWebExperienceCommand + */ +export const se_DeleteWebExperienceCommand = async ( + input: DeleteWebExperienceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/experiences/{webExperienceId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "webExperienceId", + () => input.webExperienceId!, + "{webExperienceId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetApplicationCommand + */ +export const se_GetApplicationCommand = async ( + input: GetApplicationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetChatControlsConfigurationCommand + */ +export const se_GetChatControlsConfigurationCommand = async ( + input: GetChatControlsConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/chatcontrols"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + nextToken: [, input.nextToken!], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1GetDataSourceCommand + */ +export const se_GetDataSourceCommand = async ( + input: GetDataSourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "dataSourceId", + () => input.dataSourceId!, + "{dataSourceId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetGroupCommand + */ +export const se_GetGroupCommand = async ( + input: GetGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/groups/{groupName}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + resolvedPath = __resolvedPath(resolvedPath, input, "groupName", () => input.groupName!, "{groupName}", false); + const query: any = map({ + dataSourceId: [, input.dataSourceId!], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1GetIndexCommand + */ +export const se_GetIndexCommand = async ( + input: GetIndexCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetPluginCommand + */ +export const se_GetPluginCommand = async ( + input: GetPluginCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/plugins/{pluginId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "pluginId", () => input.pluginId!, "{pluginId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetRetrieverCommand + */ +export const se_GetRetrieverCommand = async ( + input: GetRetrieverCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/retrievers/{retrieverId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "retrieverId", () => input.retrieverId!, "{retrieverId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetUserCommand + */ +export const se_GetUserCommand = async ( + input: GetUserCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/users/{userId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1GetWebExperienceCommand + */ +export const se_GetWebExperienceCommand = async ( + input: GetWebExperienceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/experiences/{webExperienceId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "webExperienceId", + () => input.webExperienceId!, + "{webExperienceId}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ListApplicationsCommand + */ +export const se_ListApplicationsCommand = async ( + input: ListApplicationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListConversationsCommand + */ +export const se_ListConversationsCommand = async ( + input: ListConversationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/conversations"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + userId: [, __expectNonNull(input.userId!, `userId`)], + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListDataSourcesCommand + */ +export const se_ListDataSourcesCommand = async ( + input: ListDataSourcesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListDataSourceSyncJobsCommand + */ +export const se_ListDataSourceSyncJobsCommand = async ( + input: ListDataSourceSyncJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/syncjobs"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "dataSourceId", + () => input.dataSourceId!, + "{dataSourceId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + startTime: [ + () => input.startTime !== void 0, + () => (input.startTime!.toISOString().split(".")[0] + "Z").toString(), + ], + endTime: [() => input.endTime !== void 0, () => (input.endTime!.toISOString().split(".")[0] + "Z").toString()], + syncStatus: [, input.statusFilter!], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListDocumentsCommand + */ +export const se_ListDocumentsCommand = async ( + input: ListDocumentsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/index/{indexId}/documents"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + const query: any = map({ + dataSourceIds: [ + () => input.dataSourceIds !== void 0, + () => (input.dataSourceIds! || []).map((_entry) => _entry as any), + ], + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListGroupsCommand + */ +export const se_ListGroupsCommand = async ( + input: ListGroupsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/groups"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + const query: any = map({ + updatedEarlierThan: [ + __expectNonNull(input.updatedEarlierThan, `updatedEarlierThan`) != null, + () => (input.updatedEarlierThan!.toISOString().split(".")[0] + "Z").toString(), + ], + dataSourceId: [, input.dataSourceId!], + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListIndicesCommand + */ +export const se_ListIndicesCommand = async ( + input: ListIndicesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/indices"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListMessagesCommand + */ +export const se_ListMessagesCommand = async ( + input: ListMessagesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/conversations/{conversationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "conversationId", + () => input.conversationId!, + "{conversationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + userId: [, __expectNonNull(input.userId!, `userId`)], + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListPluginsCommand + */ +export const se_ListPluginsCommand = async ( + input: ListPluginsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/plugins"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListRetrieversCommand + */ +export const se_ListRetrieversCommand = async ( + input: ListRetrieversCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/retrievers"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceARN}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN!, "{resourceARN}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1ListWebExperiencesCommand + */ +export const se_ListWebExperiencesCommand = async ( + input: ListWebExperiencesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/experiences"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + const query: any = map({ + nextToken: [, input.nextToken!], + maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1PutFeedbackCommand + */ +export const se_PutFeedbackCommand = async ( + input: PutFeedbackCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/conversations/{conversationId}/messages/{messageId}/feedback"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "conversationId", + () => input.conversationId!, + "{conversationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "messageId", () => input.messageId!, "{messageId}", false); + const query: any = map({ + userId: [, __expectNonNull(input.userId!, `userId`)], + }); + let body: any; + body = JSON.stringify( + take(input, { + messageCopiedAt: (_) => Math.round(_.getTime() / 1000), + messageUsefulness: (_) => se_MessageUsefulnessFeedback(_, context), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1PutGroupCommand + */ +export const se_PutGroupCommand = async ( + input: PutGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/groups"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + body = JSON.stringify( + take(input, { + dataSourceId: [], + groupMembers: (_) => _json(_), + groupName: [], + type: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1StartDataSourceSyncJobCommand + */ +export const se_StartDataSourceSyncJobCommand = async ( + input: StartDataSourceSyncJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/startsync"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "dataSourceId", + () => input.dataSourceId!, + "{dataSourceId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1StopDataSourceSyncJobCommand + */ +export const se_StopDataSourceSyncJobCommand = async ( + input: StopDataSourceSyncJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/stopsync"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "dataSourceId", + () => input.dataSourceId!, + "{dataSourceId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceARN}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN!, "{resourceARN}", false); + let body: any; + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceARN}"; + resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN!, "{resourceARN}", false); + const query: any = map({ + tagKeys: [ + __expectNonNull(input.tagKeys, `tagKeys`) != null, + () => (input.tagKeys! || []).map((_entry) => _entry as any), + ], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateApplicationCommand + */ +export const se_UpdateApplicationCommand = async ( + input: UpdateApplicationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + attachmentsConfiguration: (_) => _json(_), + description: [], + displayName: [], + roleArn: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateChatControlsConfigurationCommand + */ +export const se_UpdateChatControlsConfigurationCommand = async ( + input: UpdateChatControlsConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/chatcontrols"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + blockedPhrasesConfigurationUpdate: (_) => _json(_), + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + responseScope: [], + topicConfigurationsToCreateOrUpdate: (_) => _json(_), + topicConfigurationsToDelete: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateDataSourceCommand + */ +export const se_UpdateDataSourceCommand = async ( + input: UpdateDataSourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "dataSourceId", + () => input.dataSourceId!, + "{dataSourceId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + configuration: (_) => se_DataSourceConfiguration(_, context), + description: [], + displayName: [], + documentEnrichmentConfiguration: (_) => se_DocumentEnrichmentConfiguration(_, context), + roleArn: [], + syncSchedule: [], + vpcConfiguration: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateIndexCommand + */ +export const se_UpdateIndexCommand = async ( + input: UpdateIndexCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/indices/{indexId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "indexId", () => input.indexId!, "{indexId}", false); + let body: any; + body = JSON.stringify( + take(input, { + capacityConfiguration: (_) => _json(_), + description: [], + displayName: [], + documentAttributeConfigurations: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdatePluginCommand + */ +export const se_UpdatePluginCommand = async ( + input: UpdatePluginCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/plugins/{pluginId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "pluginId", () => input.pluginId!, "{pluginId}", false); + let body: any; + body = JSON.stringify( + take(input, { + authConfiguration: (_) => _json(_), + displayName: [], + serverUrl: [], + state: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateRetrieverCommand + */ +export const se_UpdateRetrieverCommand = async ( + input: UpdateRetrieverCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/retrievers/{retrieverId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "retrieverId", () => input.retrieverId!, "{retrieverId}", false); + let body: any; + body = JSON.stringify( + take(input, { + configuration: (_) => _json(_), + displayName: [], + roleArn: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateUserCommand + */ +export const se_UpdateUserCommand = async ( + input: UpdateUserCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/users/{userId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); + let body: any; + body = JSON.stringify( + take(input, { + userAliasesToDelete: (_) => _json(_), + userAliasesToUpdate: (_) => _json(_), + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * serializeAws_restJson1UpdateWebExperienceCommand + */ +export const se_UpdateWebExperienceCommand = async ( + input: UpdateWebExperienceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/applications/{applicationId}/experiences/{webExperienceId}"; + resolvedPath = __resolvedPath( + resolvedPath, + input, + "applicationId", + () => input.applicationId!, + "{applicationId}", + false + ); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "webExperienceId", + () => input.webExperienceId!, + "{webExperienceId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + authenticationConfiguration: (_) => _json(_), + samplePromptsControlMode: [], + subtitle: [], + title: [], + welcomeMessage: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +/** + * deserializeAws_restJson1BatchDeleteDocumentCommand + */ +export const de_BatchDeleteDocumentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_BatchDeleteDocumentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + failedDocuments: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1BatchDeleteDocumentCommandError + */ +const de_BatchDeleteDocumentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1BatchPutDocumentCommand + */ +export const de_BatchPutDocumentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_BatchPutDocumentCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + failedDocuments: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1BatchPutDocumentCommandError + */ +const de_BatchPutDocumentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ChatSyncCommand + */ +export const de_ChatSyncCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ChatSyncCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + actionReview: (_) => de_ActionReview(_, context), + conversationId: __expectString, + failedAttachments: _json, + sourceAttributions: (_) => de_SourceAttributions(_, context), + systemMessage: __expectString, + systemMessageId: __expectString, + userMessageId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ChatSyncCommandError + */ +const de_ChatSyncCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "LicenseNotFoundException": + case "com.amazonaws.qbusiness#LicenseNotFoundException": + throw await de_LicenseNotFoundExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateApplicationCommand + */ +export const de_CreateApplicationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateApplicationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationArn: __expectString, + applicationId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateApplicationCommandError + */ +const de_CreateApplicationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateDataSourceCommand + */ +export const de_CreateDataSourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateDataSourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + dataSourceArn: __expectString, + dataSourceId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateDataSourceCommandError + */ +const de_CreateDataSourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateIndexCommand + */ +export const de_CreateIndexCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateIndexCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + indexArn: __expectString, + indexId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateIndexCommandError + */ +const de_CreateIndexCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreatePluginCommand + */ +export const de_CreatePluginCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreatePluginCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + pluginArn: __expectString, + pluginId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreatePluginCommandError + */ +const de_CreatePluginCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateRetrieverCommand + */ +export const de_CreateRetrieverCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateRetrieverCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + retrieverArn: __expectString, + retrieverId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateRetrieverCommandError + */ +const de_CreateRetrieverCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateUserCommand + */ +export const de_CreateUserCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateUserCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1CreateUserCommandError + */ +const de_CreateUserCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1CreateWebExperienceCommand + */ +export const de_CreateWebExperienceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateWebExperienceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + webExperienceArn: __expectString, + webExperienceId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateWebExperienceCommandError + */ +const de_CreateWebExperienceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteApplicationCommand + */ +export const de_DeleteApplicationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteApplicationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteApplicationCommandError + */ +const de_DeleteApplicationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteChatControlsConfigurationCommand + */ +export const de_DeleteChatControlsConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteChatControlsConfigurationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteChatControlsConfigurationCommandError + */ +const de_DeleteChatControlsConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteConversationCommand + */ +export const de_DeleteConversationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteConversationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteConversationCommandError + */ +const de_DeleteConversationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "LicenseNotFoundException": + case "com.amazonaws.qbusiness#LicenseNotFoundException": + throw await de_LicenseNotFoundExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteDataSourceCommand + */ +export const de_DeleteDataSourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteDataSourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteDataSourceCommandError + */ +const de_DeleteDataSourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteGroupCommand + */ +export const de_DeleteGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteGroupCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteGroupCommandError + */ +const de_DeleteGroupCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteIndexCommand + */ +export const de_DeleteIndexCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteIndexCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteIndexCommandError + */ +const de_DeleteIndexCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeletePluginCommand + */ +export const de_DeletePluginCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeletePluginCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeletePluginCommandError + */ +const de_DeletePluginCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteRetrieverCommand + */ +export const de_DeleteRetrieverCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteRetrieverCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteRetrieverCommandError + */ +const de_DeleteRetrieverCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteUserCommand + */ +export const de_DeleteUserCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteUserCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteUserCommandError + */ +const de_DeleteUserCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1DeleteWebExperienceCommand + */ +export const de_DeleteWebExperienceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteWebExperienceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteWebExperienceCommandError + */ +const de_DeleteWebExperienceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetApplicationCommand + */ +export const de_GetApplicationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetApplicationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationArn: __expectString, + applicationId: __expectString, + attachmentsConfiguration: _json, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + displayName: __expectString, + encryptionConfiguration: _json, + error: _json, + roleArn: __expectString, + status: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetApplicationCommandError + */ +const de_GetApplicationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetChatControlsConfigurationCommand + */ +export const de_GetChatControlsConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetChatControlsConfigurationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + blockedPhrases: _json, + nextToken: __expectString, + responseScope: __expectString, + topicConfigurations: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetChatControlsConfigurationCommandError + */ +const de_GetChatControlsConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetDataSourceCommand + */ +export const de_GetDataSourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetDataSourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationId: __expectString, + configuration: (_) => de_DataSourceConfiguration(_, context), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataSourceArn: __expectString, + dataSourceId: __expectString, + description: __expectString, + displayName: __expectString, + documentEnrichmentConfiguration: (_) => de_DocumentEnrichmentConfiguration(_, context), + error: _json, + indexId: __expectString, + roleArn: __expectString, + status: __expectString, + syncSchedule: __expectString, + type: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vpcConfiguration: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetDataSourceCommandError + */ +const de_GetDataSourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetGroupCommand + */ +export const de_GetGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetGroupCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + status: (_) => de_GroupStatusDetail(_, context), + statusHistory: (_) => de_GroupStatusDetails(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetGroupCommandError + */ +const de_GetGroupCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetIndexCommand + */ +export const de_GetIndexCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetIndexCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationId: __expectString, + capacityConfiguration: _json, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + displayName: __expectString, + documentAttributeConfigurations: _json, + error: _json, + indexArn: __expectString, + indexId: __expectString, + indexStatistics: _json, + status: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetIndexCommandError + */ +const de_GetIndexCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetPluginCommand + */ +export const de_GetPluginCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetPluginCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationId: __expectString, + authConfiguration: (_) => _json(__expectUnion(_)), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + pluginArn: __expectString, + pluginId: __expectString, + serverUrl: __expectString, + state: __expectString, + type: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetPluginCommandError + */ +const de_GetPluginCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetRetrieverCommand + */ +export const de_GetRetrieverCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetRetrieverCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationId: __expectString, + configuration: (_) => _json(__expectUnion(_)), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + retrieverArn: __expectString, + retrieverId: __expectString, + roleArn: __expectString, + status: __expectString, + type: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetRetrieverCommandError + */ +const de_GetRetrieverCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetUserCommand + */ +export const de_GetUserCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetUserCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + userAliases: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetUserCommandError + */ +const de_GetUserCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1GetWebExperienceCommand + */ +export const de_GetWebExperienceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetWebExperienceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applicationId: __expectString, + authenticationConfiguration: (_) => _json(__expectUnion(_)), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultEndpoint: __expectString, + error: _json, + samplePromptsControlMode: __expectString, + status: __expectString, + subtitle: __expectString, + title: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + webExperienceArn: __expectString, + webExperienceId: __expectString, + welcomeMessage: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetWebExperienceCommandError + */ +const de_GetWebExperienceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListApplicationsCommand + */ +export const de_ListApplicationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListApplicationsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + applications: (_) => de_Applications(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListApplicationsCommandError + */ +const de_ListApplicationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListConversationsCommand + */ +export const de_ListConversationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListConversationsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + conversations: (_) => de_Conversations(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListConversationsCommandError + */ +const de_ListConversationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "LicenseNotFoundException": + case "com.amazonaws.qbusiness#LicenseNotFoundException": + throw await de_LicenseNotFoundExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListDataSourcesCommand + */ +export const de_ListDataSourcesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListDataSourcesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + dataSources: (_) => de_DataSources(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListDataSourcesCommandError + */ +const de_ListDataSourcesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListDataSourceSyncJobsCommand + */ +export const de_ListDataSourceSyncJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListDataSourceSyncJobsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + history: (_) => de_DataSourceSyncJobs(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListDataSourceSyncJobsCommandError + */ +const de_ListDataSourceSyncJobsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListDocumentsCommand + */ +export const de_ListDocumentsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListDocumentsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + documentDetailList: (_) => de_DocumentDetailList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListDocumentsCommandError + */ +const de_ListDocumentsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListGroupsCommand + */ +export const de_ListGroupsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListGroupsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListGroupsCommandError + */ +const de_ListGroupsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListIndicesCommand + */ +export const de_ListIndicesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListIndicesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + indices: (_) => de_Indices(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListIndicesCommandError + */ +const de_ListIndicesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListMessagesCommand + */ +export const de_ListMessagesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListMessagesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + messages: (_) => de_Messages(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListMessagesCommandError + */ +const de_ListMessagesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "LicenseNotFoundException": + case "com.amazonaws.qbusiness#LicenseNotFoundException": + throw await de_LicenseNotFoundExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListPluginsCommand + */ +export const de_ListPluginsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListPluginsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + plugins: (_) => de_Plugins(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListPluginsCommandError + */ +const de_ListPluginsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListRetrieversCommand + */ +export const de_ListRetrieversCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListRetrieversCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + retrievers: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListRetrieversCommandError + */ +const de_ListRetrieversCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListTagsForResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommandError + */ +const de_ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1ListWebExperiencesCommand + */ +export const de_ListWebExperiencesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListWebExperiencesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + webExperiences: (_) => de_WebExperiences(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListWebExperiencesCommandError + */ +const de_ListWebExperiencesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1PutFeedbackCommand + */ +export const de_PutFeedbackCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_PutFeedbackCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1PutFeedbackCommandError + */ +const de_PutFeedbackCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1PutGroupCommand + */ +export const de_PutGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_PutGroupCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1PutGroupCommandError + */ +const de_PutGroupCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1StartDataSourceSyncJobCommand + */ +export const de_StartDataSourceSyncJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartDataSourceSyncJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + executionId: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StartDataSourceSyncJobCommandError + */ +const de_StartDataSourceSyncJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1StopDataSourceSyncJobCommand + */ +export const de_StopDataSourceSyncJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StopDataSourceSyncJobCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1StopDataSourceSyncJobCommandError + */ +const de_StopDataSourceSyncJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_TagResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1TagResourceCommandError + */ +const de_TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UntagResourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UntagResourceCommandError + */ +const de_UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateApplicationCommand + */ +export const de_UpdateApplicationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateApplicationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateApplicationCommandError + */ +const de_UpdateApplicationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateChatControlsConfigurationCommand + */ +export const de_UpdateChatControlsConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateChatControlsConfigurationCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateChatControlsConfigurationCommandError + */ +const de_UpdateChatControlsConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateDataSourceCommand + */ +export const de_UpdateDataSourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateDataSourceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateDataSourceCommandError + */ +const de_UpdateDataSourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateIndexCommand + */ +export const de_UpdateIndexCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateIndexCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateIndexCommandError + */ +const de_UpdateIndexCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdatePluginCommand + */ +export const de_UpdatePluginCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdatePluginCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdatePluginCommandError + */ +const de_UpdatePluginCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateRetrieverCommand + */ +export const de_UpdateRetrieverCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateRetrieverCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateRetrieverCommandError + */ +const de_UpdateRetrieverCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateUserCommand + */ +export const de_UpdateUserCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateUserCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + userAliasesAdded: _json, + userAliasesDeleted: _json, + userAliasesUpdated: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateUserCommandError + */ +const de_UpdateUserCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.qbusiness#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_restJson1UpdateWebExperienceCommand + */ +export const de_UpdateWebExperienceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_UpdateWebExperienceCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateWebExperienceCommandError + */ +const de_UpdateWebExperienceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.qbusiness#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.qbusiness#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.qbusiness#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.qbusiness#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qbusiness#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.qbusiness#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +const throwDefaultError = withBaseException(__BaseException); +/** + * deserializeAws_restJson1AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1InternalServerExceptionRes + */ +const de_InternalServerExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1LicenseNotFoundExceptionRes + */ +const de_LicenseNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new LicenseNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ServiceQuotaExceededExceptionRes + */ +const de_ServiceQuotaExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + fields: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +// se_AccessConfiguration omitted. + +// se_AccessControl omitted. + +// se_AccessControls omitted. + +/** + * serializeAws_restJson1ActionExecution + */ +const se_ActionExecution = (input: ActionExecution, context: __SerdeContext): any => { + return take(input, { + payload: (_) => se_ActionExecutionPayload(_, context), + payloadFieldNameSeparator: [], + pluginId: [], + }); +}; + +/** + * serializeAws_restJson1ActionExecutionPayload + */ +const se_ActionExecutionPayload = ( + input: Record, + context: __SerdeContext +): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_ActionExecutionPayloadField(value, context); + return acc; + }, {}); +}; + +/** + * serializeAws_restJson1ActionExecutionPayloadField + */ +const se_ActionExecutionPayloadField = (input: ActionExecutionPayloadField, context: __SerdeContext): any => { + return take(input, { + value: (_) => se_ActionPayloadFieldValue(_, context), + }); +}; + +/** + * serializeAws_restJson1ActionPayloadFieldValue + */ +const se_ActionPayloadFieldValue = (input: __DocumentType, context: __SerdeContext): any => { + return input; +}; + +/** + * serializeAws_restJson1AttachmentInput + */ +const se_AttachmentInput = (input: AttachmentInput, context: __SerdeContext): any => { + return take(input, { + data: context.base64Encoder, + name: [], + }); +}; + +// se_AttachmentsConfiguration omitted. + +/** + * serializeAws_restJson1AttachmentsInput + */ +const se_AttachmentsInput = (input: AttachmentInput[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_AttachmentInput(entry, context); + }); +}; + +/** + * serializeAws_restJson1AttributeFilter + */ +const se_AttributeFilter = (input: AttributeFilter, context: __SerdeContext): any => { + return take(input, { + andAllFilters: (_) => se_AttributeFilters(_, context), + containsAll: (_) => se_DocumentAttribute(_, context), + containsAny: (_) => se_DocumentAttribute(_, context), + equalsTo: (_) => se_DocumentAttribute(_, context), + greaterThan: (_) => se_DocumentAttribute(_, context), + greaterThanOrEquals: (_) => se_DocumentAttribute(_, context), + lessThan: (_) => se_DocumentAttribute(_, context), + lessThanOrEquals: (_) => se_DocumentAttribute(_, context), + notFilter: (_) => se_AttributeFilter(_, context), + orAllFilters: (_) => se_AttributeFilters(_, context), + }); +}; + +/** + * serializeAws_restJson1AttributeFilters + */ +const se_AttributeFilters = (input: AttributeFilter[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_AttributeFilter(entry, context); + }); +}; + +// se_BasicAuthConfiguration omitted. + +// se_BlockedPhrases omitted. + +// se_BlockedPhrasesConfigurationUpdate omitted. + +// se_ContentBlockerRule omitted. + +// se_ContentRetrievalRule omitted. + +/** + * serializeAws_restJson1DataSourceConfiguration + */ +const se_DataSourceConfiguration = (input: __DocumentType, context: __SerdeContext): any => { + return input; +}; + +// se_DataSourceVpcConfiguration omitted. + +// se_DeleteDocument omitted. + +// se_DeleteDocuments omitted. + +/** + * serializeAws_restJson1Document + */ +const se_Document = (input: Document, context: __SerdeContext): any => { + return take(input, { + accessConfiguration: _json, + attributes: (_) => se_DocumentAttributes(_, context), + content: (_) => se_DocumentContent(_, context), + contentType: [], + documentEnrichmentConfiguration: (_) => se_DocumentEnrichmentConfiguration(_, context), + id: [], + title: [], + }); +}; + +/** + * serializeAws_restJson1DocumentAttribute + */ +const se_DocumentAttribute = (input: DocumentAttribute, context: __SerdeContext): any => { + return take(input, { + name: [], + value: (_) => se_DocumentAttributeValue(_, context), + }); +}; + +/** + * serializeAws_restJson1DocumentAttributeCondition + */ +const se_DocumentAttributeCondition = (input: DocumentAttributeCondition, context: __SerdeContext): any => { + return take(input, { + key: [], + operator: [], + value: (_) => se_DocumentAttributeValue(_, context), + }); +}; + +// se_DocumentAttributeConfiguration omitted. + +// se_DocumentAttributeConfigurations omitted. + +/** + * serializeAws_restJson1DocumentAttributes + */ +const se_DocumentAttributes = (input: DocumentAttribute[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_DocumentAttribute(entry, context); + }); +}; + +// se_DocumentAttributeStringListValue omitted. + +/** + * serializeAws_restJson1DocumentAttributeTarget + */ +const se_DocumentAttributeTarget = (input: DocumentAttributeTarget, context: __SerdeContext): any => { + return take(input, { + attributeValueOperator: [], + key: [], + value: (_) => se_DocumentAttributeValue(_, context), + }); +}; + +/** + * serializeAws_restJson1DocumentAttributeValue + */ +const se_DocumentAttributeValue = (input: DocumentAttributeValue, context: __SerdeContext): any => { + return DocumentAttributeValue.visit(input, { + dateValue: (value) => ({ dateValue: Math.round(value.getTime() / 1000) }), + longValue: (value) => ({ longValue: value }), + stringListValue: (value) => ({ stringListValue: _json(value) }), + stringValue: (value) => ({ stringValue: value }), + _: (name, value) => ({ name: value } as any), + }); +}; + +/** + * serializeAws_restJson1DocumentContent + */ +const se_DocumentContent = (input: DocumentContent, context: __SerdeContext): any => { + return DocumentContent.visit(input, { + blob: (value) => ({ blob: context.base64Encoder(value) }), + s3: (value) => ({ s3: _json(value) }), + _: (name, value) => ({ name: value } as any), + }); +}; + +/** + * serializeAws_restJson1DocumentEnrichmentConfiguration + */ +const se_DocumentEnrichmentConfiguration = (input: DocumentEnrichmentConfiguration, context: __SerdeContext): any => { + return take(input, { + inlineConfigurations: (_) => se_InlineDocumentEnrichmentConfigurations(_, context), + postExtractionHookConfiguration: (_) => se_HookConfiguration(_, context), + preExtractionHookConfiguration: (_) => se_HookConfiguration(_, context), + }); +}; + +/** + * serializeAws_restJson1Documents + */ +const se_Documents = (input: Document[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_Document(entry, context); + }); +}; + +// se_EligibleDataSource omitted. + +// se_EligibleDataSources omitted. + +// se_EncryptionConfiguration omitted. + +// se_ExampleChatMessages omitted. + +// se_GroupMembers omitted. + +/** + * serializeAws_restJson1HookConfiguration + */ +const se_HookConfiguration = (input: HookConfiguration, context: __SerdeContext): any => { + return take(input, { + invocationCondition: (_) => se_DocumentAttributeCondition(_, context), + lambdaArn: [], + roleArn: [], + s3BucketName: [], + }); +}; + +// se_IndexCapacityConfiguration omitted. + +/** + * serializeAws_restJson1InlineDocumentEnrichmentConfiguration + */ +const se_InlineDocumentEnrichmentConfiguration = ( + input: InlineDocumentEnrichmentConfiguration, + context: __SerdeContext +): any => { + return take(input, { + condition: (_) => se_DocumentAttributeCondition(_, context), + documentContentOperator: [], + target: (_) => se_DocumentAttributeTarget(_, context), + }); +}; + +/** + * serializeAws_restJson1InlineDocumentEnrichmentConfigurations + */ +const se_InlineDocumentEnrichmentConfigurations = ( + input: InlineDocumentEnrichmentConfiguration[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_InlineDocumentEnrichmentConfiguration(entry, context); + }); +}; + +// se_KendraIndexConfiguration omitted. + +// se_MemberGroup omitted. + +// se_MemberGroups omitted. + +// se_MemberUser omitted. + +// se_MemberUsers omitted. + +/** + * serializeAws_restJson1MessageUsefulnessFeedback + */ +const se_MessageUsefulnessFeedback = (input: MessageUsefulnessFeedback, context: __SerdeContext): any => { + return take(input, { + comment: [], + reason: [], + submittedAt: (_) => Math.round(_.getTime() / 1000), + usefulness: [], + }); +}; + +// se_NativeIndexConfiguration omitted. + +// se_OAuth2ClientCredentialConfiguration omitted. + +// se_PluginAuthConfiguration omitted. + +// se_Principal omitted. + +// se_PrincipalGroup omitted. + +// se_Principals omitted. + +// se_PrincipalUser omitted. + +// se_RetrieverConfiguration omitted. + +// se_Rule omitted. + +// se_RuleConfiguration omitted. + +// se_Rules omitted. + +// se_S3 omitted. + +// se_SamlConfiguration omitted. + +// se_SecurityGroupIds omitted. + +// se_SubnetIds omitted. + +// se_Tag omitted. + +// se_Tags omitted. + +// se_TopicConfiguration omitted. + +// se_TopicConfigurations omitted. + +// se_UserAlias omitted. + +// se_UserAliases omitted. + +// se_UserGroups omitted. + +// se_UserIds omitted. + +// se_UsersAndGroups omitted. + +// se_WebExperienceAuthConfiguration omitted. + +/** + * deserializeAws_restJson1ActionExecution + */ +const de_ActionExecution = (output: any, context: __SerdeContext): ActionExecution => { + return take(output, { + payload: (_: any) => de_ActionExecutionPayload(_, context), + payloadFieldNameSeparator: __expectString, + pluginId: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1ActionExecutionPayload + */ +const de_ActionExecutionPayload = ( + output: any, + context: __SerdeContext +): Record => { + return Object.entries(output).reduce( + (acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key as string] = de_ActionExecutionPayloadField(value, context); + return acc; + }, + {} as Record + ); +}; + +/** + * deserializeAws_restJson1ActionExecutionPayloadField + */ +const de_ActionExecutionPayloadField = (output: any, context: __SerdeContext): ActionExecutionPayloadField => { + return take(output, { + value: (_: any) => de_ActionPayloadFieldValue(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1ActionPayloadFieldValue + */ +const de_ActionPayloadFieldValue = (output: any, context: __SerdeContext): __DocumentType => { + return output; +}; + +/** + * deserializeAws_restJson1ActionReview + */ +const de_ActionReview = (output: any, context: __SerdeContext): ActionReview => { + return take(output, { + payload: (_: any) => de_ActionReviewPayload(_, context), + payloadFieldNameSeparator: __expectString, + pluginId: __expectString, + pluginType: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1ActionReviewPayload + */ +const de_ActionReviewPayload = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key as string] = de_ActionReviewPayloadField(value, context); + return acc; + }, {} as Record); +}; + +/** + * deserializeAws_restJson1ActionReviewPayloadField + */ +const de_ActionReviewPayloadField = (output: any, context: __SerdeContext): ActionReviewPayloadField => { + return take(output, { + allowedValues: (_: any) => de_ActionReviewPayloadFieldAllowedValues(_, context), + displayName: __expectString, + displayOrder: __expectInt32, + required: __expectBoolean, + type: __expectString, + value: (_: any) => de_ActionPayloadFieldValue(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1ActionReviewPayloadFieldAllowedValue + */ +const de_ActionReviewPayloadFieldAllowedValue = ( + output: any, + context: __SerdeContext +): ActionReviewPayloadFieldAllowedValue => { + return take(output, { + displayValue: (_: any) => de_ActionPayloadFieldValue(_, context), + value: (_: any) => de_ActionPayloadFieldValue(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1ActionReviewPayloadFieldAllowedValues + */ +const de_ActionReviewPayloadFieldAllowedValues = ( + output: any, + context: __SerdeContext +): ActionReviewPayloadFieldAllowedValue[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ActionReviewPayloadFieldAllowedValue(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1Application + */ +const de_Application = (output: any, context: __SerdeContext): Application => { + return take(output, { + applicationId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1Applications + */ +const de_Applications = (output: any, context: __SerdeContext): Application[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Application(entry, context); + }); + return retVal; +}; + +// de_AppliedAttachmentsConfiguration omitted. + +// de_AttachmentOutput omitted. + +// de_AttachmentsOutput omitted. + +// de_BasicAuthConfiguration omitted. + +// de_BlockedPhrases omitted. + +// de_BlockedPhrasesConfiguration omitted. + +// de_ContentBlockerRule omitted. + +// de_ContentRetrievalRule omitted. + +/** + * deserializeAws_restJson1Conversation + */ +const de_Conversation = (output: any, context: __SerdeContext): Conversation => { + return take(output, { + conversationId: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + title: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1Conversations + */ +const de_Conversations = (output: any, context: __SerdeContext): Conversation[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Conversation(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1DataSource + */ +const de_DataSource = (output: any, context: __SerdeContext): DataSource => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataSourceId: __expectString, + displayName: __expectString, + status: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1DataSourceConfiguration + */ +const de_DataSourceConfiguration = (output: any, context: __SerdeContext): __DocumentType => { + return output; +}; + +/** + * deserializeAws_restJson1DataSources + */ +const de_DataSources = (output: any, context: __SerdeContext): DataSource[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataSource(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1DataSourceSyncJob + */ +const de_DataSourceSyncJob = (output: any, context: __SerdeContext): DataSourceSyncJob => { + return take(output, { + dataSourceErrorCode: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + error: _json, + executionId: __expectString, + metrics: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; +}; + +// de_DataSourceSyncJobMetrics omitted. + +/** + * deserializeAws_restJson1DataSourceSyncJobs + */ +const de_DataSourceSyncJobs = (output: any, context: __SerdeContext): DataSourceSyncJob[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataSourceSyncJob(entry, context); + }); + return retVal; +}; + +// de_DataSourceVpcConfiguration omitted. + +/** + * deserializeAws_restJson1DocumentAttributeCondition + */ +const de_DocumentAttributeCondition = (output: any, context: __SerdeContext): DocumentAttributeCondition => { + return take(output, { + key: __expectString, + operator: __expectString, + value: (_: any) => de_DocumentAttributeValue(__expectUnion(_), context), + }) as any; +}; + +// de_DocumentAttributeConfiguration omitted. + +// de_DocumentAttributeConfigurations omitted. + +// de_DocumentAttributeStringListValue omitted. + +/** + * deserializeAws_restJson1DocumentAttributeTarget + */ +const de_DocumentAttributeTarget = (output: any, context: __SerdeContext): DocumentAttributeTarget => { + return take(output, { + attributeValueOperator: __expectString, + key: __expectString, + value: (_: any) => de_DocumentAttributeValue(__expectUnion(_), context), + }) as any; +}; + +/** + * deserializeAws_restJson1DocumentAttributeValue + */ +const de_DocumentAttributeValue = (output: any, context: __SerdeContext): DocumentAttributeValue => { + if (output.dateValue != null) { + return { + dateValue: __expectNonNull(__parseEpochTimestamp(__expectNumber(output.dateValue))), + }; + } + if (__expectLong(output.longValue) !== undefined) { + return { longValue: __expectLong(output.longValue) as any }; + } + if (output.stringListValue != null) { + return { + stringListValue: _json(output.stringListValue), + }; + } + if (__expectString(output.stringValue) !== undefined) { + return { stringValue: __expectString(output.stringValue) as any }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +/** + * deserializeAws_restJson1DocumentDetailList + */ +const de_DocumentDetailList = (output: any, context: __SerdeContext): DocumentDetails[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DocumentDetails(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1DocumentDetails + */ +const de_DocumentDetails = (output: any, context: __SerdeContext): DocumentDetails => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + documentId: __expectString, + error: _json, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_restJson1DocumentEnrichmentConfiguration + */ +const de_DocumentEnrichmentConfiguration = (output: any, context: __SerdeContext): DocumentEnrichmentConfiguration => { + return take(output, { + inlineConfigurations: (_: any) => de_InlineDocumentEnrichmentConfigurations(_, context), + postExtractionHookConfiguration: (_: any) => de_HookConfiguration(_, context), + preExtractionHookConfiguration: (_: any) => de_HookConfiguration(_, context), + }) as any; +}; + +// de_EligibleDataSource omitted. + +// de_EligibleDataSources omitted. + +// de_EncryptionConfiguration omitted. + +// de_ErrorDetail omitted. + +// de_ExampleChatMessages omitted. + +// de_FailedDocument omitted. + +// de_FailedDocuments omitted. + +/** + * deserializeAws_restJson1GroupStatusDetail + */ +const de_GroupStatusDetail = (output: any, context: __SerdeContext): GroupStatusDetail => { + return take(output, { + errorDetail: _json, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1GroupStatusDetails + */ +const de_GroupStatusDetails = (output: any, context: __SerdeContext): GroupStatusDetail[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_GroupStatusDetail(entry, context); + }); + return retVal; +}; + +// de_GroupSummary omitted. + +// de_GroupSummaryList omitted. + +/** + * deserializeAws_restJson1HookConfiguration + */ +const de_HookConfiguration = (output: any, context: __SerdeContext): HookConfiguration => { + return take(output, { + invocationCondition: (_: any) => de_DocumentAttributeCondition(_, context), + lambdaArn: __expectString, + roleArn: __expectString, + s3BucketName: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1Index + */ +const de_Index = (output: any, context: __SerdeContext): Index => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + indexId: __expectString, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_IndexCapacityConfiguration omitted. + +// de_IndexStatistics omitted. + +/** + * deserializeAws_restJson1Indices + */ +const de_Indices = (output: any, context: __SerdeContext): Index[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Index(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1InlineDocumentEnrichmentConfiguration + */ +const de_InlineDocumentEnrichmentConfiguration = ( + output: any, + context: __SerdeContext +): InlineDocumentEnrichmentConfiguration => { + return take(output, { + condition: (_: any) => de_DocumentAttributeCondition(_, context), + documentContentOperator: __expectString, + target: (_: any) => de_DocumentAttributeTarget(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1InlineDocumentEnrichmentConfigurations + */ +const de_InlineDocumentEnrichmentConfigurations = ( + output: any, + context: __SerdeContext +): InlineDocumentEnrichmentConfiguration[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InlineDocumentEnrichmentConfiguration(entry, context); + }); + return retVal; +}; + +// de_KendraIndexConfiguration omitted. + +/** + * deserializeAws_restJson1Message + */ +const de_Message = (output: any, context: __SerdeContext): Message => { + return take(output, { + actionExecution: (_: any) => de_ActionExecution(_, context), + actionReview: (_: any) => de_ActionReview(_, context), + attachments: _json, + body: __expectString, + messageId: __expectString, + sourceAttribution: (_: any) => de_SourceAttributions(_, context), + time: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1Messages + */ +const de_Messages = (output: any, context: __SerdeContext): Message[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Message(entry, context); + }); + return retVal; +}; + +// de_NativeIndexConfiguration omitted. + +// de_OAuth2ClientCredentialConfiguration omitted. + +/** + * deserializeAws_restJson1Plugin + */ +const de_Plugin = (output: any, context: __SerdeContext): Plugin => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + pluginId: __expectString, + serverUrl: __expectString, + state: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_PluginAuthConfiguration omitted. + +/** + * deserializeAws_restJson1Plugins + */ +const de_Plugins = (output: any, context: __SerdeContext): Plugin[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Plugin(entry, context); + }); + return retVal; +}; + +// de_Retriever omitted. + +// de_RetrieverConfiguration omitted. + +// de_Retrievers omitted. + +// de_Rule omitted. + +// de_RuleConfiguration omitted. + +// de_Rules omitted. + +// de_SamlConfiguration omitted. + +// de_SecurityGroupIds omitted. + +/** + * deserializeAws_restJson1SourceAttribution + */ +const de_SourceAttribution = (output: any, context: __SerdeContext): SourceAttribution => { + return take(output, { + citationNumber: __expectInt32, + snippet: __expectString, + textMessageSegments: _json, + title: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + url: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1SourceAttributions + */ +const de_SourceAttributions = (output: any, context: __SerdeContext): SourceAttribution[] => { + const retVal = (output || []).map((entry: any) => { + if (entry === null) { + return null as any; + } + return de_SourceAttribution(entry, context); + }); + return retVal; +}; + +// de_SubnetIds omitted. + +// de_Tag omitted. + +// de_Tags omitted. + +// de_TextDocumentStatistics omitted. + +// de_TextSegment omitted. + +// de_TextSegmentList omitted. + +// de_TopicConfiguration omitted. + +// de_TopicConfigurations omitted. + +// de_UserAlias omitted. + +// de_UserAliases omitted. + +// de_UserGroups omitted. + +// de_UserIds omitted. + +// de_UsersAndGroups omitted. + +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFields omitted. + +/** + * deserializeAws_restJson1WebExperience + */ +const de_WebExperience = (output: any, context: __SerdeContext): WebExperience => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultEndpoint: __expectString, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + webExperienceId: __expectString, + }) as any; +}; + +// de_WebExperienceAuthConfiguration omitted. + +/** + * deserializeAws_restJson1WebExperiences + */ +const de_WebExperiences = (output: any, context: __SerdeContext): WebExperience[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_WebExperience(entry, context); + }); + return retVal; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { + const value = await parseBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string | undefined => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string | number): string => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } +}; diff --git a/clients/client-qbusiness/src/runtimeConfig.browser.ts b/clients/client-qbusiness/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..3827c8af6d93 --- /dev/null +++ b/clients/client-qbusiness/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { QBusinessClientConfig } from "./QBusinessClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QBusinessClientConfig) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/clients/client-qbusiness/src/runtimeConfig.native.ts b/clients/client-qbusiness/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..68e042f27587 --- /dev/null +++ b/clients/client-qbusiness/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { QBusinessClientConfig } from "./QBusinessClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QBusinessClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-qbusiness/src/runtimeConfig.shared.ts b/clients/client-qbusiness/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..b3cffa926bd4 --- /dev/null +++ b/clients/client-qbusiness/src/runtimeConfig.shared.ts @@ -0,0 +1,27 @@ +// smithy-typescript generated code +import { NoOpLogger } from "@smithy/smithy-client"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; + +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; +import { QBusinessClientConfig } from "./QBusinessClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QBusinessClientConfig) => { + return { + apiVersion: "2023-11-27", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "QBusiness", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-qbusiness/src/runtimeConfig.ts b/clients/client-qbusiness/src/runtimeConfig.ts new file mode 100644 index 000000000000..d5f1d70030ad --- /dev/null +++ b/clients/client-qbusiness/src/runtimeConfig.ts @@ -0,0 +1,63 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttp2Handler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { QBusinessClientConfig } from "./QBusinessClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: QBusinessClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: + config?.requestHandler ?? + new RequestHandler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })), + retryMode: + config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; diff --git a/clients/client-qbusiness/src/runtimeExtensions.ts b/clients/client-qbusiness/src/runtimeExtensions.ts new file mode 100644 index 000000000000..c014c07da834 --- /dev/null +++ b/clients/client-qbusiness/src/runtimeExtensions.ts @@ -0,0 +1,45 @@ +// smithy-typescript generated code +import { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, +} from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; + +import { QBusinessExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: QBusinessExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: QBusinessExtensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + }; + + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/clients/client-qbusiness/tsconfig.cjs.json b/clients/client-qbusiness/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-qbusiness/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-qbusiness/tsconfig.es.json b/clients/client-qbusiness/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-qbusiness/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-qbusiness/tsconfig.json b/clients/client-qbusiness/tsconfig.json new file mode 100644 index 000000000000..344909de2128 --- /dev/null +++ b/clients/client-qbusiness/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node14/tsconfig.json", + "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, + "incremental": true, + "removeComments": true, + "resolveJsonModule": true, + "rootDir": "src", + "useUnknownInCatchVariables": false + }, + "exclude": ["test/"] +} diff --git a/clients/client-qbusiness/tsconfig.types.json b/clients/client-qbusiness/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-qbusiness/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-qbusiness/typedoc.json b/clients/client-qbusiness/typedoc.json new file mode 100644 index 000000000000..8a364aa93b69 --- /dev/null +++ b/clients/client-qbusiness/typedoc.json @@ -0,0 +1,6 @@ +{ + "extends": ["../../typedoc.client.json"], + "entryPoints": ["src/index.ts"], + "out": "docs", + "readme": "README.md" +} diff --git a/codegen/sdk-codegen/aws-models/qbusiness.json b/codegen/sdk-codegen/aws-models/qbusiness.json new file mode 100644 index 000000000000..ca0f31133700 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/qbusiness.json @@ -0,0 +1,10226 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.qbusiness#AccessConfiguration": { + "type": "structure", + "members": { + "accessControls": { + "target": "com.amazonaws.qbusiness#AccessControls", + "traits": { + "smithy.api#documentation": "

A list of AccessControlList objects.

", + "smithy.api#required": {} + } + }, + "memberRelation": { + "target": "com.amazonaws.qbusiness#MemberRelation", + "traits": { + "smithy.api#documentation": "

Describes the member relation within the AccessControlList object.

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

Used to configure access permissions for a document.

" + } + }, + "com.amazonaws.qbusiness#AccessControl": { + "type": "structure", + "members": { + "principals": { + "target": "com.amazonaws.qbusiness#Principals", + "traits": { + "smithy.api#documentation": "

Contains a list of principals, where a principal can be either a USER or\n a GROUP. Each principal can be have the following type of document access:\n ALLOW or DENY.

", + "smithy.api#required": {} + } + }, + "memberRelation": { + "target": "com.amazonaws.qbusiness#MemberRelation", + "traits": { + "smithy.api#documentation": "

Describes the member relation within a principal list.

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

A list of principals. Each principal can be either a USER or a\n GROUP and can be designated document access permissions of either\n ALLOW or DENY.

" + } + }, + "com.amazonaws.qbusiness#AccessControls": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#AccessControl" + } + }, + "com.amazonaws.qbusiness#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have access to perform this action. Make sure you have the required\n permission policies and user accounts and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.qbusiness#ActionExecution": { + "type": "structure", + "members": { + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin the action is attached to.

", + "smithy.api#required": {} + } + }, + "payload": { + "target": "com.amazonaws.qbusiness#ActionExecutionPayload", + "traits": { + "smithy.api#documentation": "

A mapping of field names to the field values in input that an end user provides to\n Amazon Q requests to perform their plugin action.

", + "smithy.api#required": {} + } + }, + "payloadFieldNameSeparator": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldNameSeparator", + "traits": { + "smithy.api#documentation": "

A string used to retain information about the hierarchical contexts within an action\n execution event payload.

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

Performs an Amazon Q plugin action during a non-streaming chat\n conversation.

" + } + }, + "com.amazonaws.qbusiness#ActionExecutionPayload": { + "type": "map", + "key": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldKey" + }, + "value": { + "target": "com.amazonaws.qbusiness#ActionExecutionPayloadField" + } + }, + "com.amazonaws.qbusiness#ActionExecutionPayloadField": { + "type": "structure", + "members": { + "value": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldValue", + "traits": { + "smithy.api#documentation": "

The content of a user input field in an plugin action execution payload.

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

A user input field in an plugin action execution payload.

" + } + }, + "com.amazonaws.qbusiness#ActionPayloadFieldKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.qbusiness#ActionPayloadFieldNameSeparator": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.qbusiness#ActionPayloadFieldType": { + "type": "enum", + "members": { + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING" + } + }, + "NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NUMBER" + } + }, + "ARRAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARRAY" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" + } + } + } + }, + "com.amazonaws.qbusiness#ActionPayloadFieldValue": { + "type": "document" + }, + "com.amazonaws.qbusiness#ActionReview": { + "type": "structure", + "members": { + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin associated with the action review.

" + } + }, + "pluginType": { + "target": "com.amazonaws.qbusiness#PluginType", + "traits": { + "smithy.api#documentation": "

The type of plugin.

" + } + }, + "payload": { + "target": "com.amazonaws.qbusiness#ActionReviewPayload", + "traits": { + "smithy.api#documentation": "

Field values that an end user needs to provide to Amazon Q for Amazon Q to\n perform the requested plugin action.

" + } + }, + "payloadFieldNameSeparator": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldNameSeparator", + "traits": { + "smithy.api#documentation": "

A string used to retain information about the hierarchical contexts within an action\n review payload.

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

An output event that Amazon Q returns to an user who wants to perform a plugin\n action during a non-streaming chat conversation. It contains information about the\n selected action with a list of possible user input fields, some pre-populated by\n Amazon Q.

" + } + }, + "com.amazonaws.qbusiness#ActionReviewPayload": { + "type": "map", + "key": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldKey" + }, + "value": { + "target": "com.amazonaws.qbusiness#ActionReviewPayloadField" + } + }, + "com.amazonaws.qbusiness#ActionReviewPayloadField": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The name of the field.

" + } + }, + "displayOrder": { + "target": "com.amazonaws.qbusiness#Integer", + "traits": { + "smithy.api#documentation": "

The display order of fields in a payload.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldType", + "traits": { + "smithy.api#documentation": "

The type of field.

" + } + }, + "value": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldValue", + "traits": { + "smithy.api#documentation": "

The field value.

" + } + }, + "allowedValues": { + "target": "com.amazonaws.qbusiness#ActionReviewPayloadFieldAllowedValues", + "traits": { + "smithy.api#documentation": "

Information about the field values that an end user can use to provide to\n Amazon Q for Amazon Q to perform the requested plugin action.

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

Information about whether the field is required.

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

A user input field in an plugin action review payload.

" + } + }, + "com.amazonaws.qbusiness#ActionReviewPayloadFieldAllowedValue": { + "type": "structure", + "members": { + "value": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldValue", + "traits": { + "smithy.api#documentation": "

The field value.

" + } + }, + "displayValue": { + "target": "com.amazonaws.qbusiness#ActionPayloadFieldValue", + "traits": { + "smithy.api#documentation": "

The name of the field.

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

Information about the field values that an end user can use to provide to\n Amazon Q for Amazon Q to perform the requested plugin action.

" + } + }, + "com.amazonaws.qbusiness#ActionReviewPayloadFieldAllowedValues": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#ActionReviewPayloadFieldAllowedValue" + } + }, + "com.amazonaws.qbusiness#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + } + } + }, + "com.amazonaws.qbusiness#Application": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.qbusiness#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon Q application.

" + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier for the Amazon Q application.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was last updated.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#ApplicationStatus", + "traits": { + "smithy.api#documentation": "

The status of the Amazon Q application. The application is ready to use when the\n status is ACTIVE.

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

Summary information for an Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#ApplicationArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#ApplicationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#ApplicationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.qbusiness#ApplicationResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId" + } + }, + "create": { + "target": "com.amazonaws.qbusiness#CreateApplication" + }, + "read": { + "target": "com.amazonaws.qbusiness#GetApplication" + }, + "update": { + "target": "com.amazonaws.qbusiness#UpdateApplication" + }, + "delete": { + "target": "com.amazonaws.qbusiness#DeleteApplication" + }, + "list": { + "target": "com.amazonaws.qbusiness#ListApplications" + }, + "resources": [ + { + "target": "com.amazonaws.qbusiness#IndexResource" + }, + { + "target": "com.amazonaws.qbusiness#PluginResource" + }, + { + "target": "com.amazonaws.qbusiness#RetrieverResource" + }, + { + "target": "com.amazonaws.qbusiness#WebExperienceResource" + } + ], + "traits": { + "aws.cloudformation#cfnResource": { + "name": "Application" + } + } + }, + "com.amazonaws.qbusiness#ApplicationStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + } + } + }, + "com.amazonaws.qbusiness#Applications": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Application" + } + }, + "com.amazonaws.qbusiness#AppliedAttachmentsConfiguration": { + "type": "structure", + "members": { + "attachmentsControlMode": { + "target": "com.amazonaws.qbusiness#AttachmentsControlMode", + "traits": { + "smithy.api#documentation": "

Information about whether file upload during chat functionality is activated for your\n application.

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

Configuration information about the file upload during chat feature for your\n application.

" + } + }, + "com.amazonaws.qbusiness#AttachmentInput": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#AttachmentName", + "traits": { + "smithy.api#documentation": "

The name of the file.

", + "smithy.api#required": {} + } + }, + "data": { + "target": "com.amazonaws.qbusiness#Blob", + "traits": { + "smithy.api#documentation": "

The data contained within the uploaded file.

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

A file directly uploaded into a web experience chat.

" + } + }, + "com.amazonaws.qbusiness#AttachmentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#AttachmentOutput": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#AttachmentName", + "traits": { + "smithy.api#documentation": "

The name of a file uploaded during chat.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#AttachmentStatus", + "traits": { + "smithy.api#documentation": "

The status of a file uploaded during chat.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "smithy.api#documentation": "

An error associated with a file uploaded during chat.

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

The details of a file uploaded during chat.

" + } + }, + "com.amazonaws.qbusiness#AttachmentStatus": { + "type": "enum", + "members": { + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + } + } + }, + "com.amazonaws.qbusiness#AttachmentsConfiguration": { + "type": "structure", + "members": { + "attachmentsControlMode": { + "target": "com.amazonaws.qbusiness#AttachmentsControlMode", + "traits": { + "smithy.api#documentation": "

Status information about whether file upload functionality is activated or deactivated\n for your end user.

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

Configuration information for the file upload during chat feature.

" + } + }, + "com.amazonaws.qbusiness#AttachmentsControlMode": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, + "com.amazonaws.qbusiness#AttachmentsInput": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#AttachmentInput" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.qbusiness#AttachmentsOutput": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#AttachmentOutput" + } + }, + "com.amazonaws.qbusiness#AttributeFilter": { + "type": "structure", + "members": { + "andAllFilters": { + "target": "com.amazonaws.qbusiness#AttributeFilters", + "traits": { + "smithy.api#documentation": "

Performs a logical AND operation on all supplied filters.

" + } + }, + "orAllFilters": { + "target": "com.amazonaws.qbusiness#AttributeFilters", + "traits": { + "smithy.api#documentation": "

Performs a logical OR operation on all supplied filters.

" + } + }, + "notFilter": { + "target": "com.amazonaws.qbusiness#AttributeFilter", + "traits": { + "smithy.api#documentation": "

Performs a logical NOT operation on all supplied filters.

" + } + }, + "equalsTo": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Performs an equals operation on two document attributes or metadata fields.

" + } + }, + "containsAll": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Returns true when a document contains all the specified document\n attributes or metadata fields.

" + } + }, + "containsAny": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Returns true when a document contains any of the specified document\n attributes or metadata fields.

" + } + }, + "greaterThan": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Performs a greater than operation on two document attributes or metadata fields. Use\n with a document attribute of type Date or Long.

" + } + }, + "greaterThanOrEquals": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Performs a greater or equals than operation on two document attributes or metadata\n fields. Use with a document attribute of type Date or Long.\n

" + } + }, + "lessThan": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Performs a less than operation on two document attributes or metadata fields. Use with\n a document attribute of type Date or Long.

" + } + }, + "lessThanOrEquals": { + "target": "com.amazonaws.qbusiness#DocumentAttribute", + "traits": { + "smithy.api#documentation": "

Performs a less than or equals operation on two document attributes or metadata\n fields. Use with a document attribute of type Date or Long.\n

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

Enables filtering of Amazon Q web experience responses based on document\n attributes or metadata fields.

" + } + }, + "com.amazonaws.qbusiness#AttributeFilters": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#AttributeFilter" + } + }, + "com.amazonaws.qbusiness#AttributeType": { + "type": "enum", + "members": { + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING" + } + }, + "STRING_LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING_LIST" + } + }, + "NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NUMBER" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE" + } + } + } + }, + "com.amazonaws.qbusiness#AttributeValueOperator": { + "type": "enum", + "members": { + "DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE" + } + } + } + }, + "com.amazonaws.qbusiness#BasicAuthConfiguration": { + "type": "structure", + "members": { + "secretArn": { + "target": "com.amazonaws.qbusiness#SecretArn", + "traits": { + "smithy.api#documentation": "

The ARN of the Secrets Manager secret that stores the basic authentication\n credentials used for plugin configuration..

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The ARN of an IAM role used by Amazon Q to access the basic\n authentication credentials stored in a Secrets Manager secret.

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

Information about the basic authentication credentials used to configure a\n plugin.

" + } + }, + "com.amazonaws.qbusiness#BatchDeleteDocument": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#BatchDeleteDocumentRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#BatchDeleteDocumentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Asynchronously deletes one or more documents added using the\n BatchPutDocument API from an Amazon Q index.

\n

You can see the progress of the deletion, and any error messages related to the\n process, by using CloudWatch.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/indices/{indexId}/documents/delete" + } + } + }, + "com.amazonaws.qbusiness#BatchDeleteDocumentRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q index that contains the documents to\n delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "documents": { + "target": "com.amazonaws.qbusiness#DeleteDocuments", + "traits": { + "smithy.api#documentation": "

Documents deleted from the Amazon Q index.

", + "smithy.api#required": {} + } + }, + "dataSourceSyncId": { + "target": "com.amazonaws.qbusiness#ExecutionId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source sync during which the documents were deleted.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#BatchDeleteDocumentResponse": { + "type": "structure", + "members": { + "failedDocuments": { + "target": "com.amazonaws.qbusiness#FailedDocuments", + "traits": { + "smithy.api#documentation": "

A list of documents that couldn't be removed from the Amazon Q index. Each entry\n contains an error message that indicates why the document couldn't be removed from the\n index.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#BatchPutDocument": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#BatchPutDocumentRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#BatchPutDocumentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds one or more documents to an Amazon Q index.

\n

You use this API to:

\n
    \n
  • \n

    ingest your structured and unstructured documents and documents stored in an\n Amazon S3 bucket into an Amazon Q index.

    \n
  • \n
  • \n

    add custom attributes to documents in an Amazon Q index.

    \n
  • \n
  • \n

    attach an access control list to the documents added to an Amazon Q\n index.

    \n
  • \n
\n

You can see the progress of the deletion, and any error messages related to the\n process, by using CloudWatch.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/indices/{indexId}/documents" + } + } + }, + "com.amazonaws.qbusiness#BatchPutDocumentRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q index to add the documents to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "documents": { + "target": "com.amazonaws.qbusiness#Documents", + "traits": { + "smithy.api#documentation": "

One or more documents to add to the index.

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permission to access your S3\n bucket.

" + } + }, + "dataSourceSyncId": { + "target": "com.amazonaws.qbusiness#ExecutionId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source sync during which the documents were added.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#BatchPutDocumentResponse": { + "type": "structure", + "members": { + "failedDocuments": { + "target": "com.amazonaws.qbusiness#FailedDocuments", + "traits": { + "smithy.api#documentation": "

A list of documents that were not added to the Amazon Q index because the\n document failed a validation check. Each document contains an error message that\n indicates why the document couldn't be added to the index.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#Blob": { + "type": "blob" + }, + "com.amazonaws.qbusiness#BlockedPhrase": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 36 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#BlockedPhrases": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#BlockedPhrase" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.qbusiness#BlockedPhrasesConfiguration": { + "type": "structure", + "members": { + "blockedPhrases": { + "target": "com.amazonaws.qbusiness#BlockedPhrases", + "traits": { + "smithy.api#documentation": "

A list of phrases blocked from a Amazon Q web experience chat.

" + } + }, + "systemMessageOverride": { + "target": "com.amazonaws.qbusiness#SystemMessageOverride", + "traits": { + "smithy.api#documentation": "

The configured custom message displayed to an end user informing them that they've\n used a blocked phrase during chat.

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

Provides information about the phrases blocked from chat by your chat control\n configuration.

" + } + }, + "com.amazonaws.qbusiness#BlockedPhrasesConfigurationUpdate": { + "type": "structure", + "members": { + "blockedPhrasesToCreateOrUpdate": { + "target": "com.amazonaws.qbusiness#BlockedPhrases", + "traits": { + "smithy.api#documentation": "

Creates or updates a blocked phrases configuration in your Amazon Q\n application.

" + } + }, + "blockedPhrasesToDelete": { + "target": "com.amazonaws.qbusiness#BlockedPhrases", + "traits": { + "smithy.api#documentation": "

Deletes a blocked phrases configuration in your Amazon Q application.

" + } + }, + "systemMessageOverride": { + "target": "com.amazonaws.qbusiness#SystemMessageOverride", + "traits": { + "smithy.api#documentation": "

The configured custom message displayed to your end user when they use blocked phrase\n during chat.

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

Updates a blocked phrases configuration in your Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#ChatSync": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ChatSyncInput" + }, + "output": { + "target": "com.amazonaws.qbusiness#ChatSyncOutput" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#LicenseNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts or continues a non-streaming Amazon Q conversation.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/conversations?sync", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#ChatSyncInput": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application linked to the Amazon Q\n conversation.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user attached to the chat input.

", + "smithy.api#httpQuery": "userId", + "smithy.api#required": {} + } + }, + "userGroups": { + "target": "com.amazonaws.qbusiness#UserGroups", + "traits": { + "smithy.api#documentation": "

The groups that a user associated with the chat input belongs to.

", + "smithy.api#httpQuery": "userGroups" + } + }, + "userMessage": { + "target": "com.amazonaws.qbusiness#UserMessage", + "traits": { + "smithy.api#documentation": "

A end user message in a conversation.

" + } + }, + "attachments": { + "target": "com.amazonaws.qbusiness#AttachmentsInput", + "traits": { + "smithy.api#documentation": "

A list of files uploaded directly during chat. You can upload a maximum of 5 files of\n upto 10 MB each.

" + } + }, + "actionExecution": { + "target": "com.amazonaws.qbusiness#ActionExecution", + "traits": { + "smithy.api#documentation": "

A request from an end user to perform an Amazon Q plugin action.

" + } + }, + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q conversation.

" + } + }, + "parentMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

The identifier of the previous end user text input message in a conversation.

" + } + }, + "attributeFilter": { + "target": "com.amazonaws.qbusiness#AttributeFilter", + "traits": { + "smithy.api#documentation": "

Enables filtering of Amazon Q web experience responses based on document\n attributes or metadata fields.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify a chat request.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ChatSyncOutput": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q conversation.

" + } + }, + "systemMessage": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

An AI-generated message in a conversation.

" + } + }, + "systemMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

The identifier of an Amazon Q AI generated message within the\n conversation.

" + } + }, + "userMessageId": { + "target": "com.amazonaws.qbusiness#MessageId", + "traits": { + "smithy.api#documentation": "

The identifier of an Amazon Q end user text input message within the\n conversation.

" + } + }, + "actionReview": { + "target": "com.amazonaws.qbusiness#ActionReview", + "traits": { + "smithy.api#documentation": "

A request from Amazon Q to the end user for information Amazon Q needs to\n successfully complete a requested plugin action.

" + } + }, + "sourceAttributions": { + "target": "com.amazonaws.qbusiness#SourceAttributions", + "traits": { + "smithy.api#documentation": "

The source documents used to generate the conversation response.

" + } + }, + "failedAttachments": { + "target": "com.amazonaws.qbusiness#AttachmentsOutput", + "traits": { + "smithy.api#documentation": "

A list of files which failed to upload during chat.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The message describing a ConflictException.

", + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The identifier of the resource affected.

", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The type of the resource affected.

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

You are trying to perform an action that conflicts with the current status of your\n resource. Fix any inconsistences with your resources and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.qbusiness#ContentBlockerRule": { + "type": "structure", + "members": { + "systemMessageOverride": { + "target": "com.amazonaws.qbusiness#SystemMessageOverride", + "traits": { + "smithy.api#documentation": "

The configured custom message displayed to an end user informing them that they've\n used a blocked phrase during chat.

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

A rule for configuring how Amazon Q responds when it encounters a a blocked\n topic. You can configure a custom message to inform your end users that they have asked\n about a restricted topic and suggest any next steps they should take.

" + } + }, + "com.amazonaws.qbusiness#ContentRetrievalRule": { + "type": "structure", + "members": { + "eligibleDataSources": { + "target": "com.amazonaws.qbusiness#EligibleDataSources", + "traits": { + "smithy.api#documentation": "

Specifies data sources in a Amazon Q application to use for content\n generation.

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

Rules for retrieving content from data sources connected to a Amazon Q\n application for a specific topic control configuration.

" + } + }, + "com.amazonaws.qbusiness#ContentType": { + "type": "enum", + "members": { + "PDF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PDF" + } + }, + "HTML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HTML" + } + }, + "MS_WORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MS_WORD" + } + }, + "PLAIN_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PLAIN_TEXT" + } + }, + "PPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PPT" + } + }, + "RTF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RTF" + } + }, + "XML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "XML" + } + }, + "XSLT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "XSLT" + } + }, + "MS_EXCEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MS_EXCEL" + } + }, + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JSON" + } + }, + "MD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MD" + } + } + } + }, + "com.amazonaws.qbusiness#Conversation": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q conversation.

" + } + }, + "title": { + "target": "com.amazonaws.qbusiness#ConversationTitle", + "traits": { + "smithy.api#documentation": "

The title of the conversation.

" + } + }, + "startTime": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The start time of the conversation.

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

A conversation in an Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#ConversationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#ConversationTitle": { + "type": "string" + }, + "com.amazonaws.qbusiness#Conversations": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Conversation" + } + }, + "com.amazonaws.qbusiness#CreateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetApplication", + "qbusiness:TagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole", + "kms:DescribeKey", + "kms:CreateGrant" + ], + "smithy.api#documentation": "

Creates an Amazon Q application.

", + "smithy.api#http": { + "uri": "/applications", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#CreateApplicationRequest": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.qbusiness#ApplicationName", + "traits": { + "smithy.api#documentation": "

A name for the Amazon Q application.

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon\n CloudWatch logs and metrics.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qbusiness#Description", + "traits": { + "smithy.api#documentation": "

A description for the Amazon Q application.

" + } + }, + "encryptionConfiguration": { + "target": "com.amazonaws.qbusiness#EncryptionConfiguration", + "traits": { + "smithy.api#documentation": "

The identifier of the KMS key that is used to encrypt your data.\n Amazon Q doesn't support asymmetric keys.

" + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A list of key-value pairs that identify or categorize your Amazon Q application.\n You can also use tags to help control access to the application. Tag keys and values can\n consist of Unicode letters, digits, white space, and any of the following symbols: _ . :\n / = + - @.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify the request to create your Amazon Q\n application.

", + "smithy.api#idempotencyToken": {} + } + }, + "attachmentsConfiguration": { + "target": "com.amazonaws.qbusiness#AttachmentsConfiguration", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

An option to allow end users to upload files directly during chat.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreateApplicationResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

" + } + }, + "applicationArn": { + "target": "com.amazonaws.qbusiness#ApplicationArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q application.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#CreateDataSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreateDataSourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreateDataSourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetDataSource", + "qbusiness:TagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Creates a data source connector for an Amazon Q application.

\n

\n CreateDataSource is a synchronous operation. The operation returns 200 if\n the data source was successfully created. Otherwise, an exception is raised.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#CreateDataSourceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application the data source will be attached\n to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index that you want to use with the data source\n connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#DataSourceName", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A name for the data source connector.

", + "smithy.api#required": {} + } + }, + "configuration": { + "target": "com.amazonaws.qbusiness#DataSourceConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information to connect to your data source repository. For configuration\n templates for your specific data source, see Supported\n connectors.

", + "smithy.api#required": {} + } + }, + "vpcConfiguration": { + "target": "com.amazonaws.qbusiness#DataSourceVpcConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information for an Amazon VPC (Virtual Private Cloud) to connect\n to your data source. For more information, see Using\n Amazon VPC with Amazon Q connectors.

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

A description for the data source connector.

" + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A list of key-value pairs that identify or categorize the data source connector. You\n can also use tags to help control access to the data source connector. Tag keys and\n values can consist of Unicode letters, digits, white space, and any of the following\n symbols: _ . : / = + - @.

" + } + }, + "syncSchedule": { + "target": "com.amazonaws.qbusiness#SyncSchedule", + "traits": { + "smithy.api#documentation": "

Sets the frequency for Amazon Q to check the documents in your data source\n repository and update your index. If you don't set a schedule, Amazon Q won't\n periodically update the index.

\n

Specify a cron- format schedule string or an empty string to indicate\n that the index is updated on demand. You can't specify the Schedule\n parameter when the Type parameter is set to CUSTOM. If you do,\n you receive a ValidationException exception.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permission to access\n the data source and required resources.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token you provide to identify a request to create a data source connector. Multiple\n calls to the CreateDataSource API with the same client token will create\n only one data source connector.

", + "smithy.api#idempotencyToken": {} + } + }, + "documentEnrichmentConfiguration": { + "target": "com.amazonaws.qbusiness#DocumentEnrichmentConfiguration" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreateDataSourceResponse": { + "type": "structure", + "members": { + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

" + } + }, + "dataSourceArn": { + "target": "com.amazonaws.qbusiness#DataSourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a data source in an Amazon Q application.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#CreateIndex": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreateIndexRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreateIndexResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetIndex", "qbusiness:TagResource", "qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Creates an Amazon Q index.

\n

To determine if index creation has completed, check the Status field\n returned from a call to DescribeIndex. The Status field is set\n to ACTIVE when the index is ready to use.

\n

Once the index is active, you can index your documents using the \n BatchPutDocument\n API or the \n CreateDataSource\n API.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#CreateIndexRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application using the index.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#IndexName", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A name for the Amazon Q index.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qbusiness#Description", + "traits": { + "smithy.api#documentation": "

A description for the Amazon Q index.

" + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A list of key-value pairs that identify or categorize the index. You can also use tags\n to help control access to the index. Tag keys and values can consist of Unicode letters,\n digits, white space, and any of the following symbols: _ . : / = + - @.

" + } + }, + "capacityConfiguration": { + "target": "com.amazonaws.qbusiness#IndexCapacityConfiguration", + "traits": { + "smithy.api#documentation": "

The capacity units you want to provision for your index. You can add and remove\n capacity to fit your usage needs.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify the request to create an index. Multiple calls to\n the CreateIndex API with the same client token will create only one\n index.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreateIndexResponse": { + "type": "structure", + "members": { + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier for the Amazon Q index.

" + } + }, + "indexArn": { + "target": "com.amazonaws.qbusiness#IndexArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon Q index.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#CreatePlugin": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreatePluginRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreatePluginResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetPlugin", + "qbusiness:TagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Creates an Amazon Q plugin.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/plugins" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#CreatePluginRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application that will contain the plugin.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#PluginName", + "traits": { + "smithy.api#documentation": "

A the name for your plugin.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qbusiness#PluginType", + "traits": { + "smithy.api#documentation": "

The type of plugin you want to create.

", + "smithy.api#required": {} + } + }, + "serverUrl": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

The source URL used for plugin configuration.

", + "smithy.api#required": {} + } + }, + "authConfiguration": { + "target": "com.amazonaws.qbusiness#PluginAuthConfiguration", + "traits": { + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A list of key-value pairs that identify or categorize the data source connector. You\n can also use tags to help control access to the data source connector. Tag keys and\n values can consist of Unicode letters, digits, white space, and any of the following\n symbols: _ . : / = + - @.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify the request to create your Amazon Q\n plugin.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreatePluginResponse": { + "type": "structure", + "members": { + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin created.

" + } + }, + "pluginArn": { + "target": "com.amazonaws.qbusiness#PluginArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a plugin.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#CreateRetriever": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreateRetrieverRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreateRetrieverResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:TagResource", + "qbusiness:ListTagsForResource", + "qbusiness:GetRetriever", + "iam:PassRole" + ], + "smithy.api#documentation": "

Adds a retriever to your Amazon Q application.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/retrievers" + } + } + }, + "com.amazonaws.qbusiness#CreateRetrieverRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of your Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qbusiness#RetrieverType", + "traits": { + "aws.cloudformation#cfnMutability": "create-and-read", + "smithy.api#documentation": "

The type of retriever you are using.

", + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#RetrieverName", + "traits": { + "smithy.api#documentation": "

The name of your retriever.

", + "smithy.api#required": {} + } + }, + "configuration": { + "target": "com.amazonaws.qbusiness#RetrieverConfiguration", + "traits": { + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The ARN of an IAM role used by Amazon Q to access the basic\n authentication credentials stored in a Secrets Manager secret.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify the request to create your Amazon Q\n application retriever.

", + "smithy.api#idempotencyToken": {} + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A list of key-value pairs that identify or categorize the retriever. You can also use\n tags to help control access to the retriever. Tag keys and values can consist of Unicode\n letters, digits, white space, and any of the following symbols: _ . : / = + - @.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreateRetrieverResponse": { + "type": "structure", + "members": { + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId", + "traits": { + "smithy.api#documentation": "

The identifier of the retriever you are using.

" + } + }, + "retrieverArn": { + "target": "com.amazonaws.qbusiness#RetrieverArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role associated with a retriever.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#CreateUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreateUserRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreateUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a universally unique identifier (UUID) mapped to a list of local user ids\n within an application.

", + "smithy.api#http": { + "method": "POST", + "uri": "/applications/{applicationId}/users" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#CreateUserRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application for which the user mapping will be created.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The user emails attached to a user mapping.

", + "smithy.api#required": {} + } + }, + "userAliases": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

The list of user aliases in the mapping.

", + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify the request to create your Amazon Q user\n mapping.

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreateUserResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#CreateWebExperience": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#CreateWebExperienceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#CreateWebExperienceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetWebExperience", + "qbusiness:TagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Creates an Amazon Q web experience.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/experiences", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#CreateWebExperienceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.qbusiness#WebExperienceTitle", + "traits": { + "smithy.api#documentation": "

The title for your Amazon Q web experience.

" + } + }, + "subtitle": { + "target": "com.amazonaws.qbusiness#WebExperienceSubtitle", + "traits": { + "smithy.api#documentation": "

A subtitle to personalize your Amazon Q web experience.

" + } + }, + "welcomeMessage": { + "target": "com.amazonaws.qbusiness#WebExperienceWelcomeMessage", + "traits": { + "smithy.api#documentation": "

The customized welcome message for end users of an Amazon Q web\n experience.

" + } + }, + "samplePromptsControlMode": { + "target": "com.amazonaws.qbusiness#WebExperienceSamplePromptsControlMode", + "traits": { + "smithy.api#documentation": "

Determines whether sample prompts are enabled in the web experience for an end\n user.

" + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "full", + "smithy.api#documentation": "

A list of key-value pairs that identify or categorize your Amazon Q web\n experience. You can also use tags to help control access to the web experience. Tag keys\n and values can consist of Unicode letters, digits, white space, and any of the following\n symbols: _ . : / = + - @.

" + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token you provide to identify a request to create an Amazon Q web experience.\n

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#CreateWebExperienceResponse": { + "type": "structure", + "members": { + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience.

" + } + }, + "webExperienceArn": { + "target": "com.amazonaws.qbusiness#WebExperienceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon Q web experience.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DataSource": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.qbusiness#DataSourceName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon Q data source.

" + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q data source.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The type of the Amazon Q data source.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q data source was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q data source was last updated.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#DataSourceStatus", + "traits": { + "smithy.api#documentation": "

The status of the Amazon Q data source.

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

A data source in an Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#DataSourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#DataSourceConfiguration": { + "type": "document", + "traits": { + "smithy.api#documentation": "

Provides the configuration information for an Amazon Q data source.

" + } + }, + "com.amazonaws.qbusiness#DataSourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#DataSourceIds": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DataSourceId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.qbusiness#DataSourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.qbusiness#DataSourceResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId" + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId" + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId" + } + }, + "create": { + "target": "com.amazonaws.qbusiness#CreateDataSource" + }, + "read": { + "target": "com.amazonaws.qbusiness#GetDataSource" + }, + "update": { + "target": "com.amazonaws.qbusiness#UpdateDataSource" + }, + "delete": { + "target": "com.amazonaws.qbusiness#DeleteDataSource" + }, + "list": { + "target": "com.amazonaws.qbusiness#ListDataSources" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "DataSource" + } + } + }, + "com.amazonaws.qbusiness#DataSourceStatus": { + "type": "enum", + "members": { + "PENDING_CREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_CREATION" + } + }, + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + } + } + }, + "com.amazonaws.qbusiness#DataSourceSyncJob": { + "type": "structure", + "members": { + "executionId": { + "target": "com.amazonaws.qbusiness#ExecutionId", + "traits": { + "smithy.api#documentation": "

The identifier of a data source synchronization job.

" + } + }, + "startTime": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix time stamp when the data source synchronization job started.

" + } + }, + "endTime": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the synchronization job completed.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#DataSourceSyncJobStatus", + "traits": { + "smithy.api#documentation": "

The status of the synchronization job. When the Status field is set to\n SUCCEEDED, the synchronization job is done. If the status code is\n FAILED, the ErrorCode and ErrorMessage fields\n give you the reason for the failure.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "smithy.api#documentation": "

If the Status field is set to FAILED, the\n ErrorCode field indicates the reason the synchronization failed.

" + } + }, + "dataSourceErrorCode": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

If the reason that the synchronization failed is due to an error with the underlying\n data source, this field contains a code that identifies the error.

" + } + }, + "metrics": { + "target": "com.amazonaws.qbusiness#DataSourceSyncJobMetrics", + "traits": { + "smithy.api#documentation": "

Maps a batch delete document request to a specific data source sync job. This is\n optional and should only be supplied when documents are deleted by a data source\n connector.

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

Provides information about an Amazon Q data source connector synchronization\n job.

" + } + }, + "com.amazonaws.qbusiness#DataSourceSyncJobMetrics": { + "type": "structure", + "members": { + "documentsAdded": { + "target": "com.amazonaws.qbusiness#MetricValue", + "traits": { + "smithy.api#documentation": "

The current count of documents added from the data source during the data source\n sync.

" + } + }, + "documentsModified": { + "target": "com.amazonaws.qbusiness#MetricValue", + "traits": { + "smithy.api#documentation": "

The current count of documents modified in the data source during the data source\n sync.

" + } + }, + "documentsDeleted": { + "target": "com.amazonaws.qbusiness#MetricValue", + "traits": { + "smithy.api#documentation": "

The current count of documents deleted from the data source during the data source\n sync.

" + } + }, + "documentsFailed": { + "target": "com.amazonaws.qbusiness#MetricValue", + "traits": { + "smithy.api#documentation": "

The current count of documents that failed to sync from the data source during the\n data source sync.

" + } + }, + "documentsScanned": { + "target": "com.amazonaws.qbusiness#MetricValue", + "traits": { + "smithy.api#documentation": "

The current count of documents crawled by the ongoing sync job in the data\n source.

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

Maps a batch delete document request to a specific Amazon Q data source connector\n sync job.

" + } + }, + "com.amazonaws.qbusiness#DataSourceSyncJobStatus": { + "type": "enum", + "members": { + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "SYNCING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYNCING" + } + }, + "INCOMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INCOMPLETE" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPING" + } + }, + "ABORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ABORTED" + } + }, + "SYNCING_INDEXING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYNCING_INDEXING" + } + } + } + }, + "com.amazonaws.qbusiness#DataSourceSyncJobs": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DataSourceSyncJob" + } + }, + "com.amazonaws.qbusiness#DataSourceUserId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#DataSourceVpcConfiguration": { + "type": "structure", + "members": { + "subnetIds": { + "target": "com.amazonaws.qbusiness#SubnetIds", + "traits": { + "smithy.api#documentation": "

A list of identifiers for subnets within your Amazon VPC. The subnets should\n be able to connect to each other in the VPC, and they should have outgoing access to the\n Internet through a NAT device.

", + "smithy.api#required": {} + } + }, + "securityGroupIds": { + "target": "com.amazonaws.qbusiness#SecurityGroupIds", + "traits": { + "smithy.api#documentation": "

A list of identifiers of security groups within your Amazon VPC. The security\n groups should enable Amazon Q to connect to the data source.

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

Provides configuration information needed to connect to an Amazon VPC (Virtual\n Private Cloud).

" + } + }, + "com.amazonaws.qbusiness#DataSources": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DataSource" + } + }, + "com.amazonaws.qbusiness#DeleteApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteApplicationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetApplication", "kms:RetireGrant"], + "smithy.api#documentation": "

Deletes an Amazon Q application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteApplicationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteChatControlsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteChatControlsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteChatControlsConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes chat controls configured for an existing Amazon Q application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/chatcontrols", + "method": "DELETE", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteChatControlsConfigurationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application the chat controls have been configured for.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteChatControlsConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteConversation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteConversationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteConversationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#LicenseNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an Amazon Q web experience conversation.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/conversations/{conversationId}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteConversationRequest": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience conversation being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application associated with the\n conversation.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user who is deleting the conversation.

", + "smithy.api#httpQuery": "userId", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteConversationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteDataSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteDataSourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteDataSourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetDataSource"], + "smithy.api#documentation": "

Deletes an Amazon Q data source connector. While the data source is being\n deleted, the Status field returned by a call to the\n DescribeDataSource API is set to DELETING.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteDataSourceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application used with the data source\n connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index used with the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector that you want to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteDataSourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteDocument": { + "type": "structure", + "members": { + "documentId": { + "target": "com.amazonaws.qbusiness#DocumentId", + "traits": { + "smithy.api#documentation": "

The identifier of the deleted document.

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

A document deleted from an Amazon Q data source connector.

" + } + }, + "com.amazonaws.qbusiness#DeleteDocuments": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DeleteDocument" + } + }, + "com.amazonaws.qbusiness#DeleteGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteGroupRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a group so that all users and sub groups that belong to the group can no\n longer access documents only available to that group. For example, after deleting the\n group \"Summer Interns\", all interns who belonged to that group no longer see intern-only\n documents in their chat results.

\n

If you want to delete, update, or replace users or sub groups of a group, you need to\n use the PutGroup operation. For example, if a user in the group\n \"Engineering\" leaves the engineering team and another user takes their place, you\n provide an updated list of users or sub groups that belong to the \"Engineering\" group\n when calling PutGroup.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/applications/{applicationId}/indices/{indexId}/groups/{groupName}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteGroupRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application in which the group mapping belongs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index you want to delete the group from.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "groupName": { + "target": "com.amazonaws.qbusiness#GroupName", + "traits": { + "smithy.api#documentation": "

The name of the group you want to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source linked to the group

\n

A group can be tied to multiple data sources. You can delete a group from accessing\n documents in a certain data source. For example, the groups \"Research\", \"Engineering\",\n and \"Sales and Marketing\" are all tied to the company's documents stored in the data\n sources Confluence and Salesforce. You want to delete \"Research\" and \"Engineering\"\n groups from Salesforce, so that these groups cannot access customer-related documents\n stored in Salesforce. Only \"Sales and Marketing\" should access documents in the\n Salesforce data source.

", + "smithy.api#httpQuery": "dataSourceId" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteGroupResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteIndex": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteIndexRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteIndexResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetIndex"], + "smithy.api#documentation": "

Deletes an Amazon Q index.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteIndexRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application the Amazon Q index is linked\n to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q index.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteIndexResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeletePlugin": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeletePluginRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeletePluginResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetPlugin"], + "smithy.api#documentation": "

Deletes an Amazon Q plugin.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/applications/{applicationId}/plugins/{pluginId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeletePluginRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier the application attached to the Amazon Q plugin.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeletePluginResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteRetriever": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteRetrieverRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteRetrieverResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetRetriever"], + "smithy.api#documentation": "

Deletes the retriever used by an Amazon Q application.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/applications/{applicationId}/retrievers/{retrieverId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteRetrieverRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application using the retriever.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId", + "traits": { + "smithy.api#documentation": "

The identifier of the retriever being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteRetrieverResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteUserRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a user by email id.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/applications/{applicationId}/users/{userId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteUserRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application from which the user is being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The user email being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteUserResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#DeleteWebExperience": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#DeleteWebExperienceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#DeleteWebExperienceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:GetWebExperience"], + "smithy.api#documentation": "

Deletes an Amazon Q web experience.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/experiences/{webExperienceId}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#DeleteWebExperienceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application linked to the Amazon Q web\n experience.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience being deleted.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#DeleteWebExperienceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#Document": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.qbusiness#DocumentId", + "traits": { + "smithy.api#documentation": "

The identifier of the document.

", + "smithy.api#required": {} + } + }, + "attributes": { + "target": "com.amazonaws.qbusiness#DocumentAttributes", + "traits": { + "smithy.api#documentation": "

Custom attributes to apply to the document for refining Amazon Q web experience\n responses.

" + } + }, + "content": { + "target": "com.amazonaws.qbusiness#DocumentContent", + "traits": { + "smithy.api#documentation": "

The contents of the document.

" + } + }, + "contentType": { + "target": "com.amazonaws.qbusiness#ContentType", + "traits": { + "smithy.api#documentation": "

The file type of the document in the Blob field.

\n

If you want to index snippets or subsets of HTML documents instead of the entirety of\n the HTML documents, you add the HTML start and closing tags\n (<HTML>content</HTML>) around the content.

" + } + }, + "title": { + "target": "com.amazonaws.qbusiness#Title", + "traits": { + "smithy.api#documentation": "

The title of the document.

" + } + }, + "accessConfiguration": { + "target": "com.amazonaws.qbusiness#AccessConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information for access permission to a document.

" + } + }, + "documentEnrichmentConfiguration": { + "target": "com.amazonaws.qbusiness#DocumentEnrichmentConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for altering document metadata and content during the\n document ingestion process.

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

A document in an Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#DocumentAttribute": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#DocumentAttributeKey", + "traits": { + "smithy.api#documentation": "

The identifier for the attribute.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.qbusiness#DocumentAttributeValue", + "traits": { + "smithy.api#documentation": "

The value of the attribute.

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

A document attribute or metadata field.

" + } + }, + "com.amazonaws.qbusiness#DocumentAttributeCondition": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.qbusiness#DocumentAttributeKey", + "traits": { + "smithy.api#documentation": "

The identifier of the document attribute used for the condition.

\n

For example, 'Source_URI' could be an identifier for the attribute or metadata field\n that contains source URIs associated with the documents.

\n

Amazon Q currently doesn't support _document_body as an attribute\n key used for the condition.

", + "smithy.api#required": {} + } + }, + "operator": { + "target": "com.amazonaws.qbusiness#DocumentEnrichmentConditionOperator", + "traits": { + "smithy.api#documentation": "

The identifier of the document attribute used for the condition.

\n

For example, 'Source_URI' could be an identifier for the attribute or metadata field\n that contains source URIs associated with the documents.

\n

Amazon Kendra currently does not support _document_body as an\n attribute key used for the condition.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.qbusiness#DocumentAttributeValue" + } + }, + "traits": { + "smithy.api#documentation": "

The condition used for the target document attribute or metadata field when ingesting\n documents into Amazon Q. You use this with \n DocumentAttributeTarget\n to apply the condition.

\n

For example, you can create the 'Department' target field and have it prefill\n department names associated with the documents based on information in the 'Source_URI'\n field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI\n value, then prefill the target field 'Department' with the target value 'Finance' for\n the document.

\n

Amazon Q can't create a target field if it has not already been created as an\n index field. After you create your index field, you can create a document metadata field\n using DocumentAttributeTarget. Amazon Q then will map your newly\n created metadata field to your index field.

" + } + }, + "com.amazonaws.qbusiness#DocumentAttributeConfiguration": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The name of the document attribute.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#AttributeType", + "traits": { + "smithy.api#documentation": "

The type of document attribute.

" + } + }, + "search": { + "target": "com.amazonaws.qbusiness#Status", + "traits": { + "smithy.api#documentation": "

Information about whether the document attribute can be used by an end user to search\n for information on their web experience.

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

Configuration information for document attributes. Document attributes are metadata or\n fields associated with your documents. For example, the company department name\n associated with each document.

\n

For more information, see Understanding document attributes.

" + } + }, + "com.amazonaws.qbusiness#DocumentAttributeConfigurations": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DocumentAttributeConfiguration" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 500 + } + } + }, + "com.amazonaws.qbusiness#DocumentAttributeKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.qbusiness#DocumentAttributeStringListValue": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#String" + } + }, + "com.amazonaws.qbusiness#DocumentAttributeStringValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + } + } + }, + "com.amazonaws.qbusiness#DocumentAttributeTarget": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.qbusiness#DocumentAttributeKey", + "traits": { + "smithy.api#documentation": "

The identifier of the target document attribute or metadata field. For example,\n 'Department' could be an identifier for the target attribute or metadata field that\n includes the department names associated with the documents.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.qbusiness#DocumentAttributeValue" + }, + "attributeValueOperator": { + "target": "com.amazonaws.qbusiness#AttributeValueOperator", + "traits": { + "smithy.api#documentation": "

\n TRUE to delete the existing target value for your specified target\n attribute key. You cannot create a target value and set this to\n TRUE.

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

The target document attribute or metadata field you want to alter when ingesting\n documents into Amazon Q.

\n

For example, you can delete all customer identification numbers associated with the\n documents, stored in the document metadata field called 'Customer_ID' by setting the\n target key as 'Customer_ID' and the deletion flag to TRUE. This removes all\n customer ID values in the field 'Customer_ID'. This would scrub personally identifiable\n information from each document's metadata.

\n

Amazon Q can't create a target field if it has not already been created as an\n index field. After you create your index field, you can create a document metadata field\n using \n DocumentAttributeTarget\n . Amazon Q\n will then map your newly created document attribute to your index field.

\n

You can also use this with \n DocumentAttributeCondition\n .

" + } + }, + "com.amazonaws.qbusiness#DocumentAttributeValue": { + "type": "union", + "members": { + "stringValue": { + "target": "com.amazonaws.qbusiness#DocumentAttributeStringValue", + "traits": { + "smithy.api#documentation": "

A string.

", + "smithy.api#length": { + "max": 2048 + } + } + }, + "stringListValue": { + "target": "com.amazonaws.qbusiness#DocumentAttributeStringListValue", + "traits": { + "smithy.api#documentation": "

A list of strings.

" + } + }, + "longValue": { + "target": "com.amazonaws.qbusiness#Long", + "traits": { + "smithy.api#documentation": "

A long integer value.

" + } + }, + "dateValue": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

A date expressed as an ISO 8601 string.

\n

It's important for the time zone to be included in the ISO 8601 date-time format. For\n example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012\n at 12:30PM (plus 10 seconds) in Central European Time.

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

The value of a document attribute. You can only provide one value for a document\n attribute.

" + } + }, + "com.amazonaws.qbusiness#DocumentAttributes": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DocumentAttribute" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 500 + } + } + }, + "com.amazonaws.qbusiness#DocumentContent": { + "type": "union", + "members": { + "blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The contents of the document. Documents passed to the blob parameter must\n be base64 encoded. Your code might not need to encode the document file bytes if you're\n using an Amazon Web Services SDK to call Amazon Q APIs. If you are calling the\n Amazon Q endpoint directly using REST, you must base64 encode the contents before\n sending.

" + } + }, + "s3": { + "target": "com.amazonaws.qbusiness#S3", + "traits": { + "smithy.api#documentation": "

The path to the document in an Amazon S3 bucket.

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

The contents of a document.

" + } + }, + "com.amazonaws.qbusiness#DocumentContentOperator": { + "type": "enum", + "members": { + "DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE" + } + } + } + }, + "com.amazonaws.qbusiness#DocumentDetailList": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#DocumentDetails" + } + }, + "com.amazonaws.qbusiness#DocumentDetails": { + "type": "structure", + "members": { + "documentId": { + "target": "com.amazonaws.qbusiness#DocumentId", + "traits": { + "smithy.api#documentation": "

The identifier of the document.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#DocumentStatus", + "traits": { + "smithy.api#documentation": "

The current status of the document.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "smithy.api#documentation": "

An error message associated with the document.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the document was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the document was last updated.

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

The details of a document within an Amazon Q index.

" + } + }, + "com.amazonaws.qbusiness#DocumentEnrichmentConditionOperator": { + "type": "enum", + "members": { + "GREATER_THAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREATER_THAN" + } + }, + "GREATER_THAN_OR_EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREATER_THAN_OR_EQUALS" + } + }, + "LESS_THAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LESS_THAN" + } + }, + "LESS_THAN_OR_EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LESS_THAN_OR_EQUALS" + } + }, + "EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQUALS" + } + }, + "NOT_EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_EQUALS" + } + }, + "CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS" + } + }, + "NOT_CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_CONTAINS" + } + }, + "EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXISTS" + } + }, + "NOT_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_EXISTS" + } + }, + "BEGINS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BEGINS_WITH" + } + } + } + }, + "com.amazonaws.qbusiness#DocumentEnrichmentConfiguration": { + "type": "structure", + "members": { + "inlineConfigurations": { + "target": "com.amazonaws.qbusiness#InlineDocumentEnrichmentConfigurations", + "traits": { + "smithy.api#documentation": "

Configuration information to alter document attributes or metadata fields and content\n when ingesting documents into Amazon Q.

" + } + }, + "preExtractionHookConfiguration": { + "target": "com.amazonaws.qbusiness#HookConfiguration" + }, + "postExtractionHookConfiguration": { + "target": "com.amazonaws.qbusiness#HookConfiguration" + } + }, + "traits": { + "smithy.api#documentation": "

Provides the configuration information for altering document metadata and content\n during the document ingestion process.

\n

For more information, see Custom document\n enrichment.

" + } + }, + "com.amazonaws.qbusiness#DocumentId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1825 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#DocumentStatus": { + "type": "enum", + "members": { + "RECEIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RECEIVED" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROCESSING" + } + }, + "INDEXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED" + } + }, + "UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + }, + "DOCUMENT_FAILED_TO_INDEX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT_FAILED_TO_INDEX" + } + } + } + }, + "com.amazonaws.qbusiness#Documents": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Document" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#EligibleDataSource": { + "type": "structure", + "members": { + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index the data source is attached to.

" + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source.

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

The identifier of the data source Amazon Q will generate responses from.

" + } + }, + "com.amazonaws.qbusiness#EligibleDataSources": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#EligibleDataSource" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.qbusiness#EncryptionConfiguration": { + "type": "structure", + "members": { + "kmsKeyId": { + "target": "com.amazonaws.qbusiness#KmsKeyId", + "traits": { + "smithy.api#documentation": "

The identifier of the KMS key. Amazon Q doesn't support asymmetric\n keys.

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

Provides the identifier of the KMS key used to encrypt data indexed by\n Amazon Q. Amazon Q doesn't support asymmetric keys.

" + } + }, + "com.amazonaws.qbusiness#ErrorCode": { + "type": "enum", + "members": { + "INTERNAL_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalError" + } + }, + "INVALID_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidRequest" + } + }, + "RESOURCE_INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceInactive" + } + }, + "RESOURCE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceNotFound" + } + } + } + }, + "com.amazonaws.qbusiness#ErrorDetail": { + "type": "structure", + "members": { + "errorMessage": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The message explaining the data source sync error.

" + } + }, + "errorCode": { + "target": "com.amazonaws.qbusiness#ErrorCode", + "traits": { + "smithy.api#documentation": "

The code associated with the data source sync error.

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

Provides information about a data source sync error.

" + } + }, + "com.amazonaws.qbusiness#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#ExampleChatMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 350 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#ExampleChatMessages": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#ExampleChatMessage" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.qbusiness#ExecutionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#ExpertQ": { + "type": "service", + "version": "2023-11-27", + "operations": [ + { + "target": "com.amazonaws.qbusiness#BatchDeleteDocument" + }, + { + "target": "com.amazonaws.qbusiness#BatchPutDocument" + }, + { + "target": "com.amazonaws.qbusiness#ChatSync" + }, + { + "target": "com.amazonaws.qbusiness#CreateUser" + }, + { + "target": "com.amazonaws.qbusiness#DeleteChatControlsConfiguration" + }, + { + "target": "com.amazonaws.qbusiness#DeleteConversation" + }, + { + "target": "com.amazonaws.qbusiness#DeleteGroup" + }, + { + "target": "com.amazonaws.qbusiness#DeleteUser" + }, + { + "target": "com.amazonaws.qbusiness#GetChatControlsConfiguration" + }, + { + "target": "com.amazonaws.qbusiness#GetGroup" + }, + { + "target": "com.amazonaws.qbusiness#GetUser" + }, + { + "target": "com.amazonaws.qbusiness#ListConversations" + }, + { + "target": "com.amazonaws.qbusiness#ListDataSourceSyncJobs" + }, + { + "target": "com.amazonaws.qbusiness#ListDocuments" + }, + { + "target": "com.amazonaws.qbusiness#ListGroups" + }, + { + "target": "com.amazonaws.qbusiness#ListMessages" + }, + { + "target": "com.amazonaws.qbusiness#ListTagsForResource" + }, + { + "target": "com.amazonaws.qbusiness#PutFeedback" + }, + { + "target": "com.amazonaws.qbusiness#PutGroup" + }, + { + "target": "com.amazonaws.qbusiness#StartDataSourceSyncJob" + }, + { + "target": "com.amazonaws.qbusiness#StopDataSourceSyncJob" + }, + { + "target": "com.amazonaws.qbusiness#TagResource" + }, + { + "target": "com.amazonaws.qbusiness#UntagResource" + }, + { + "target": "com.amazonaws.qbusiness#UpdateChatControlsConfiguration" + }, + { + "target": "com.amazonaws.qbusiness#UpdateUser" + } + ], + "resources": [ + { + "target": "com.amazonaws.qbusiness#ApplicationResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "QBusiness", + "cloudFormationName": "QBusiness", + "arnNamespace": "qbusiness", + "cloudTrailEventSource": "qbusiness.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "qbusiness" + }, + "aws.protocols#restJson1": { + "http": ["h2", "http/1.1"], + "eventStreamHttp": ["h2"] + }, + "smithy.api#documentation": "

\n

", + "smithy.api#title": "QBusiness", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://qbusiness-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://qbusiness.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://qbusiness-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://qbusiness.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://qbusiness.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.qbusiness#FailedDocument": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.qbusiness#DocumentId", + "traits": { + "smithy.api#documentation": "

The identifier of the document that couldn't be removed from the Amazon Q\n index.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "smithy.api#documentation": "

An explanation for why the document couldn't be removed from the index.

" + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q data source connector that contains the failed\n document.

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

A list of documents that could not be removed from an Amazon Q index. Each entry\n contains an error message that indicates why the document couldn't be removed from the\n index.

" + } + }, + "com.amazonaws.qbusiness#FailedDocuments": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#FailedDocument" + } + }, + "com.amazonaws.qbusiness#GetApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetApplicationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Gets information about an existing Amazon Q application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetApplicationResponse": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.qbusiness#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon Q application.

" + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

" + } + }, + "applicationArn": { + "target": "com.amazonaws.qbusiness#ApplicationArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q application.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM with permissions to access\n your CloudWatch logs and metrics.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#ApplicationStatus", + "traits": { + "smithy.api#documentation": "

The status of the Amazon Q application.

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

A description for the Amazon Q application.

" + } + }, + "encryptionConfiguration": { + "target": "com.amazonaws.qbusiness#EncryptionConfiguration", + "traits": { + "aws.cloudformation#cfnMutability": "create-and-read", + "smithy.api#documentation": "

The identifier of the Amazon Web Services\n KMS key that is used to encrypt your data. Amazon Q doesn't support\n asymmetric keys.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was last updated.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was last updated.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

If the Status field is set to ERROR, the\n ErrorMessage field contains a description of the error that caused the\n synchronization to fail.

" + } + }, + "attachmentsConfiguration": { + "target": "com.amazonaws.qbusiness#AppliedAttachmentsConfiguration", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

Settings for whether end users can upload files directly during chat.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetChatControlsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetChatControlsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetChatControlsConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about an chat controls configured for an existing Amazon Q\n application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/chatcontrols", + "method": "GET", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "topicConfigurations" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetChatControlsConfigurationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application for which the chat controls are configured.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForGetTopicConfigurations", + "traits": { + "smithy.api#documentation": "

The maximum number of configured chat controls to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of Amazon Q chat controls\n configured.

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetChatControlsConfigurationResponse": { + "type": "structure", + "members": { + "responseScope": { + "target": "com.amazonaws.qbusiness#ResponseScope", + "traits": { + "smithy.api#documentation": "

The response scope configured for a Amazon Q application. This determines whether\n your application uses its retrieval augmented generation (RAG) system to generate\n answers only from your enterprise data, or also uses the large language models (LLM)\n knowledge to respons to end user questions in chat.

" + } + }, + "blockedPhrases": { + "target": "com.amazonaws.qbusiness#BlockedPhrasesConfiguration", + "traits": { + "smithy.api#documentation": "

The phrases blocked from chat by your chat control configuration.

" + } + }, + "topicConfigurations": { + "target": "com.amazonaws.qbusiness#TopicConfigurations", + "traits": { + "smithy.api#documentation": "

The topic specific controls configured for a Amazon Q application.

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

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of Amazon Q chat controls\n configured.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetDataSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetDataSourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetDataSourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Gets information about an existing Amazon Q data source connector.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetDataSourceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identfier of the index used with the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetDataSourceResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

" + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index linked to the data source connector.

" + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

" + } + }, + "dataSourceArn": { + "target": "com.amazonaws.qbusiness#DataSourceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the data source.

" + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#DataSourceName", + "traits": { + "smithy.api#documentation": "

The name for the data source connector.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The type of the data source connector. For example, S3.

" + } + }, + "configuration": { + "target": "com.amazonaws.qbusiness#DataSourceConfiguration", + "traits": { + "smithy.api#documentation": "

The details of how the data source connector is configured.

" + } + }, + "vpcConfiguration": { + "target": "com.amazonaws.qbusiness#DataSourceVpcConfiguration", + "traits": { + "smithy.api#documentation": "

Configuration information for an Amazon VPC (Virtual Private Cloud) to connect\n to your data source.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the data source connector was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the data source connector was last updated.

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

The description for the data source connector.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#DataSourceStatus", + "traits": { + "smithy.api#documentation": "

The current status of the data source connector. When the Status field\n value is FAILED, the ErrorMessage field contains a description\n of the error that caused the data source connector to fail.

" + } + }, + "syncSchedule": { + "target": "com.amazonaws.qbusiness#SyncSchedule", + "traits": { + "smithy.api#documentation": "

The schedule for Amazon Q to update the index.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role with permission to access the data source\n and required resources.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

When the Status field value is FAILED, the\n ErrorMessage field contains a description of the error that caused the\n data source connector to fail.

" + } + }, + "documentEnrichmentConfiguration": { + "target": "com.amazonaws.qbusiness#DocumentEnrichmentConfiguration" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetGroupRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes a group by group name.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/indices/{indexId}/groups/{groupName}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetGroupRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application id the group is attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index the group is attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "groupName": { + "target": "com.amazonaws.qbusiness#GroupName", + "traits": { + "smithy.api#documentation": "

The name of the group.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source the group is attached to.

", + "smithy.api#httpQuery": "dataSourceId" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetGroupResponse": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.qbusiness#GroupStatusDetail", + "traits": { + "smithy.api#documentation": "

The current status of the group.

" + } + }, + "statusHistory": { + "target": "com.amazonaws.qbusiness#GroupStatusDetails", + "traits": { + "smithy.api#documentation": "

The status history of the group.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetIndex": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetIndexRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetIndexResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Gets information about an existing Amazon Q index.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetIndexRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application connected to the index.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q index you want information on.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetIndexResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application associated with the index.

" + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q index.

" + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#IndexName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon Q index.

" + } + }, + "indexArn": { + "target": "com.amazonaws.qbusiness#IndexArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q index.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#IndexStatus", + "traits": { + "smithy.api#documentation": "

The current status of the index. When the value is ACTIVE, the index is\n ready for use. If the Status field value is FAILED, the\n ErrorMessage field contains a message that explains why.

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

The description for the Amazon Q index.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q index was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q index was last updated.

" + } + }, + "capacityConfiguration": { + "target": "com.amazonaws.qbusiness#IndexCapacityConfiguration", + "traits": { + "smithy.api#documentation": "

The storage capacity units chosen for your Amazon Q index.

" + } + }, + "documentAttributeConfigurations": { + "target": "com.amazonaws.qbusiness#DocumentAttributeConfigurations", + "traits": { + "smithy.api#documentation": "

Configuration information for document attributes or metadata. Document metadata are\n fields associated with your documents. For example, the company department name\n associated with each document. For more information, see Understanding document attributes.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

When the Status field value is FAILED, the\n ErrorMessage field contains a message that explains why.

" + } + }, + "indexStatistics": { + "target": "com.amazonaws.qbusiness#IndexStatistics", + "traits": { + "smithy.api#documentation": "

Provides information about the number of documents indexed.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetPlugin": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetPluginRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetPluginResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Gets information about an existing Amazon Q plugin.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/plugins/{pluginId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetPluginRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application which contains the plugin.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetPluginResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application which contains the plugin.

" + } + }, + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin.

" + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#PluginName", + "traits": { + "smithy.api#documentation": "

The name of the plugin.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#PluginType", + "traits": { + "smithy.api#documentation": "

The type of the plugin.

" + } + }, + "serverUrl": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

The source URL used for plugin configuration.

" + } + }, + "authConfiguration": { + "target": "com.amazonaws.qbusiness#PluginAuthConfiguration" + }, + "pluginArn": { + "target": "com.amazonaws.qbusiness#PluginArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role with permission to access resources needed\n to create the plugin.

" + } + }, + "state": { + "target": "com.amazonaws.qbusiness#PluginState", + "traits": { + "smithy.api#documentation": "

The current state of the plugin.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the plugin was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the plugin was last updated.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetRetriever": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetRetrieverRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetRetrieverResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Gets information about an existing retriever used by an Amazon Q\n application.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/retrievers/{retrieverId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetRetrieverRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application using the retriever.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId", + "traits": { + "smithy.api#documentation": "

The identifier of the retriever.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetRetrieverResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application using the retriever.

" + } + }, + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId", + "traits": { + "smithy.api#documentation": "

The identifier of the retriever.

" + } + }, + "retrieverArn": { + "target": "com.amazonaws.qbusiness#RetrieverArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role associated with the retriever.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#RetrieverType", + "traits": { + "smithy.api#documentation": "

The type of the retriever.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#RetrieverStatus", + "traits": { + "smithy.api#documentation": "

The status of the retriever.

" + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#RetrieverName", + "traits": { + "smithy.api#documentation": "

The name of the retriever.

" + } + }, + "configuration": { + "target": "com.amazonaws.qbusiness#RetrieverConfiguration" + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role with the permission to access the retriever\n and required resources.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the retriever was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the retriever was last updated.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetUserRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes the universally unique identifier (UUID) associated with a local user in a\n data source.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/users/{userId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetUserRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application connected to the user.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The user email address attached to the user.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetUserResponse": { + "type": "structure", + "members": { + "userAliases": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

A list of user aliases attached to a user.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GetWebExperience": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#GetWebExperienceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#GetWebExperienceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": ["qbusiness:ListTagsForResource"], + "smithy.api#documentation": "

Gets information about an existing Amazon Q web experience.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/experiences/{webExperienceId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#GetWebExperienceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application linked to the web experience.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#GetWebExperienceResponse": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application linked to the web experience.

" + } + }, + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience.

" + } + }, + "webExperienceArn": { + "target": "com.amazonaws.qbusiness#WebExperienceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role with the permission to access the\n Amazon Q web experience and required resources.

" + } + }, + "defaultEndpoint": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

The endpoint of your Amazon Q web experience.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#WebExperienceStatus", + "traits": { + "smithy.api#documentation": "

The current status of the Amazon Q web experience. When the Status\n field value is FAILED, the ErrorMessage field contains a\n description of the error that caused the data source connector to fail.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the retriever was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the data source connector was last updated.

" + } + }, + "title": { + "target": "com.amazonaws.qbusiness#WebExperienceTitle", + "traits": { + "smithy.api#documentation": "

The title for your Amazon Q web experience.

" + } + }, + "subtitle": { + "target": "com.amazonaws.qbusiness#WebExperienceSubtitle", + "traits": { + "smithy.api#documentation": "

The subtitle for your Amazon Q web experience.

" + } + }, + "welcomeMessage": { + "target": "com.amazonaws.qbusiness#WebExperienceWelcomeMessage", + "traits": { + "smithy.api#documentation": "

The customized welcome message for end users of an Amazon Q web\n experience.

" + } + }, + "samplePromptsControlMode": { + "target": "com.amazonaws.qbusiness#WebExperienceSamplePromptsControlMode", + "traits": { + "smithy.api#documentation": "

Determines whether sample prompts are enabled in the web experience for an end\n user.

" + } + }, + "authenticationConfiguration": { + "target": "com.amazonaws.qbusiness#WebExperienceAuthConfiguration", + "traits": { + "smithy.api#documentation": "

The authentication configuration information for your Amazon Q web\n experience.

" + } + }, + "error": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

When the Status field value is FAILED, the\n ErrorMessage field contains a description of the error that caused the\n data source connector to fail.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#GroupMembers": { + "type": "structure", + "members": { + "memberGroups": { + "target": "com.amazonaws.qbusiness#MemberGroups", + "traits": { + "smithy.api#documentation": "

A list of sub groups that belong to a group. For example, the sub groups \"Research\",\n \"Engineering\", and \"Sales and Marketing\" all belong to the group \"Company\".

" + } + }, + "memberUsers": { + "target": "com.amazonaws.qbusiness#MemberUsers", + "traits": { + "smithy.api#documentation": "

A list of users that belong to a group. For example, a list of interns all belong to\n the \"Interns\" group.

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

A list of users or sub groups that belong to a group. This is for generating\n Amazon Q chat results only from document a user has access to.

" + } + }, + "com.amazonaws.qbusiness#GroupName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#GroupStatus": { + "type": "enum", + "members": { + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROCESSING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + } + } + }, + "com.amazonaws.qbusiness#GroupStatusDetail": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.qbusiness#GroupStatus", + "traits": { + "smithy.api#documentation": "

The status of a group.

" + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was last updated.

" + } + }, + "errorDetail": { + "target": "com.amazonaws.qbusiness#ErrorDetail", + "traits": { + "smithy.api#documentation": "

The details of an error associated a group status.

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

Provides the details of a group's status.

" + } + }, + "com.amazonaws.qbusiness#GroupStatusDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#GroupStatusDetail" + } + }, + "com.amazonaws.qbusiness#GroupSummary": { + "type": "structure", + "members": { + "groupName": { + "target": "com.amazonaws.qbusiness#GroupName", + "traits": { + "smithy.api#documentation": "

The name of the group the summary information is for.

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

Summary information for groups.

" + } + }, + "com.amazonaws.qbusiness#GroupSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#GroupSummary" + } + }, + "com.amazonaws.qbusiness#HookConfiguration": { + "type": "structure", + "members": { + "invocationCondition": { + "target": "com.amazonaws.qbusiness#DocumentAttributeCondition", + "traits": { + "smithy.api#documentation": "

The condition used for when a Lambda function should be invoked.

\n

For example, you can specify a condition that if there are empty date-time values,\n then Amazon Q should invoke a function that inserts the current date-time.

" + } + }, + "lambdaArn": { + "target": "com.amazonaws.qbusiness#LambdaArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a role with permission to run a Lambda\n function during ingestion. For more information, see IAM roles for Custom\n Document Enrichment (CDE).

" + } + }, + "s3BucketName": { + "target": "com.amazonaws.qbusiness#S3BucketName", + "traits": { + "smithy.api#documentation": "

Stores the original, raw documents or the structured, parsed documents before and\n after altering them. For more information, see Data contracts for Lambda functions.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a role with permission to run\n PreExtractionHookConfiguration and\n PostExtractionHookConfiguration for altering document metadata and\n content during the document ingestion process.

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

Provides the configuration information for invoking a Lambda function in\n Lambda to alter document metadata and content when ingesting\n documents into Amazon Q.

\n

You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on\n the original or raw documents.

\n

If you want to apply advanced alterations on the Amazon Q structured documents,\n you must configure your Lambda function using PostExtractionHookConfiguration.

\n

You can only invoke one Lambda function. However, this function can invoke\n other functions it requires.

\n

For more information, see Custom document enrichment.

" + } + }, + "com.amazonaws.qbusiness#Index": { + "type": "structure", + "members": { + "displayName": { + "target": "com.amazonaws.qbusiness#IndexName", + "traits": { + "smithy.api#documentation": "

The name of the index.

" + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier for the index.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the index was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the index was last updated.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#IndexStatus", + "traits": { + "smithy.api#documentation": "

The current status of the index. When the status is ACTIVE, the index is\n ready.

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

Summary information for your Amazon Q index.

" + } + }, + "com.amazonaws.qbusiness#IndexArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#IndexCapacityConfiguration": { + "type": "structure", + "members": { + "units": { + "target": "com.amazonaws.qbusiness#IndexCapacityInteger", + "traits": { + "smithy.api#documentation": "

The number of storage units configured for an Amazon Q index.

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

Provides information about index capacity configuration.

" + } + }, + "com.amazonaws.qbusiness#IndexCapacityInteger": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1 + } + } + }, + "com.amazonaws.qbusiness#IndexId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#IndexName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.qbusiness#IndexResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId" + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId" + } + }, + "create": { + "target": "com.amazonaws.qbusiness#CreateIndex" + }, + "read": { + "target": "com.amazonaws.qbusiness#GetIndex" + }, + "update": { + "target": "com.amazonaws.qbusiness#UpdateIndex" + }, + "delete": { + "target": "com.amazonaws.qbusiness#DeleteIndex" + }, + "list": { + "target": "com.amazonaws.qbusiness#ListIndices" + }, + "resources": [ + { + "target": "com.amazonaws.qbusiness#DataSourceResource" + } + ], + "traits": { + "aws.cloudformation#cfnResource": { + "name": "Index" + } + } + }, + "com.amazonaws.qbusiness#IndexStatistics": { + "type": "structure", + "members": { + "textDocumentStatistics": { + "target": "com.amazonaws.qbusiness#TextDocumentStatistics", + "traits": { + "smithy.api#documentation": "

The number of documents indexed.

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

Provides information about the number of documents in an index.

" + } + }, + "com.amazonaws.qbusiness#IndexStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + } + } + }, + "com.amazonaws.qbusiness#IndexedTextBytes": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.qbusiness#IndexedTextDocument": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.qbusiness#Indices": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Index" + } + }, + "com.amazonaws.qbusiness#InlineDocumentEnrichmentConfiguration": { + "type": "structure", + "members": { + "condition": { + "target": "com.amazonaws.qbusiness#DocumentAttributeCondition" + }, + "target": { + "target": "com.amazonaws.qbusiness#DocumentAttributeTarget" + }, + "documentContentOperator": { + "target": "com.amazonaws.qbusiness#DocumentContentOperator", + "traits": { + "smithy.api#documentation": "

\n TRUE to delete content if the condition used for the target attribute is\n met.

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

Provides the configuration information for applying basic logic to alter document\n metadata and content when ingesting documents into Amazon Q.

\n

To apply advanced logic, to go beyond what you can do with basic logic, see \n HookConfiguration\n .

\n

For more information, see Custom document enrichment.

" + } + }, + "com.amazonaws.qbusiness#InlineDocumentEnrichmentConfigurations": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#InlineDocumentEnrichmentConfiguration" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#Integer": { + "type": "integer" + }, + "com.amazonaws.qbusiness#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An issue occurred with the internal server used for your Amazon Q service. Wait\n some minutes and try again, or contact Support for help.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.qbusiness#KendraIndexConfiguration": { + "type": "structure", + "members": { + "indexId": { + "target": "com.amazonaws.qbusiness#KendraIndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Kendra index.

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

Stores an Amazon Kendra index as a retriever.

" + } + }, + "com.amazonaws.qbusiness#KendraIndexId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#KmsKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.qbusiness#LambdaArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws[a-zA-Z-]*:lambda:[a-z-]*-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?$" + } + }, + "com.amazonaws.qbusiness#LicenseNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have permissions to perform the action because your license is inactive. Ask\n your admin to activate your license and try again after your licence is active.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.qbusiness#ListApplications": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListApplicationsRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListApplicationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists Amazon Q applications.

", + "smithy.api#http": { + "uri": "/applications", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "applications" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListApplicationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of Amazon Q applications.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListApplications", + "traits": { + "smithy.api#documentation": "

The maximum number of Amazon Q applications to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListApplicationsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the response is truncated, Amazon Q returns this token. You can use this token\n in a subsequent request to retrieve the next set of applications.

" + } + }, + "applications": { + "target": "com.amazonaws.qbusiness#Applications", + "traits": { + "smithy.api#documentation": "

An array of summary information on the configuration of one or more Amazon Q\n applications.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListConversations": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListConversationsRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListConversationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#LicenseNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists one or more Amazon Q conversations.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/conversations", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "conversations" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListConversationsRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user involved in the Amazon Q web experience conversation.\n

", + "smithy.api#httpQuery": "userId", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of Amazon Q conversations.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListConversations", + "traits": { + "smithy.api#documentation": "

The maximum number of Amazon Q conversations to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListConversationsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the response is truncated, Amazon Q returns this token, which you can use in a\n later request to list the next set of messages.

" + } + }, + "conversations": { + "target": "com.amazonaws.qbusiness#Conversations", + "traits": { + "smithy.api#documentation": "

An array of summary information on the configuration of one or more Amazon Q web\n experiences.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListDataSourceSyncJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListDataSourceSyncJobsRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListDataSourceSyncJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Get information about an Amazon Q data source connector synchronization.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/syncjobs", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "history" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListDataSourceSyncJobsRequest": { + "type": "structure", + "members": { + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application connected to the data source.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index used with the Amazon Q data source connector.

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

If the maxResults response was incpmplete because there is more data to\n retriever, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of responses.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListDataSourcesSyncJobs", + "traits": { + "smithy.api#documentation": "

The maximum number of synchronization jobs to return in the response.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "startTime": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The start time of the data source connector sync.

", + "smithy.api#httpQuery": "startTime" + } + }, + "endTime": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The end time of the data source connector sync.

", + "smithy.api#httpQuery": "endTime" + } + }, + "statusFilter": { + "target": "com.amazonaws.qbusiness#DataSourceSyncJobStatus", + "traits": { + "smithy.api#documentation": "

Only returns synchronization jobs with the Status field equal to the\n specified status.

", + "smithy.api#httpQuery": "syncStatus" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListDataSourceSyncJobsResponse": { + "type": "structure", + "members": { + "history": { + "target": "com.amazonaws.qbusiness#DataSourceSyncJobs", + "traits": { + "smithy.api#documentation": "

A history of synchronization jobs for the data source connector.

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

If the response is truncated, Amazon Q returns this token. You can use this token\n in any subsequent request to retrieve the next set of jobs.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListDataSources": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListDataSourcesRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListDataSourcesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the Amazon Q data source connectors that you have created.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "dataSources" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListDataSourcesRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application linked to the data source\n connectors.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index used with one or more data source connectors.

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

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of Amazon Q data source\n connectors.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListDataSources", + "traits": { + "smithy.api#documentation": "

The maximum number of data source connectors to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListDataSourcesResponse": { + "type": "structure", + "members": { + "dataSources": { + "target": "com.amazonaws.qbusiness#DataSources", + "traits": { + "smithy.api#documentation": "

An array of summary information for one or more data source connector.

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

If the response is truncated, Amazon Q returns this token. You can use this token\n in a subsequent request to retrieve the next set of data source connectors.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListDocuments": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListDocumentsRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListDocumentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

A list of documents attached to an index.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/index/{indexId}/documents", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "documentDetailList" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListDocumentsRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application id the documents are attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index the documents are attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSourceIds": { + "target": "com.amazonaws.qbusiness#DataSourceIds", + "traits": { + "smithy.api#documentation": "

The identifier of the data sources the documents are attached to.

", + "smithy.api#httpQuery": "dataSourceIds" + } + }, + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of documents.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListDocuments", + "traits": { + "smithy.api#documentation": "

The maximum number of documents to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListDocumentsResponse": { + "type": "structure", + "members": { + "documentDetailList": { + "target": "com.amazonaws.qbusiness#DocumentDetailList", + "traits": { + "smithy.api#documentation": "

A list of document details.

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

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of documents.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListGroups": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListGroupsRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListGroupsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Provides a list of groups that are mapped to users.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/indices/{indexId}/groups" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "items" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListGroupsRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application for getting a list of groups mapped to users.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index for getting a list of groups mapped to users.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "updatedEarlierThan": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp identifier used for the latest PUT or DELETE\n action for mapping users to their groups.

", + "smithy.api#httpQuery": "updatedEarlierThan", + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source for getting a list of groups mapped to users.

", + "smithy.api#httpQuery": "dataSourceId" + } + }, + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the previous response was incomplete (because there is more data to retrieve),\n Amazon Q returns a pagination token in the response. You can use this pagination\n token to retrieve the next set of groups that are mapped to users.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListGroupsRequest", + "traits": { + "smithy.api#documentation": "

The maximum number of returned groups that are mapped to users.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListGroupsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the response is truncated, Amazon Q returns this token that you can use in the\n subsequent request to retrieve the next set of groups that are mapped to users.

" + } + }, + "items": { + "target": "com.amazonaws.qbusiness#GroupSummaryList", + "traits": { + "smithy.api#documentation": "

Summary information for list of groups that are mapped to users.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListIndices": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListIndicesRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListIndicesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the Amazon Q indices you have created.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "indices" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListIndicesRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application connected to the index.

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

If the maxResults response was incomplete because there is more data to retrieve,\n Amazon Q returns a pagination token in the response. You can use this pagination\n token to retrieve the next set of Amazon Q indices.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListIndices", + "traits": { + "smithy.api#documentation": "

The maximum number of indices to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListIndicesResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the response is truncated, Amazon Q returns this token that you can use in the\n subsequent request to retrieve the next set of indexes.

" + } + }, + "indices": { + "target": "com.amazonaws.qbusiness#Indices", + "traits": { + "smithy.api#documentation": "

An array of information on the items in one or more indexes.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListMessages": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListMessagesRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListMessagesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#LicenseNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets a list of messages associated with an Amazon Q web experience.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/conversations/{conversationId}", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "messages" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListMessagesRequest": { + "type": "structure", + "members": { + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience conversation.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier for the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user involved in the Amazon Q web experience\n conversation.

", + "smithy.api#httpQuery": "userId", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the number of retrievers returned exceeds maxResults, Amazon Q\n returns a next token as a pagination token to retrieve the next set of messages.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListMessages", + "traits": { + "smithy.api#documentation": "

The maximum number of messages to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListMessagesResponse": { + "type": "structure", + "members": { + "messages": { + "target": "com.amazonaws.qbusiness#Messages", + "traits": { + "smithy.api#documentation": "

An array of information on one or more messages.

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

If the response is truncated, Amazon Q returns this token, which you can use in a\n later request to list the next set of messages.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListPlugins": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListPluginsRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListPluginsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists configured Amazon Q plugins.

", + "smithy.api#http": { + "method": "GET", + "uri": "/applications/{applicationId}/plugins" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "plugins" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListPluginsRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application the plugin is attached to.

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

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of plugins.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListPlugins", + "traits": { + "smithy.api#documentation": "

The maximum number of documents to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListPluginsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qbusiness#NextToken", + "traits": { + "smithy.api#documentation": "

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of plugins.

" + } + }, + "plugins": { + "target": "com.amazonaws.qbusiness#Plugins", + "traits": { + "smithy.api#documentation": "

Information about a configured plugin.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListRetrievers": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListRetrieversRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListRetrieversResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the retriever used by an Amazon Q application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/retrievers", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "retrievers" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListRetrieversRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application using the retriever.

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

If the number of retrievers returned exceeds maxResults, Amazon Q\n returns a next token as a pagination token to retrieve the next set of\n retrievers.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListRetrieversRequest", + "traits": { + "smithy.api#documentation": "

The maximum number of retrievers returned.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListRetrieversResponse": { + "type": "structure", + "members": { + "retrievers": { + "target": "com.amazonaws.qbusiness#Retrievers", + "traits": { + "smithy.api#documentation": "

An array of summary information for one or more retrievers.

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

If the response is truncated, Amazon Q returns this token, which you can use in a\n later request to list the next set of retrievers.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets a list of tags associated with a specified resource. Amazon Q applications\n and data sources can have tags associated with them.

", + "smithy.api#http": { + "uri": "/v1/tags/{resourceARN}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.qbusiness#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q application or data source to get\n a list of tags for.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "smithy.api#documentation": "

A list of tags associated with the Amazon Q application or data source.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ListWebExperiences": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#ListWebExperiencesRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#ListWebExperiencesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists one or more Amazon Q Web Experiences.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/experiences", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "webExperiences" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qbusiness#ListWebExperiencesRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application linked to the listed web\n experiences.

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

If the maxResults response was incomplete because there is more data to\n retrieve, Amazon Q returns a pagination token in the response. You can use this\n pagination token to retrieve the next set of Amazon Q conversations.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qbusiness#MaxResultsIntegerForListWebExperiencesRequest", + "traits": { + "smithy.api#documentation": "

The maximum number of Amazon Q Web Experiences to return.

", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#ListWebExperiencesResponse": { + "type": "structure", + "members": { + "webExperiences": { + "target": "com.amazonaws.qbusiness#WebExperiences", + "traits": { + "smithy.api#documentation": "

An array of summary information for one or more Amazon Q experiences.

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

If the response is truncated, Amazon Q returns this token, which you can use in a\n later request to list the next set of messages.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#Long": { + "type": "long" + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForGetTopicConfigurations": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListApplications": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListConversations": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListDataSources": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListDataSourcesSyncJobs": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListDocuments": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListGroupsRequest": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListIndices": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListMessages": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListPlugins": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListRetrieversRequest": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.qbusiness#MaxResultsIntegerForListWebExperiencesRequest": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.qbusiness#MemberGroup": { + "type": "structure", + "members": { + "groupName": { + "target": "com.amazonaws.qbusiness#GroupName", + "traits": { + "smithy.api#documentation": "

The name of the sub group.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qbusiness#MembershipType", + "traits": { + "smithy.api#documentation": "

The type of the sub group.

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

The sub groups that belong to a group.

" + } + }, + "com.amazonaws.qbusiness#MemberGroups": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#MemberGroup" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.qbusiness#MemberRelation": { + "type": "enum", + "members": { + "AND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AND" + } + }, + "OR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OR" + } + } + } + }, + "com.amazonaws.qbusiness#MemberUser": { + "type": "structure", + "members": { + "userId": { + "target": "com.amazonaws.qbusiness#DataSourceUserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user you want to map to a group.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.qbusiness#MembershipType", + "traits": { + "smithy.api#documentation": "

The type of the user.

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

The users that belong to a group.

" + } + }, + "com.amazonaws.qbusiness#MemberUsers": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#MemberUser" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.qbusiness#MembershipType": { + "type": "enum", + "members": { + "INDEX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEX" + } + }, + "DATASOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATASOURCE" + } + } + } + }, + "com.amazonaws.qbusiness#Message": { + "type": "structure", + "members": { + "messageId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience message.

" + } + }, + "body": { + "target": "com.amazonaws.qbusiness#MessageBody", + "traits": { + "smithy.api#documentation": "

The content of the Amazon Q web experience message.

" + } + }, + "time": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of the first Amazon Q web experience message.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#MessageType", + "traits": { + "smithy.api#documentation": "

The type of Amazon Q message, whether HUMAN or AI\n generated.

" + } + }, + "attachments": { + "target": "com.amazonaws.qbusiness#AttachmentsOutput", + "traits": { + "smithy.api#documentation": "

A file directly uploaded into an Amazon Q web experience chat.

" + } + }, + "sourceAttribution": { + "target": "com.amazonaws.qbusiness#SourceAttributions", + "traits": { + "smithy.api#documentation": "

The source documents used to generate Amazon Q web experience message.

" + } + }, + "actionReview": { + "target": "com.amazonaws.qbusiness#ActionReview" + }, + "actionExecution": { + "target": "com.amazonaws.qbusiness#ActionExecution" + } + }, + "traits": { + "smithy.api#documentation": "

A message in an Amazon Q web experience.

" + } + }, + "com.amazonaws.qbusiness#MessageBody": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^\\P{C}*$}$" + } + }, + "com.amazonaws.qbusiness#MessageId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#MessageType": { + "type": "enum", + "members": { + "USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USER" + } + }, + "SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYSTEM" + } + } + } + }, + "com.amazonaws.qbusiness#MessageUsefulness": { + "type": "enum", + "members": { + "USEFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USEFUL" + } + }, + "NOT_USEFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_USEFUL" + } + } + } + }, + "com.amazonaws.qbusiness#MessageUsefulnessComment": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#MessageUsefulnessFeedback": { + "type": "structure", + "members": { + "usefulness": { + "target": "com.amazonaws.qbusiness#MessageUsefulness", + "traits": { + "smithy.api#documentation": "

The usefulness value assigned by an end user to a message.

", + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.qbusiness#MessageUsefulnessReason", + "traits": { + "smithy.api#documentation": "

The reason for a usefulness rating.

" + } + }, + "comment": { + "target": "com.amazonaws.qbusiness#MessageUsefulnessComment", + "traits": { + "smithy.api#documentation": "

A comment given by an end user on the usefulness of an AI-generated chat\n message.

" + } + }, + "submittedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the feedback was submitted.

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

End user feedback on an AI-generated web experience chat message usefulness.

" + } + }, + "com.amazonaws.qbusiness#MessageUsefulnessReason": { + "type": "enum", + "members": { + "NOT_FACTUALLY_CORRECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_FACTUALLY_CORRECT" + } + }, + "HARMFUL_OR_UNSAFE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HARMFUL_OR_UNSAFE" + } + }, + "INCORRECT_OR_MISSING_SOURCES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INCORRECT_OR_MISSING_SOURCES" + } + }, + "NOT_HELPFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_HELPFUL" + } + }, + "FACTUALLY_CORRECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FACTUALLY_CORRECT" + } + }, + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETE" + } + }, + "RELEVANT_SOURCES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RELEVANT_SOURCES" + } + }, + "HELPFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HELPFUL" + } + } + } + }, + "com.amazonaws.qbusiness#Messages": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Message" + } + }, + "com.amazonaws.qbusiness#MetricValue": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(([1-9][0-9]*)|0)$" + } + }, + "com.amazonaws.qbusiness#NativeIndexConfiguration": { + "type": "structure", + "members": { + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier for the Amazon Q index.

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

Configuration information for an Amazon Q index.

" + } + }, + "com.amazonaws.qbusiness#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 800 + } + } + }, + "com.amazonaws.qbusiness#OAuth2ClientCredentialConfiguration": { + "type": "structure", + "members": { + "secretArn": { + "target": "com.amazonaws.qbusiness#SecretArn", + "traits": { + "smithy.api#documentation": "

The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token\n used for plugin configuration.

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The ARN of an IAM role used by Amazon Q to access the OAuth 2.0\n authentication credentials stored in a Secrets Manager secret.

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

Information about the OAuth 2.0 authentication credential/token used to configure a\n plugin.

" + } + }, + "com.amazonaws.qbusiness#Plugin": { + "type": "structure", + "members": { + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin.

" + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#PluginName", + "traits": { + "smithy.api#documentation": "

The name of the plugin.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#PluginType", + "traits": { + "smithy.api#documentation": "

The type of the plugin.

" + } + }, + "serverUrl": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

The plugin server URL used for configuration.

" + } + }, + "state": { + "target": "com.amazonaws.qbusiness#PluginState", + "traits": { + "smithy.api#documentation": "

The current status of the plugin.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the plugin was created.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the plugin was last updated.

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

Information about an Amazon Q plugin and its configuration.

" + } + }, + "com.amazonaws.qbusiness#PluginArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#PluginAuthConfiguration": { + "type": "union", + "members": { + "basicAuthConfiguration": { + "target": "com.amazonaws.qbusiness#BasicAuthConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the basic authentication credentials used to configure a\n plugin.

" + } + }, + "oAuth2ClientCredentialConfiguration": { + "target": "com.amazonaws.qbusiness#OAuth2ClientCredentialConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the OAuth 2.0 authentication credential/token used to configure a\n plugin.

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

Authentication configuration information for an Amazon Q plugin.

" + } + }, + "com.amazonaws.qbusiness#PluginId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + } + }, + "com.amazonaws.qbusiness#PluginName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.qbusiness#PluginResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId" + }, + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId" + } + }, + "create": { + "target": "com.amazonaws.qbusiness#CreatePlugin" + }, + "read": { + "target": "com.amazonaws.qbusiness#GetPlugin" + }, + "update": { + "target": "com.amazonaws.qbusiness#UpdatePlugin" + }, + "delete": { + "target": "com.amazonaws.qbusiness#DeletePlugin" + }, + "list": { + "target": "com.amazonaws.qbusiness#ListPlugins" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "Plugin" + } + } + }, + "com.amazonaws.qbusiness#PluginState": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, + "com.amazonaws.qbusiness#PluginType": { + "type": "enum", + "members": { + "SERVICE_NOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVICE_NOW" + } + }, + "SALESFORCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SALESFORCE" + } + }, + "JIRA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JIRA" + } + }, + "ZENDESK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZENDESK" + } + } + } + }, + "com.amazonaws.qbusiness#Plugins": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Plugin" + } + }, + "com.amazonaws.qbusiness#Principal": { + "type": "union", + "members": { + "user": { + "target": "com.amazonaws.qbusiness#PrincipalUser", + "traits": { + "smithy.api#documentation": "

The user associated with the principal.

" + } + }, + "group": { + "target": "com.amazonaws.qbusiness#PrincipalGroup", + "traits": { + "smithy.api#documentation": "

The group associated with the principal.

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

Provides user and group information used for filtering documents to use for generating\n Amazon Q conversation responses.

" + } + }, + "com.amazonaws.qbusiness#PrincipalGroup": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#GroupName", + "traits": { + "smithy.api#documentation": "

The name of the group.

" + } + }, + "access": { + "target": "com.amazonaws.qbusiness#ReadAccessType", + "traits": { + "smithy.api#documentation": "

Provides information about whether to allow or deny access to the principal.

", + "smithy.api#required": {} + } + }, + "membershipType": { + "target": "com.amazonaws.qbusiness#MembershipType", + "traits": { + "smithy.api#documentation": "

The type of group.

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

Provides information about a group associated with the principal.

" + } + }, + "com.amazonaws.qbusiness#PrincipalUser": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user.

" + } + }, + "access": { + "target": "com.amazonaws.qbusiness#ReadAccessType", + "traits": { + "smithy.api#documentation": "

Provides information about whether to allow or deny access to the principal.

", + "smithy.api#required": {} + } + }, + "membershipType": { + "target": "com.amazonaws.qbusiness#MembershipType", + "traits": { + "smithy.api#documentation": "

The type of group.

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

Provides information about a user associated with a principal.

" + } + }, + "com.amazonaws.qbusiness#Principals": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Principal" + } + }, + "com.amazonaws.qbusiness#PutFeedback": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#PutFeedbackRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Enables your end user to to provide feedback on their Amazon Q generated chat\n responses.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/conversations/{conversationId}/messages/{messageId}/feedback", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#PutFeedbackRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application associated with the feedback.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#UserId", + "traits": { + "smithy.api#documentation": "

The identifier of the user giving the feedback.

", + "smithy.api#httpQuery": "userId", + "smithy.api#required": {} + } + }, + "conversationId": { + "target": "com.amazonaws.qbusiness#ConversationId", + "traits": { + "smithy.api#documentation": "

The identifier of the conversation the feedback is attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "messageId": { + "target": "com.amazonaws.qbusiness#SystemMessageId", + "traits": { + "smithy.api#documentation": "

The identifier of the chat message that the feedback was given for.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "messageCopiedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp for when the feedback was recorded.

" + } + }, + "messageUsefulness": { + "target": "com.amazonaws.qbusiness#MessageUsefulnessFeedback", + "traits": { + "smithy.api#documentation": "

The feedback usefulness value given by the user to the chat message.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#PutGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#PutGroupRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#PutGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Create, or updates, a mapping of users—who have access to a document—to\n groups.

\n

You can also map sub groups to groups. For example, the group \"Company Intellectual\n Property Teams\" includes sub groups \"Research\" and \"Engineering\". These sub groups\n include their own list of users or people who work in these teams. Only users who work\n in research and engineering, and therefore belong in the intellectual property group,\n can see top-secret company documents in their Amazon Q chat results.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/applications/{applicationId}/indices/{indexId}/groups" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#PutGroupRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application in which the user and group mapping belongs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index in which you want to map users to their groups.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "groupName": { + "target": "com.amazonaws.qbusiness#GroupName", + "traits": { + "smithy.api#documentation": "

The list that contains your users or sub groups that belong the same group. For\n example, the group \"Company\" includes the user \"CEO\" and the sub groups \"Research\",\n \"Engineering\", and \"Sales and Marketing\".

\n

If you have more than 1000 users and/or sub groups for a single group, you need to\n provide the path to the S3 file that lists your users and sub groups for a group. Your\n sub groups can contain more than 1000 users, but the list of sub groups that belong to a\n group (and/or users) must be no more than 1000.

", + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source for which you want to map users to their groups.\n This is useful if a group is tied to multiple data sources, but you only want the group\n to access documents of a certain data source. For example, the groups \"Research\",\n \"Engineering\", and \"Sales and Marketing\" are all tied to the company's documents stored\n in the data sources Confluence and Salesforce. However, \"Sales and Marketing\" team only\n needs access to customer-related documents stored in Salesforce.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#MembershipType", + "traits": { + "smithy.api#documentation": "

The type of the group.

", + "smithy.api#required": {} + } + }, + "groupMembers": { + "target": "com.amazonaws.qbusiness#GroupMembers", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#PutGroupResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#ReadAccessType": { + "type": "enum", + "members": { + "ALLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALLOW" + } + }, + "DENY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DENY" + } + } + } + }, + "com.amazonaws.qbusiness#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The message describing a ResourceNotFoundException.

", + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The identifier of the resource affected.

", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The type of the resource affected.

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

The resource you want to use doesn’t exist. Make sure you have provided the correct\n resource and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.qbusiness#ResponseScope": { + "type": "enum", + "members": { + "ENTERPRISE_CONTENT_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENTERPRISE_CONTENT_ONLY" + } + }, + "EXTENDED_KNOWLEDGE_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXTENDED_KNOWLEDGE_ENABLED" + } + } + } + }, + "com.amazonaws.qbusiness#Retriever": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application using the retriever.

" + } + }, + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId", + "traits": { + "smithy.api#documentation": "

The identifier of the retriever used by your Amazon Q application.

" + } + }, + "type": { + "target": "com.amazonaws.qbusiness#RetrieverType", + "traits": { + "smithy.api#documentation": "

The type of your retriever.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#RetrieverStatus", + "traits": { + "smithy.api#documentation": "

The status of your retriever.

" + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#RetrieverName", + "traits": { + "smithy.api#documentation": "

The name of your retriever.

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

Summary information for the retriever used for your Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#RetrieverArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#RetrieverConfiguration": { + "type": "union", + "members": { + "nativeIndexConfiguration": { + "target": "com.amazonaws.qbusiness#NativeIndexConfiguration", + "traits": { + "smithy.api#documentation": "

Provides information on how a Amazon Q index used as a retriever for your\n Amazon Q application is configured.

" + } + }, + "kendraIndexConfiguration": { + "target": "com.amazonaws.qbusiness#KendraIndexConfiguration", + "traits": { + "smithy.api#documentation": "

Provides information on how the Amazon Kendra index used as a retriever for your\n Amazon Q application is configured.

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

Provides information on how the retriever used for your Amazon Q application is\n configured.

" + } + }, + "com.amazonaws.qbusiness#RetrieverId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#RetrieverName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" + } + }, + "com.amazonaws.qbusiness#RetrieverResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId" + }, + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId" + } + }, + "create": { + "target": "com.amazonaws.qbusiness#CreateRetriever" + }, + "read": { + "target": "com.amazonaws.qbusiness#GetRetriever" + }, + "update": { + "target": "com.amazonaws.qbusiness#UpdateRetriever" + }, + "delete": { + "target": "com.amazonaws.qbusiness#DeleteRetriever" + }, + "list": { + "target": "com.amazonaws.qbusiness#ListRetrievers" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "Retriever" + } + } + }, + "com.amazonaws.qbusiness#RetrieverStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } + } + }, + "com.amazonaws.qbusiness#RetrieverType": { + "type": "enum", + "members": { + "NATIVE_INDEX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NATIVE_INDEX" + } + }, + "KENDRA_INDEX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KENDRA_INDEX" + } + } + } + }, + "com.amazonaws.qbusiness#Retrievers": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Retriever" + } + }, + "com.amazonaws.qbusiness#RoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#Rule": { + "type": "structure", + "members": { + "includedUsersAndGroups": { + "target": "com.amazonaws.qbusiness#UsersAndGroups", + "traits": { + "smithy.api#documentation": "

Users and groups to be included in a rule.

" + } + }, + "excludedUsersAndGroups": { + "target": "com.amazonaws.qbusiness#UsersAndGroups", + "traits": { + "smithy.api#documentation": "

Users and groups to be excluded from a rule.

" + } + }, + "ruleType": { + "target": "com.amazonaws.qbusiness#RuleType", + "traits": { + "smithy.api#documentation": "

The type fo rule.

", + "smithy.api#required": {} + } + }, + "ruleConfiguration": { + "target": "com.amazonaws.qbusiness#RuleConfiguration", + "traits": { + "smithy.api#documentation": "

The configuration information for a rule.

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

Guardrail rules for an Amazon Q application. Amazon Q supports only one rule\n at a time.

" + } + }, + "com.amazonaws.qbusiness#RuleConfiguration": { + "type": "union", + "members": { + "contentBlockerRule": { + "target": "com.amazonaws.qbusiness#ContentBlockerRule", + "traits": { + "smithy.api#documentation": "

A rule for configuring how Amazon Q responds when it encounters a a blocked\n topic.

" + } + }, + "contentRetrievalRule": { + "target": "com.amazonaws.qbusiness#ContentRetrievalRule" + } + }, + "traits": { + "smithy.api#documentation": "

Provides configuration information about a rule.

" + } + }, + "com.amazonaws.qbusiness#RuleType": { + "type": "enum", + "members": { + "CONTENT_BLOCKER_RULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTENT_BLOCKER_RULE" + } + }, + "CONTENT_RETRIEVAL_RULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTENT_RETRIEVAL_RULE" + } + } + } + }, + "com.amazonaws.qbusiness#Rules": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Rule" + }, + "traits": { + "smithy.api#length": { + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#S3": { + "type": "structure", + "members": { + "bucket": { + "target": "com.amazonaws.qbusiness#S3BucketName", + "traits": { + "smithy.api#documentation": "

The name of the S3 bucket that contains the file.

", + "smithy.api#required": {} + } + }, + "key": { + "target": "com.amazonaws.qbusiness#S3ObjectKey", + "traits": { + "smithy.api#documentation": "

The name of the file.

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

Information required for Amazon Q to find a specific file in an Amazon S3\n bucket.

" + } + }, + "com.amazonaws.qbusiness#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$" + } + }, + "com.amazonaws.qbusiness#S3ObjectKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.qbusiness#SamlAttribute": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.qbusiness#SamlConfiguration": { + "type": "structure", + "members": { + "metadataXML": { + "target": "com.amazonaws.qbusiness#SamlMetadataXML", + "traits": { + "smithy.api#documentation": "

The metadata XML that your IdP generated.

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role assumed by users when\n they authenticate into their Amazon Q web experience, containing the relevant\n Amazon Q permissions for conversing with Amazon Q.

", + "smithy.api#required": {} + } + }, + "userIdAttribute": { + "target": "com.amazonaws.qbusiness#SamlAttribute", + "traits": { + "smithy.api#documentation": "

The user attribute name in your IdP that maps to the user email.

", + "smithy.api#required": {} + } + }, + "userGroupAttribute": { + "target": "com.amazonaws.qbusiness#SamlAttribute", + "traits": { + "smithy.api#documentation": "

The group attribute name in your IdP that maps to user groups.

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

Provides the SAML 2.0 compliant identity provider (IdP) configuration information\n Amazon Q needs to deploy a Amazon Q web experience.

" + } + }, + "com.amazonaws.qbusiness#SamlMetadataXML": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1000, + "max": 10000000 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.qbusiness#SecretArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#SecurityGroupId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+$" + } + }, + "com.amazonaws.qbusiness#SecurityGroupIds": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#SecurityGroupId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The message describing a ServiceQuotaExceededException.

", + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The identifier of the resource affected.

", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The type of the resource affected.

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

You have exceeded the set limits for your Amazon Q service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.qbusiness#SourceAttribution": { + "type": "structure", + "members": { + "title": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The title of the document which is the source for the Amazon Q generated\n response.

" + } + }, + "snippet": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The content extract from the document on which the generated response is based.\n

" + } + }, + "url": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The URL of the document which is the source for the Amazon Q generated response.\n

" + } + }, + "citationNumber": { + "target": "com.amazonaws.qbusiness#Integer", + "traits": { + "smithy.api#documentation": "

The number attached to a citation in an Amazon Q generated response.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was last updated.

" + } + }, + "textMessageSegments": { + "target": "com.amazonaws.qbusiness#TextSegmentList", + "traits": { + "smithy.api#documentation": "

A text extract from a source document that is used for source attribution.

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

The documents used to generate an Amazon Q web experience response.

" + } + }, + "com.amazonaws.qbusiness#SourceAttributions": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#SourceAttribution" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "com.amazonaws.qbusiness#StartDataSourceSyncJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#StartDataSourceSyncJobRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#StartDataSourceSyncJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts a data source connector synchronization job. If a synchronization job is\n already in progress, Amazon Q returns a ConflictException.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/startsync", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#StartDataSourceSyncJobRequest": { + "type": "structure", + "members": { + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of Amazon Q application the data source is connected to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index used with the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#StartDataSourceSyncJobResponse": { + "type": "structure", + "members": { + "executionId": { + "target": "com.amazonaws.qbusiness#ExecutionId", + "traits": { + "smithy.api#documentation": "

The identifier for a particular synchronization job.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#Status": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, + "com.amazonaws.qbusiness#StopDataSourceSyncJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#StopDataSourceSyncJobRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#StopDataSourceSyncJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Stops an Amazon Q data source connector synchronization job already in\n progress.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}/stopsync", + "method": "POST" + } + } + }, + "com.amazonaws.qbusiness#StopDataSourceSyncJobRequest": { + "type": "structure", + "members": { + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application that the data source is connected\n to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index used with the Amazon Q data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#StopDataSourceSyncJobResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#String": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.qbusiness#SubnetId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+$" + } + }, + "com.amazonaws.qbusiness#SubnetIds": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#SubnetId" + } + }, + "com.amazonaws.qbusiness#SyncSchedule": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 998 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#SystemMessageId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{35}$" + } + }, + "com.amazonaws.qbusiness#SystemMessageOverride": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 350 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#Tag": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.qbusiness#TagKey", + "traits": { + "smithy.api#documentation": "

The key for the tag. Keys are not case sensitive and must be unique for the\n Amazon Q application or data source.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.qbusiness#TagValue", + "traits": { + "smithy.api#documentation": "

The value associated with the tag. The value may be an empty string but it can't be\n null.

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

A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and\n values can consist of Unicode letters, digits, white space, and any of the following\n symbols: _ . : / = + - @.

" + } + }, + "com.amazonaws.qbusiness#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.qbusiness#TagKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.qbusiness#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds the specified tag to the specified Amazon Q application or data source\n resource. If the tag already exists, the existing value is replaced with the new\n value.

", + "smithy.api#http": { + "uri": "/v1/tags/{resourceARN}", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#TagResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.qbusiness#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q application or data source to\n tag.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qbusiness#Tags", + "traits": { + "smithy.api#documentation": "

A list of tag keys to add to the Amazon Q application or data source. If a tag\n already exists, the existing value is replaced with the new value.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.qbusiness#Tags": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.qbusiness#TextDocumentStatistics": { + "type": "structure", + "members": { + "indexedTextBytes": { + "target": "com.amazonaws.qbusiness#IndexedTextBytes", + "traits": { + "smithy.api#documentation": "

The total size, in bytes, of the indexed documents.

" + } + }, + "indexedTextDocumentCount": { + "target": "com.amazonaws.qbusiness#IndexedTextDocument", + "traits": { + "smithy.api#documentation": "

The number of text documents indexed.

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

Provides information about text documents in an index.

" + } + }, + "com.amazonaws.qbusiness#TextSegment": { + "type": "structure", + "members": { + "beginOffset": { + "target": "com.amazonaws.qbusiness#Integer", + "traits": { + "smithy.api#documentation": "

The zero-based location in the response string where the source attribution\n starts.

" + } + }, + "endOffset": { + "target": "com.amazonaws.qbusiness#Integer", + "traits": { + "smithy.api#documentation": "

The zero-based location in the response string where the source attribution\n ends.

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

Provides information about a text extract in a chat response that can be attributed to\n a source document.

" + } + }, + "com.amazonaws.qbusiness#TextSegmentList": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#TextSegment" + } + }, + "com.amazonaws.qbusiness#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to throttling. Reduce the number of requests and try\n again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.qbusiness#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.qbusiness#Title": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.qbusiness#TopicConfiguration": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#TopicConfigurationName", + "traits": { + "smithy.api#documentation": "

A name for your topic control configuration.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.qbusiness#TopicDescription", + "traits": { + "smithy.api#documentation": "

A description for your topic control configuration. Use this outline how the large\n language model (LLM) should use this topic control configuration.

" + } + }, + "exampleChatMessages": { + "target": "com.amazonaws.qbusiness#ExampleChatMessages", + "traits": { + "smithy.api#documentation": "

A list of example phrases that you expect the end user to use in relation to the\n topic.

" + } + }, + "rules": { + "target": "com.amazonaws.qbusiness#Rules", + "traits": { + "smithy.api#documentation": "

Rules defined for a topic configuration.

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

The topic specific controls configured for an Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#TopicConfigurationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{0,35}$" + } + }, + "com.amazonaws.qbusiness#TopicConfigurations": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#TopicConfiguration" + }, + "traits": { + "smithy.api#length": { + "max": 10 + } + } + }, + "com.amazonaws.qbusiness#TopicDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 350 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a tag from an Amazon Q application or a data source.

", + "smithy.api#http": { + "uri": "/v1/tags/{resourceARN}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.qbusiness#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Q application, or data source to\n remove the tag from.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.qbusiness#TagKeys", + "traits": { + "smithy.api#documentation": "

A list of tag keys to remove from the Amazon Q application or data source. If a\n tag key does not exist on the resource, it is ignored.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetApplication", + "qbusiness:TagResource", + "qbusiness:UntagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Updates an existing Amazon Q application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateApplicationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#ApplicationName", + "traits": { + "smithy.api#documentation": "

A name for the Amazon Q application.

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

A description for the Amazon Q application.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

An Amazon Web Services Identity and Access Management (IAM) role that\n gives Amazon Q permission to access Amazon CloudWatch logs and\n metrics.

" + } + }, + "attachmentsConfiguration": { + "target": "com.amazonaws.qbusiness#AttachmentsConfiguration", + "traits": { + "smithy.api#documentation": "

An option to allow end users to upload files directly during chat.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateApplicationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateChatControlsConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateChatControlsConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateChatControlsConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an set of chat controls configured for an existing Amazon Q\n application.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/chatcontrols", + "method": "PATCH", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateChatControlsConfigurationRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application for which the chat controls are configured.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.qbusiness#ClientToken", + "traits": { + "smithy.api#documentation": "

A token that you provide to identify the request to update a Amazon Q application\n chat configuration.

", + "smithy.api#idempotencyToken": {} + } + }, + "responseScope": { + "target": "com.amazonaws.qbusiness#ResponseScope", + "traits": { + "smithy.api#documentation": "

The response scope configured for your application. This determines whether your\n application uses its retrieval augmented generation (RAG) system to generate answers\n only from your enterprise data, or also uses the large language models (LLM) knowledge\n to respons to end user questions in chat.

" + } + }, + "blockedPhrasesConfigurationUpdate": { + "target": "com.amazonaws.qbusiness#BlockedPhrasesConfigurationUpdate", + "traits": { + "smithy.api#documentation": "

The phrases blocked from chat by your chat control configuration.

" + } + }, + "topicConfigurationsToCreateOrUpdate": { + "target": "com.amazonaws.qbusiness#TopicConfigurations", + "traits": { + "smithy.api#documentation": "

The configured topic specific chat controls you want to update.

" + } + }, + "topicConfigurationsToDelete": { + "target": "com.amazonaws.qbusiness#TopicConfigurations", + "traits": { + "smithy.api#documentation": "

The configured topic specific chat controls you want to delete.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateChatControlsConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateDataSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateDataSourceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateDataSourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetDataSource", + "qbusiness:TagResource", + "qbusiness:UntagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Updates an existing Amazon Q data source connector.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}/datasources/{dataSourceId}", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateDataSourceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application the data source is attached\n to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index attached to the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source connector.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#DataSourceName", + "traits": { + "smithy.api#documentation": "

A name of the data source connector.

" + } + }, + "configuration": { + "target": "com.amazonaws.qbusiness#DataSourceConfiguration" + }, + "vpcConfiguration": { + "target": "com.amazonaws.qbusiness#DataSourceVpcConfiguration" + }, + "description": { + "target": "com.amazonaws.qbusiness#Description", + "traits": { + "smithy.api#documentation": "

The description of the data source connector.

" + } + }, + "syncSchedule": { + "target": "com.amazonaws.qbusiness#SyncSchedule", + "traits": { + "smithy.api#documentation": "

The chosen update frequency for your data source.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permission to access\n the data source and required resources.

" + } + }, + "documentEnrichmentConfiguration": { + "target": "com.amazonaws.qbusiness#DocumentEnrichmentConfiguration" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateDataSourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateIndex": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateIndexRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateIndexResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetIndex", + "qbusiness:TagResource", + "qbusiness:UntagResource", + "qbusiness:ListTagsForResource" + ], + "smithy.api#documentation": "

Updates an Amazon Q index.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/indices/{indexId}", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateIndexRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application connected to the index.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q index.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon Q index.

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

The description of the Amazon Q index.

" + } + }, + "capacityConfiguration": { + "target": "com.amazonaws.qbusiness#IndexCapacityConfiguration", + "traits": { + "smithy.api#documentation": "

The storage capacity units you want to provision for your Amazon Q index. You can\n add and remove capacity to fit your usage needs.

" + } + }, + "documentAttributeConfigurations": { + "target": "com.amazonaws.qbusiness#DocumentAttributeConfigurations", + "traits": { + "smithy.api#documentation": "

Configuration information for document metadata or fields. Document metadata are\n fields or attributes associated with your documents. For example, the company department\n name associated with each document. For more information, see Understanding document attributes.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateIndexResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdatePlugin": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdatePluginRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdatePluginResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetPlugin", + "qbusiness:TagResource", + "qbusiness:UntagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Updates an Amazon Q plugin.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/applications/{applicationId}/plugins/{pluginId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdatePluginRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application the plugin is attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pluginId": { + "target": "com.amazonaws.qbusiness#PluginId", + "traits": { + "smithy.api#documentation": "

The identifier of the plugin.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.qbusiness#PluginName", + "traits": { + "smithy.api#documentation": "

The name of the plugin.

" + } + }, + "state": { + "target": "com.amazonaws.qbusiness#PluginState", + "traits": { + "smithy.api#documentation": "

The status of the plugin.

" + } + }, + "serverUrl": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

The source URL used for plugin configuration.

" + } + }, + "authConfiguration": { + "target": "com.amazonaws.qbusiness#PluginAuthConfiguration", + "traits": { + "smithy.api#documentation": "

The authentication configuration the plugin is using.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdatePluginResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateRetriever": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateRetrieverRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateRetrieverResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:TagResource", + "qbusiness:UntagResource", + "qbusiness:ListTagsForResource", + "qbusiness:GetRetriever", + "iam:PassRole" + ], + "smithy.api#documentation": "

Updates the retriever used for your Amazon Q application.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/applications/{applicationId}/retrievers/{retrieverId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateRetrieverRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of your Amazon Q application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "retrieverId": { + "target": "com.amazonaws.qbusiness#RetrieverId", + "traits": { + "smithy.api#documentation": "

The identifier of your retriever.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "configuration": { + "target": "com.amazonaws.qbusiness#RetrieverConfiguration" + }, + "displayName": { + "target": "com.amazonaws.qbusiness#RetrieverName", + "traits": { + "smithy.api#documentation": "

The name of your retriever.

" + } + }, + "roleArn": { + "target": "com.amazonaws.qbusiness#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permission to access the retriever\n and required resources.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateRetrieverResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateUserRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a information associated with a user id.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/applications/{applicationId}/users/{userId}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateUserRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the application the user is attached to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The email id attached to the user.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "userAliasesToUpdate": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

The user aliases attached to the user id that are to be updated.

" + } + }, + "userAliasesToDelete": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

The user aliases attached to the user id that are to be deleted.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateUserResponse": { + "type": "structure", + "members": { + "userAliasesAdded": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

The user aliases that have been to be added to a user id.

" + } + }, + "userAliasesUpdated": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

The user aliases attached to a user id that have been updated.

" + } + }, + "userAliasesDeleted": { + "target": "com.amazonaws.qbusiness#UserAliases", + "traits": { + "smithy.api#documentation": "

The user aliases that have been deleted from a user id.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#UpdateWebExperience": { + "type": "operation", + "input": { + "target": "com.amazonaws.qbusiness#UpdateWebExperienceRequest" + }, + "output": { + "target": "com.amazonaws.qbusiness#UpdateWebExperienceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qbusiness#AccessDeniedException" + }, + { + "target": "com.amazonaws.qbusiness#ConflictException" + }, + { + "target": "com.amazonaws.qbusiness#InternalServerException" + }, + { + "target": "com.amazonaws.qbusiness#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qbusiness#ThrottlingException" + }, + { + "target": "com.amazonaws.qbusiness#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "qbusiness:GetWebExperience", + "qbusiness:TagResource", + "qbusiness:UntagResource", + "qbusiness:ListTagsForResource", + "iam:PassRole" + ], + "smithy.api#documentation": "

Updates an Amazon Q web experience.

", + "smithy.api#http": { + "uri": "/applications/{applicationId}/experiences/{webExperienceId}", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qbusiness#UpdateWebExperienceRequest": { + "type": "structure", + "members": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q application attached to the web experience.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId", + "traits": { + "smithy.api#documentation": "

The identifier of the Amazon Q web experience.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "authenticationConfiguration": { + "target": "com.amazonaws.qbusiness#WebExperienceAuthConfiguration", + "traits": { + "smithy.api#documentation": "

The authentication configuration of the Amazon Q web experience.

" + } + }, + "title": { + "target": "com.amazonaws.qbusiness#WebExperienceTitle", + "traits": { + "smithy.api#documentation": "

The title of the Amazon Q web experience.

" + } + }, + "subtitle": { + "target": "com.amazonaws.qbusiness#WebExperienceSubtitle", + "traits": { + "smithy.api#documentation": "

The subtitle of the Amazon Q web experience.

" + } + }, + "welcomeMessage": { + "target": "com.amazonaws.qbusiness#WebExperienceWelcomeMessage", + "traits": { + "smithy.api#documentation": "

A customized welcome message for an end user in an Amazon Q web\n experience.

" + } + }, + "samplePromptsControlMode": { + "target": "com.amazonaws.qbusiness#WebExperienceSamplePromptsControlMode", + "traits": { + "smithy.api#documentation": "

Determines whether sample prompts are enabled in the web experience for an end\n user.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qbusiness#UpdateWebExperienceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.qbusiness#Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(https?|ftp|file)://([^\\s]*)$" + } + }, + "com.amazonaws.qbusiness#UserAlias": { + "type": "structure", + "members": { + "indexId": { + "target": "com.amazonaws.qbusiness#IndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the index that the user aliases are associated with.

" + } + }, + "dataSourceId": { + "target": "com.amazonaws.qbusiness#DataSourceId", + "traits": { + "smithy.api#documentation": "

The identifier of the data source that the user aliases are associated with.

" + } + }, + "userId": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The identifier of the user id associated with the user aliases.

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

Aliases attached to a user id within an Amazon Q application.

" + } + }, + "com.amazonaws.qbusiness#UserAliases": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#UserAlias" + } + }, + "com.amazonaws.qbusiness#UserGroups": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#String" + } + }, + "com.amazonaws.qbusiness#UserId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#UserIds": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#String" + } + }, + "com.amazonaws.qbusiness#UserMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 7000 + } + } + }, + "com.amazonaws.qbusiness#UsersAndGroups": { + "type": "structure", + "members": { + "userIds": { + "target": "com.amazonaws.qbusiness#UserIds", + "traits": { + "smithy.api#documentation": "

The user ids associated with a topic control rule.

" + } + }, + "userGroups": { + "target": "com.amazonaws.qbusiness#UserGroups", + "traits": { + "smithy.api#documentation": "

The user groups associated with a topic control rule.

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

Provides information about users and groups associated with a topic control\n rule.

" + } + }, + "com.amazonaws.qbusiness#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.qbusiness#ErrorMessage", + "traits": { + "smithy.api#documentation": "

The message describing the ValidationException.

", + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.qbusiness#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

The reason for the ValidationException.

", + "smithy.api#required": {} + } + }, + "fields": { + "target": "com.amazonaws.qbusiness#ValidationExceptionFields", + "traits": { + "smithy.api#documentation": "

The input field(s) that failed validation.

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

The input doesn't meet the constraints set by the Amazon Q service. Provide the\n correct input and try again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.qbusiness#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

The field name where the invalid entry was detected.

", + "smithy.api#required": {} + } + }, + "message": { + "target": "com.amazonaws.qbusiness#String", + "traits": { + "smithy.api#documentation": "

A message about the validation exception.

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

The input failed to meet the constraints specified by Amazon Q in a specified\n field.

" + } + }, + "com.amazonaws.qbusiness#ValidationExceptionFields": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#ValidationExceptionField" + } + }, + "com.amazonaws.qbusiness#ValidationExceptionReason": { + "type": "enum", + "members": { + "CANNOT_PARSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANNOT_PARSE" + } + }, + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FIELD_VALIDATION_FAILED" + } + }, + "UNKNOWN_OPERATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN_OPERATION" + } + } + } + }, + "com.amazonaws.qbusiness#WebExperience": { + "type": "structure", + "members": { + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId", + "traits": { + "smithy.api#documentation": "

The identifier of your Amazon Q web experience.

" + } + }, + "createdAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when the Amazon Q application was last updated.

" + } + }, + "updatedAt": { + "target": "com.amazonaws.qbusiness#Timestamp", + "traits": { + "smithy.api#documentation": "

The Unix timestamp when your Amazon Q web experience was updated.

" + } + }, + "defaultEndpoint": { + "target": "com.amazonaws.qbusiness#Url", + "traits": { + "smithy.api#documentation": "

The endpoint URLs for your Amazon Q web experience. The URLs are unique and fully\n hosted by Amazon Web Services.

" + } + }, + "status": { + "target": "com.amazonaws.qbusiness#WebExperienceStatus", + "traits": { + "smithy.api#documentation": "

The status of your Amazon Q web experience.

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

Provides information for an Amazon Q web experience.

" + } + }, + "com.amazonaws.qbusiness#WebExperienceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1284 + }, + "smithy.api#pattern": "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$" + } + }, + "com.amazonaws.qbusiness#WebExperienceAuthConfiguration": { + "type": "union", + "members": { + "samlConfiguration": { + "target": "com.amazonaws.qbusiness#SamlConfiguration" + } + }, + "traits": { + "smithy.api#documentation": "

Provides the authorization configuration information needed to deploy a Amazon Q\n web experience to end users.

" + } + }, + "com.amazonaws.qbusiness#WebExperienceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$" + } + }, + "com.amazonaws.qbusiness#WebExperienceResource": { + "type": "resource", + "identifiers": { + "applicationId": { + "target": "com.amazonaws.qbusiness#ApplicationId" + }, + "webExperienceId": { + "target": "com.amazonaws.qbusiness#WebExperienceId" + } + }, + "create": { + "target": "com.amazonaws.qbusiness#CreateWebExperience" + }, + "read": { + "target": "com.amazonaws.qbusiness#GetWebExperience" + }, + "update": { + "target": "com.amazonaws.qbusiness#UpdateWebExperience" + }, + "delete": { + "target": "com.amazonaws.qbusiness#DeleteWebExperience" + }, + "list": { + "target": "com.amazonaws.qbusiness#ListWebExperiences" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "WebExperience" + } + } + }, + "com.amazonaws.qbusiness#WebExperienceSamplePromptsControlMode": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, + "com.amazonaws.qbusiness#WebExperienceStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "PENDING_AUTH_CONFIG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_AUTH_CONFIG" + } + } + } + }, + "com.amazonaws.qbusiness#WebExperienceSubtitle": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#WebExperienceTitle": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "^\\P{C}*$" + } + }, + "com.amazonaws.qbusiness#WebExperienceWelcomeMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 300 + } + } + }, + "com.amazonaws.qbusiness#WebExperiences": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#WebExperience" + } + } + } +}