|
| 1 | +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; |
| 2 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; |
| 3 | +import { Command as $Command } from "@aws-sdk/smithy-client"; |
| 4 | +import { |
| 5 | + FinalizeHandlerArguments, |
| 6 | + Handler, |
| 7 | + HandlerExecutionContext, |
| 8 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 9 | + MetadataBearer as __MetadataBearer, |
| 10 | + MiddlewareStack, |
| 11 | + SerdeContext as __SerdeContext, |
| 12 | +} from "@aws-sdk/types"; |
| 13 | + |
| 14 | +import { LookoutEquipmentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LookoutEquipmentClient"; |
| 15 | +import { ListSensorStatisticsRequest, ListSensorStatisticsResponse } from "../models/models_0"; |
| 16 | +import { |
| 17 | + deserializeAws_json1_0ListSensorStatisticsCommand, |
| 18 | + serializeAws_json1_0ListSensorStatisticsCommand, |
| 19 | +} from "../protocols/Aws_json1_0"; |
| 20 | + |
| 21 | +export interface ListSensorStatisticsCommandInput extends ListSensorStatisticsRequest {} |
| 22 | +export interface ListSensorStatisticsCommandOutput extends ListSensorStatisticsResponse, __MetadataBearer {} |
| 23 | + |
| 24 | +/** |
| 25 | + * <p> |
| 26 | + * Lists statistics about the data collected for each of the sensors that have been successfully ingested in the particular dataset. Can also be used to retreive Sensor Statistics for a previous ingestion job. |
| 27 | + * </p> |
| 28 | + * @example |
| 29 | + * Use a bare-bones client and the command you need to make an API call. |
| 30 | + * ```javascript |
| 31 | + * import { LookoutEquipmentClient, ListSensorStatisticsCommand } from "@aws-sdk/client-lookoutequipment"; // ES Modules import |
| 32 | + * // const { LookoutEquipmentClient, ListSensorStatisticsCommand } = require("@aws-sdk/client-lookoutequipment"); // CommonJS import |
| 33 | + * const client = new LookoutEquipmentClient(config); |
| 34 | + * const command = new ListSensorStatisticsCommand(input); |
| 35 | + * const response = await client.send(command); |
| 36 | + * ``` |
| 37 | + * |
| 38 | + * @see {@link ListSensorStatisticsCommandInput} for command's `input` shape. |
| 39 | + * @see {@link ListSensorStatisticsCommandOutput} for command's `response` shape. |
| 40 | + * @see {@link LookoutEquipmentClientResolvedConfig | config} for LookoutEquipmentClient's `config` shape. |
| 41 | + * |
| 42 | + */ |
| 43 | +export class ListSensorStatisticsCommand extends $Command< |
| 44 | + ListSensorStatisticsCommandInput, |
| 45 | + ListSensorStatisticsCommandOutput, |
| 46 | + LookoutEquipmentClientResolvedConfig |
| 47 | +> { |
| 48 | + // Start section: command_properties |
| 49 | + // End section: command_properties |
| 50 | + |
| 51 | + constructor(readonly input: ListSensorStatisticsCommandInput) { |
| 52 | + // Start section: command_constructor |
| 53 | + super(); |
| 54 | + // End section: command_constructor |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * @internal |
| 59 | + */ |
| 60 | + resolveMiddleware( |
| 61 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 62 | + configuration: LookoutEquipmentClientResolvedConfig, |
| 63 | + options?: __HttpHandlerOptions |
| 64 | + ): Handler<ListSensorStatisticsCommandInput, ListSensorStatisticsCommandOutput> { |
| 65 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 66 | + |
| 67 | + const stack = clientStack.concat(this.middlewareStack); |
| 68 | + |
| 69 | + const { logger } = configuration; |
| 70 | + const clientName = "LookoutEquipmentClient"; |
| 71 | + const commandName = "ListSensorStatisticsCommand"; |
| 72 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 73 | + logger, |
| 74 | + clientName, |
| 75 | + commandName, |
| 76 | + inputFilterSensitiveLog: ListSensorStatisticsRequest.filterSensitiveLog, |
| 77 | + outputFilterSensitiveLog: ListSensorStatisticsResponse.filterSensitiveLog, |
| 78 | + }; |
| 79 | + const { requestHandler } = configuration; |
| 80 | + return stack.resolve( |
| 81 | + (request: FinalizeHandlerArguments<any>) => |
| 82 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 83 | + handlerExecutionContext |
| 84 | + ); |
| 85 | + } |
| 86 | + |
| 87 | + private serialize(input: ListSensorStatisticsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 88 | + return serializeAws_json1_0ListSensorStatisticsCommand(input, context); |
| 89 | + } |
| 90 | + |
| 91 | + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListSensorStatisticsCommandOutput> { |
| 92 | + return deserializeAws_json1_0ListSensorStatisticsCommand(output, context); |
| 93 | + } |
| 94 | + |
| 95 | + // Start section: command_body_extra |
| 96 | + // End section: command_body_extra |
| 97 | +} |
0 commit comments