|
| 1 | +// smithy-typescript generated code |
| 2 | +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; |
| 5 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 6 | +import { |
| 7 | + FinalizeHandlerArguments, |
| 8 | + Handler, |
| 9 | + HandlerExecutionContext, |
| 10 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 11 | + MetadataBearer as __MetadataBearer, |
| 12 | + MiddlewareStack, |
| 13 | + SerdeContext as __SerdeContext, |
| 14 | +} from "@smithy/types"; |
| 15 | + |
| 16 | +import { |
| 17 | + ConnectParticipantClientResolvedConfig, |
| 18 | + ServiceInputTypes, |
| 19 | + ServiceOutputTypes, |
| 20 | +} from "../ConnectParticipantClient"; |
| 21 | +import { DescribeViewRequest, DescribeViewResponse, DescribeViewResponseFilterSensitiveLog } from "../models/models_0"; |
| 22 | +import { de_DescribeViewCommand, se_DescribeViewCommand } from "../protocols/Aws_restJson1"; |
| 23 | + |
| 24 | +/** |
| 25 | + * @public |
| 26 | + */ |
| 27 | +export { __MetadataBearer, $Command }; |
| 28 | +/** |
| 29 | + * @public |
| 30 | + * |
| 31 | + * The input for {@link DescribeViewCommand}. |
| 32 | + */ |
| 33 | +export interface DescribeViewCommandInput extends DescribeViewRequest {} |
| 34 | +/** |
| 35 | + * @public |
| 36 | + * |
| 37 | + * The output of {@link DescribeViewCommand}. |
| 38 | + */ |
| 39 | +export interface DescribeViewCommandOutput extends DescribeViewResponse, __MetadataBearer {} |
| 40 | + |
| 41 | +/** |
| 42 | + * @public |
| 43 | + * <p>Retrieves the view for the specified view token.</p> |
| 44 | + * @example |
| 45 | + * Use a bare-bones client and the command you need to make an API call. |
| 46 | + * ```javascript |
| 47 | + * import { ConnectParticipantClient, DescribeViewCommand } from "@aws-sdk/client-connectparticipant"; // ES Modules import |
| 48 | + * // const { ConnectParticipantClient, DescribeViewCommand } = require("@aws-sdk/client-connectparticipant"); // CommonJS import |
| 49 | + * const client = new ConnectParticipantClient(config); |
| 50 | + * const input = { // DescribeViewRequest |
| 51 | + * ViewToken: "STRING_VALUE", // required |
| 52 | + * ConnectionToken: "STRING_VALUE", // required |
| 53 | + * }; |
| 54 | + * const command = new DescribeViewCommand(input); |
| 55 | + * const response = await client.send(command); |
| 56 | + * // { // DescribeViewResponse |
| 57 | + * // View: { // View |
| 58 | + * // Id: "STRING_VALUE", |
| 59 | + * // Arn: "STRING_VALUE", |
| 60 | + * // Name: "STRING_VALUE", |
| 61 | + * // Version: Number("int"), |
| 62 | + * // Content: { // ViewContent |
| 63 | + * // InputSchema: "STRING_VALUE", |
| 64 | + * // Template: "STRING_VALUE", |
| 65 | + * // Actions: [ // ViewActions |
| 66 | + * // "STRING_VALUE", |
| 67 | + * // ], |
| 68 | + * // }, |
| 69 | + * // }, |
| 70 | + * // }; |
| 71 | + * |
| 72 | + * ``` |
| 73 | + * |
| 74 | + * @param DescribeViewCommandInput - {@link DescribeViewCommandInput} |
| 75 | + * @returns {@link DescribeViewCommandOutput} |
| 76 | + * @see {@link DescribeViewCommandInput} for command's `input` shape. |
| 77 | + * @see {@link DescribeViewCommandOutput} for command's `response` shape. |
| 78 | + * @see {@link ConnectParticipantClientResolvedConfig | config} for ConnectParticipantClient's `config` shape. |
| 79 | + * |
| 80 | + * @throws {@link AccessDeniedException} (client fault) |
| 81 | + * <p>You do not have sufficient access to perform this action.</p> |
| 82 | + * |
| 83 | + * @throws {@link InternalServerException} (server fault) |
| 84 | + * <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p> |
| 85 | + * |
| 86 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 87 | + * <p>The resource was not found.</p> |
| 88 | + * |
| 89 | + * @throws {@link ThrottlingException} (client fault) |
| 90 | + * <p>The request was denied due to request throttling.</p> |
| 91 | + * |
| 92 | + * @throws {@link ValidationException} (client fault) |
| 93 | + * <p>The input fails to satisfy the constraints specified by Amazon Connect.</p> |
| 94 | + * |
| 95 | + * @throws {@link ConnectParticipantServiceException} |
| 96 | + * <p>Base exception class for all service exceptions from ConnectParticipant service.</p> |
| 97 | + * |
| 98 | + */ |
| 99 | +export class DescribeViewCommand extends $Command< |
| 100 | + DescribeViewCommandInput, |
| 101 | + DescribeViewCommandOutput, |
| 102 | + ConnectParticipantClientResolvedConfig |
| 103 | +> { |
| 104 | + // Start section: command_properties |
| 105 | + // End section: command_properties |
| 106 | + |
| 107 | + public static getEndpointParameterInstructions(): EndpointParameterInstructions { |
| 108 | + return { |
| 109 | + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, |
| 110 | + Endpoint: { type: "builtInParams", name: "endpoint" }, |
| 111 | + Region: { type: "builtInParams", name: "region" }, |
| 112 | + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, |
| 113 | + }; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * @public |
| 118 | + */ |
| 119 | + constructor(readonly input: DescribeViewCommandInput) { |
| 120 | + // Start section: command_constructor |
| 121 | + super(); |
| 122 | + // End section: command_constructor |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * @internal |
| 127 | + */ |
| 128 | + resolveMiddleware( |
| 129 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 130 | + configuration: ConnectParticipantClientResolvedConfig, |
| 131 | + options?: __HttpHandlerOptions |
| 132 | + ): Handler<DescribeViewCommandInput, DescribeViewCommandOutput> { |
| 133 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 134 | + this.middlewareStack.use(getEndpointPlugin(configuration, DescribeViewCommand.getEndpointParameterInstructions())); |
| 135 | + |
| 136 | + const stack = clientStack.concat(this.middlewareStack); |
| 137 | + |
| 138 | + const { logger } = configuration; |
| 139 | + const clientName = "ConnectParticipantClient"; |
| 140 | + const commandName = "DescribeViewCommand"; |
| 141 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 142 | + logger, |
| 143 | + clientName, |
| 144 | + commandName, |
| 145 | + inputFilterSensitiveLog: (_: any) => _, |
| 146 | + outputFilterSensitiveLog: DescribeViewResponseFilterSensitiveLog, |
| 147 | + }; |
| 148 | + const { requestHandler } = configuration; |
| 149 | + return stack.resolve( |
| 150 | + (request: FinalizeHandlerArguments<any>) => |
| 151 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 152 | + handlerExecutionContext |
| 153 | + ); |
| 154 | + } |
| 155 | + |
| 156 | + /** |
| 157 | + * @internal |
| 158 | + */ |
| 159 | + private serialize(input: DescribeViewCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 160 | + return se_DescribeViewCommand(input, context); |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * @internal |
| 165 | + */ |
| 166 | + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeViewCommandOutput> { |
| 167 | + return de_DescribeViewCommand(output, context); |
| 168 | + } |
| 169 | + |
| 170 | + // Start section: command_body_extra |
| 171 | + // End section: command_body_extra |
| 172 | +} |
0 commit comments