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

com.github.eladb.watchful.Watchful Maven / Gradle / Ivy

package com.github.eladb.watchful;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.13.0 (build 385c325)", date = "2020-10-05T09:37:29.746Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = com.github.eladb.watchful.$Module.class, fqn = "cdk-watchful.Watchful")
public class Watchful extends software.amazon.awscdk.core.Construct implements com.github.eladb.watchful.IWatchful {

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

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

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     * @param props
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public Watchful(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchfulProps props) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props });
    }

    /**
     * @param scope This parameter is required.
     * @param id This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public Watchful(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") });
    }

    /**
     * @param alarm This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @Override
    public void addAlarm(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.Alarm alarm) {
        this.jsiiCall("addAlarm", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(alarm, "alarm is required") });
    }

    /**
     * @param title This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @Override
    public void addSection(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.SectionOptions options) {
        this.jsiiCall("addSection", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), options });
    }

    /**
     * @param title This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @Override
    public void addSection(final @org.jetbrains.annotations.NotNull java.lang.String title) {
        this.jsiiCall("addSection", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(title, "title is required") });
    }

    /**
     * @param widgets This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @Override
    public void addWidgets(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.IWidget... widgets) {
        this.jsiiCall("addWidgets", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(widgets).toArray(Object[]::new));
    }

    /**
     * @param title This parameter is required.
     * @param restApi This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchApiGateway watchApiGateway(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigateway.RestApi restApi, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchApiGatewayOptions options) {
        return this.jsiiCall("watchApiGateway", com.github.eladb.watchful.WatchApiGateway.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(restApi, "restApi is required"), options });
    }

    /**
     * @param title This parameter is required.
     * @param restApi This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchApiGateway watchApiGateway(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigateway.RestApi restApi) {
        return this.jsiiCall("watchApiGateway", com.github.eladb.watchful.WatchApiGateway.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(restApi, "restApi is required") });
    }

    /**
     * @param title This parameter is required.
     * @param table This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchDynamoTable watchDynamoTable(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.dynamodb.Table table, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchDynamoTableOptions options) {
        return this.jsiiCall("watchDynamoTable", com.github.eladb.watchful.WatchDynamoTable.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(table, "table is required"), options });
    }

    /**
     * @param title This parameter is required.
     * @param table This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchDynamoTable watchDynamoTable(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.dynamodb.Table table) {
        return this.jsiiCall("watchDynamoTable", com.github.eladb.watchful.WatchDynamoTable.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(table, "table is required") });
    }

    /**
     * @param title This parameter is required.
     * @param ec2Service This parameter is required.
     * @param targetGroup This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchEcsService watchEc2Ecs(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.Ec2Service ec2Service, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationTargetGroup targetGroup, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchEcsServiceOptions options) {
        return this.jsiiCall("watchEc2Ecs", com.github.eladb.watchful.WatchEcsService.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(ec2Service, "ec2Service is required"), java.util.Objects.requireNonNull(targetGroup, "targetGroup is required"), options });
    }

    /**
     * @param title This parameter is required.
     * @param ec2Service This parameter is required.
     * @param targetGroup This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchEcsService watchEc2Ecs(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.Ec2Service ec2Service, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationTargetGroup targetGroup) {
        return this.jsiiCall("watchEc2Ecs", com.github.eladb.watchful.WatchEcsService.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(ec2Service, "ec2Service is required"), java.util.Objects.requireNonNull(targetGroup, "targetGroup is required") });
    }

    /**
     * @param title This parameter is required.
     * @param fargateService This parameter is required.
     * @param targetGroup This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchEcsService watchFargateEcs(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.FargateService fargateService, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationTargetGroup targetGroup, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchEcsServiceOptions options) {
        return this.jsiiCall("watchFargateEcs", com.github.eladb.watchful.WatchEcsService.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(fargateService, "fargateService is required"), java.util.Objects.requireNonNull(targetGroup, "targetGroup is required"), options });
    }

    /**
     * @param title This parameter is required.
     * @param fargateService This parameter is required.
     * @param targetGroup This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchEcsService watchFargateEcs(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.FargateService fargateService, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationTargetGroup targetGroup) {
        return this.jsiiCall("watchFargateEcs", com.github.eladb.watchful.WatchEcsService.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(fargateService, "fargateService is required"), java.util.Objects.requireNonNull(targetGroup, "targetGroup is required") });
    }

    /**
     * @param title This parameter is required.
     * @param fn This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchLambdaFunction watchLambdaFunction(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.Function fn, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchLambdaFunctionOptions options) {
        return this.jsiiCall("watchLambdaFunction", com.github.eladb.watchful.WatchLambdaFunction.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(fn, "fn is required"), options });
    }

    /**
     * @param title This parameter is required.
     * @param fn This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchLambdaFunction watchLambdaFunction(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.Function fn) {
        return this.jsiiCall("watchLambdaFunction", com.github.eladb.watchful.WatchLambdaFunction.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(fn, "fn is required") });
    }

    /**
     * @param title This parameter is required.
     * @param cluster This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchRdsAurora watchRdsAuroraCluster(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.rds.DatabaseCluster cluster, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchRdsAuroraOptions options) {
        return this.jsiiCall("watchRdsAuroraCluster", com.github.eladb.watchful.WatchRdsAurora.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(cluster, "cluster is required"), options });
    }

    /**
     * @param title This parameter is required.
     * @param cluster This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public @org.jetbrains.annotations.NotNull com.github.eladb.watchful.WatchRdsAurora watchRdsAuroraCluster(final @org.jetbrains.annotations.NotNull java.lang.String title, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.rds.DatabaseCluster cluster) {
        return this.jsiiCall("watchRdsAuroraCluster", com.github.eladb.watchful.WatchRdsAurora.class, new Object[] { java.util.Objects.requireNonNull(title, "title is required"), java.util.Objects.requireNonNull(cluster, "cluster is required") });
    }

    /**
     * @param scope This parameter is required.
     * @param options
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public void watchScope(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.Nullable com.github.eladb.watchful.WatchfulAspectProps options) {
        this.jsiiCall("watchScope", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), options });
    }

    /**
     * @param scope This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public void watchScope(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope) {
        this.jsiiCall("watchScope", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required") });
    }

    /**
     * A fluent builder for {@link com.github.eladb.watchful.Watchful}.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder implements software.amazon.jsii.Builder {
        /**
         * @return a new instance of {@link Builder}.
         * @param scope This parameter is required.
         * @param id This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
            return new Builder(scope, id);
        }

        private final software.amazon.awscdk.core.Construct scope;
        private final java.lang.String id;
        private com.github.eladb.watchful.WatchfulProps.Builder props;

        private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
            this.scope = scope;
            this.id = id;
        }

        /**
         * @return {@code this}
         * @param alarmEmail This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder alarmEmail(final java.lang.String alarmEmail) {
            this.props().alarmEmail(alarmEmail);
            return this;
        }

        /**
         * @return {@code this}
         * @param alarmSns This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder alarmSns(final software.amazon.awscdk.services.sns.ITopic alarmSns) {
            this.props().alarmSns(alarmSns);
            return this;
        }

        /**
         * @return {@code this}
         * @param alarmSqs This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder alarmSqs(final software.amazon.awscdk.services.sqs.IQueue alarmSqs) {
            this.props().alarmSqs(alarmSqs);
            return this;
        }

        /**
         * @returns a newly built instance of {@link com.github.eladb.watchful.Watchful}.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        @Override
        public com.github.eladb.watchful.Watchful build() {
            return new com.github.eladb.watchful.Watchful(
                this.scope,
                this.id,
                this.props != null ? this.props.build() : null
            );
        }

        private com.github.eladb.watchful.WatchfulProps.Builder props() {
            if (this.props == null) {
                this.props = new com.github.eladb.watchful.WatchfulProps.Builder();
            }
            return this.props;
        }
    }
}