"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudfrontErrorRatesMetric = void 0;
const aws_cdk_lib_1 = require("aws-cdk-lib");
const _1 = require(".");
class CloudfrontErrorRatesMetric {
    constructor(props) {
        var _a, _b;
        this.rate4xx = new aws_cdk_lib_1.aws_cloudwatch.Metric((0, _1.cloudfrontMetricPropsToMetricProps)(props, '4xxErrorRate', (_a = props.label) !== null && _a !== void 0 ? _a : '4xx', aws_cdk_lib_1.aws_cloudwatch.Statistic.AVERAGE));
        this.rate5xx = new aws_cdk_lib_1.aws_cloudwatch.Metric((0, _1.cloudfrontMetricPropsToMetricProps)(props, '5xxErrorRate', (_b = props.label) !== null && _b !== void 0 ? _b : '5xx', aws_cdk_lib_1.aws_cloudwatch.Statistic.AVERAGE));
    }
}
exports.CloudfrontErrorRatesMetric = CloudfrontErrorRatesMetric;
