All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cdklabs.cdkmonitoringconstructs.CompositeMetricAdjuster Maven / Gradle / Ivy

There is a newer version: 9.1.0
Show newest version
package io.github.cdklabs.cdkmonitoringconstructs;

/**
 * (experimental) Allows to apply a collection of {@link IMetricAdjuster} to a metric.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T17:32:51.857Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.CompositeMetricAdjuster")
public class CompositeMetricAdjuster extends software.amazon.jsii.JsiiObject implements io.github.cdklabs.cdkmonitoringconstructs.IMetricAdjuster {

    protected CompositeMetricAdjuster(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected CompositeMetricAdjuster(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param adjusters This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public CompositeMetricAdjuster(final @org.jetbrains.annotations.NotNull java.util.List adjusters) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(adjusters, "adjusters is required") });
    }

    /**
     * @param adjusters This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.CompositeMetricAdjuster of(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.IMetricAdjuster... adjusters) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdkmonitoringconstructs.CompositeMetricAdjuster.class, "of", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.CompositeMetricAdjuster.class), java.util.Arrays.stream(adjusters).toArray(Object[]::new));
    }

    /**
     * (experimental) Adjusts a metric.
     * 

* @param metric This parameter is required. * @param alarmScope This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public @org.jetbrains.annotations.NotNull java.lang.Object adjustMetric(final @org.jetbrains.annotations.NotNull java.lang.Object metric, final @org.jetbrains.annotations.NotNull software.constructs.Construct alarmScope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.AddAlarmProps props) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { if ( !(metric instanceof software.amazon.awscdk.services.cloudwatch.Metric) && !(metric instanceof software.amazon.awscdk.services.cloudwatch.MathExpression) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("metric") .append(" to be one of: software.amazon.awscdk.services.cloudwatch.Metric, software.amazon.awscdk.services.cloudwatch.MathExpression; received ") .append(metric.getClass()).toString()); } } return software.amazon.jsii.Kernel.call(this, "adjustMetric", software.amazon.jsii.NativeType.forClass(java.lang.Object.class), new Object[] { java.util.Objects.requireNonNull(metric, "metric is required"), java.util.Objects.requireNonNull(alarmScope, "alarmScope is required"), java.util.Objects.requireNonNull(props, "props is required") }); } }