|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; |
| 3 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; |
| 4 | +import { Command as $Command } from "@aws-sdk/smithy-client"; |
| 5 | +import { |
| 6 | + FinalizeHandlerArguments, |
| 7 | + Handler, |
| 8 | + HandlerExecutionContext, |
| 9 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 10 | + MetadataBearer as __MetadataBearer, |
| 11 | + MiddlewareStack, |
| 12 | + SerdeContext as __SerdeContext, |
| 13 | +} from "@aws-sdk/types"; |
| 14 | + |
| 15 | +import { AthenaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AthenaClient"; |
| 16 | +import { BatchGetPreparedStatementInput, BatchGetPreparedStatementOutput } from "../models/models_0"; |
| 17 | +import { |
| 18 | + deserializeAws_json1_1BatchGetPreparedStatementCommand, |
| 19 | + serializeAws_json1_1BatchGetPreparedStatementCommand, |
| 20 | +} from "../protocols/Aws_json1_1"; |
| 21 | + |
| 22 | +export interface BatchGetPreparedStatementCommandInput extends BatchGetPreparedStatementInput {} |
| 23 | +export interface BatchGetPreparedStatementCommandOutput extends BatchGetPreparedStatementOutput, __MetadataBearer {} |
| 24 | + |
| 25 | +/** |
| 26 | + * <p>Returns the details of a single prepared statement or a list of up to 256 prepared statements for the array of prepared statement names that you provide. Requires you to have access to the workgroup to which the prepared statements belong. If a prepared statement cannot be retrieved for the name specified, the statement is listed in <code>UnprocessedPreparedStatementNames</code>.</p> |
| 27 | + * @example |
| 28 | + * Use a bare-bones client and the command you need to make an API call. |
| 29 | + * ```javascript |
| 30 | + * import { AthenaClient, BatchGetPreparedStatementCommand } from "@aws-sdk/client-athena"; // ES Modules import |
| 31 | + * // const { AthenaClient, BatchGetPreparedStatementCommand } = require("@aws-sdk/client-athena"); // CommonJS import |
| 32 | + * const client = new AthenaClient(config); |
| 33 | + * const command = new BatchGetPreparedStatementCommand(input); |
| 34 | + * const response = await client.send(command); |
| 35 | + * ``` |
| 36 | + * |
| 37 | + * @see {@link BatchGetPreparedStatementCommandInput} for command's `input` shape. |
| 38 | + * @see {@link BatchGetPreparedStatementCommandOutput} for command's `response` shape. |
| 39 | + * @see {@link AthenaClientResolvedConfig | config} for AthenaClient's `config` shape. |
| 40 | + * |
| 41 | + */ |
| 42 | +export class BatchGetPreparedStatementCommand extends $Command< |
| 43 | + BatchGetPreparedStatementCommandInput, |
| 44 | + BatchGetPreparedStatementCommandOutput, |
| 45 | + AthenaClientResolvedConfig |
| 46 | +> { |
| 47 | + // Start section: command_properties |
| 48 | + // End section: command_properties |
| 49 | + |
| 50 | + constructor(readonly input: BatchGetPreparedStatementCommandInput) { |
| 51 | + // Start section: command_constructor |
| 52 | + super(); |
| 53 | + // End section: command_constructor |
| 54 | + } |
| 55 | + |
| 56 | + /** |
| 57 | + * @internal |
| 58 | + */ |
| 59 | + resolveMiddleware( |
| 60 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 61 | + configuration: AthenaClientResolvedConfig, |
| 62 | + options?: __HttpHandlerOptions |
| 63 | + ): Handler<BatchGetPreparedStatementCommandInput, BatchGetPreparedStatementCommandOutput> { |
| 64 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 65 | + |
| 66 | + const stack = clientStack.concat(this.middlewareStack); |
| 67 | + |
| 68 | + const { logger } = configuration; |
| 69 | + const clientName = "AthenaClient"; |
| 70 | + const commandName = "BatchGetPreparedStatementCommand"; |
| 71 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 72 | + logger, |
| 73 | + clientName, |
| 74 | + commandName, |
| 75 | + inputFilterSensitiveLog: BatchGetPreparedStatementInput.filterSensitiveLog, |
| 76 | + outputFilterSensitiveLog: BatchGetPreparedStatementOutput.filterSensitiveLog, |
| 77 | + }; |
| 78 | + const { requestHandler } = configuration; |
| 79 | + return stack.resolve( |
| 80 | + (request: FinalizeHandlerArguments<any>) => |
| 81 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 82 | + handlerExecutionContext |
| 83 | + ); |
| 84 | + } |
| 85 | + |
| 86 | + private serialize(input: BatchGetPreparedStatementCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 87 | + return serializeAws_json1_1BatchGetPreparedStatementCommand(input, context); |
| 88 | + } |
| 89 | + |
| 90 | + private deserialize( |
| 91 | + output: __HttpResponse, |
| 92 | + context: __SerdeContext |
| 93 | + ): Promise<BatchGetPreparedStatementCommandOutput> { |
| 94 | + return deserializeAws_json1_1BatchGetPreparedStatementCommand(output, context); |
| 95 | + } |
| 96 | + |
| 97 | + // Start section: command_body_extra |
| 98 | + // End section: command_body_extra |
| 99 | +} |
0 commit comments