|
| 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 { ChimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeClient"; |
| 16 | +import { |
| 17 | + ValidateE911AddressRequest, |
| 18 | + ValidateE911AddressRequestFilterSensitiveLog, |
| 19 | + ValidateE911AddressResponse, |
| 20 | + ValidateE911AddressResponseFilterSensitiveLog, |
| 21 | +} from "../models/models_1"; |
| 22 | +import { |
| 23 | + deserializeAws_restJson1ValidateE911AddressCommand, |
| 24 | + serializeAws_restJson1ValidateE911AddressCommand, |
| 25 | +} from "../protocols/Aws_restJson1"; |
| 26 | + |
| 27 | +export interface ValidateE911AddressCommandInput extends ValidateE911AddressRequest {} |
| 28 | +export interface ValidateE911AddressCommandOutput extends ValidateE911AddressResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Validates an address to be used for 911 calls made with Amazon |
| 32 | + * Chime Voice Connectors. You can use validated addresses |
| 33 | + * in a Presence Information Data Format Location Object file that you include in SIP requests. |
| 34 | + * That helps ensure that addresses are routed to the appropriate Public Safety Answering Point.</p> |
| 35 | + * @example |
| 36 | + * Use a bare-bones client and the command you need to make an API call. |
| 37 | + * ```javascript |
| 38 | + * import { ChimeClient, ValidateE911AddressCommand } from "@aws-sdk/client-chime"; // ES Modules import |
| 39 | + * // const { ChimeClient, ValidateE911AddressCommand } = require("@aws-sdk/client-chime"); // CommonJS import |
| 40 | + * const client = new ChimeClient(config); |
| 41 | + * const command = new ValidateE911AddressCommand(input); |
| 42 | + * const response = await client.send(command); |
| 43 | + * ``` |
| 44 | + * |
| 45 | + * @see {@link ValidateE911AddressCommandInput} for command's `input` shape. |
| 46 | + * @see {@link ValidateE911AddressCommandOutput} for command's `response` shape. |
| 47 | + * @see {@link ChimeClientResolvedConfig | config} for ChimeClient's `config` shape. |
| 48 | + * |
| 49 | + */ |
| 50 | +export class ValidateE911AddressCommand extends $Command< |
| 51 | + ValidateE911AddressCommandInput, |
| 52 | + ValidateE911AddressCommandOutput, |
| 53 | + ChimeClientResolvedConfig |
| 54 | +> { |
| 55 | + // Start section: command_properties |
| 56 | + // End section: command_properties |
| 57 | + |
| 58 | + constructor(readonly input: ValidateE911AddressCommandInput) { |
| 59 | + // Start section: command_constructor |
| 60 | + super(); |
| 61 | + // End section: command_constructor |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * @internal |
| 66 | + */ |
| 67 | + resolveMiddleware( |
| 68 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 69 | + configuration: ChimeClientResolvedConfig, |
| 70 | + options?: __HttpHandlerOptions |
| 71 | + ): Handler<ValidateE911AddressCommandInput, ValidateE911AddressCommandOutput> { |
| 72 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 73 | + |
| 74 | + const stack = clientStack.concat(this.middlewareStack); |
| 75 | + |
| 76 | + const { logger } = configuration; |
| 77 | + const clientName = "ChimeClient"; |
| 78 | + const commandName = "ValidateE911AddressCommand"; |
| 79 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 80 | + logger, |
| 81 | + clientName, |
| 82 | + commandName, |
| 83 | + inputFilterSensitiveLog: ValidateE911AddressRequestFilterSensitiveLog, |
| 84 | + outputFilterSensitiveLog: ValidateE911AddressResponseFilterSensitiveLog, |
| 85 | + }; |
| 86 | + const { requestHandler } = configuration; |
| 87 | + return stack.resolve( |
| 88 | + (request: FinalizeHandlerArguments<any>) => |
| 89 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 90 | + handlerExecutionContext |
| 91 | + ); |
| 92 | + } |
| 93 | + |
| 94 | + private serialize(input: ValidateE911AddressCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 95 | + return serializeAws_restJson1ValidateE911AddressCommand(input, context); |
| 96 | + } |
| 97 | + |
| 98 | + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ValidateE911AddressCommandOutput> { |
| 99 | + return deserializeAws_restJson1ValidateE911AddressCommand(output, context); |
| 100 | + } |
| 101 | + |
| 102 | + // Start section: command_body_extra |
| 103 | + // End section: command_body_extra |
| 104 | +} |
0 commit comments