import * as pulumi from "@pulumi/pulumi" ; import * as wjson from "./widgets_json" ; import { MetricWidget , MetricWidgetArgs } from "./widgets_simple" ; export interface GraphMetricWidgetArgs extends MetricWidgetArgs { /**
     * Limits for the minimums and maximums of the y-axis.  This applies to every metric being
     * graphed, unless specific metrics override it.
     */ yAxis ? : pulumi . Input < YAxis > ; } export interface YAxis { /** Optional min and max settings for the left Y-axis.  */ left ? : MinMax ; /** Optional min and max settings for the right Y-axis. */ right ? : MinMax ; } export interface MinMax { /** The minimum value for this Y-axis */ min ? : number ; /** The maximum value for this Y-axis */ max ? : number ; } /**
 * Base type for widets that display metrics as a graph (either a line or stacked graph).
 *
 * See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph_metrics.html for more
 * details.
 */ export abstract class GraphMetricWidget extends MetricWidget { constructor ( private readonly graphArgs ) { super ( graphArgs ) ; } protected computeView = ( ) : wjson . MetricWidgetPropertiesJson [ "view" ] => "timeSeries" ; protected computeYAxis = ( ) : wjson . MetricWidgetPropertiesJson [ "yAxis" ] => this . graphArgs . yAxis ; } /**
 * Displays a set of metrics as a line graph.
 */ export class LineGraphMetricWidget extends GraphMetricWidget { constructor ( args ) { super ( args ) ; } protected computedStacked = ( ) => false ; } /**
 * Displays a set of metrics as a stacked area graph.
 */ export class StackedAreaGraphMetricWidget extends GraphMetricWidget { constructor ( args ) { super ( args ) ; } protected computedStacked = ( ) => true ; } /**
 * Displays a set of metrics as a single number.
 */ export class SingleNumberMetricWidget extends MetricWidget { constructor ( args ) { super ( args ) ; } protected computedStacked = ( ) => false ; protected computeView = ( ) : wjson . MetricWidgetPropertiesJson [ "view" ] => "singleValue" ; protected computeYAxis = ( ) : wjson . MetricWidgetPropertiesJson [ "yAxis" ] => undefined ; }