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

com.thedesignium.cdklognotifier.LogNotifier Maven / Gradle / Ivy

The newest version!
package com.thedesignium.cdklognotifier;

@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-31T07:21:45.557Z")
@software.amazon.jsii.Jsii(module = com.thedesignium.cdklognotifier.$Module.class, fqn = "@thedesignium/cdk-log-notifier.LogNotifier")
public class LogNotifier extends software.amazon.awscdk.Resource implements com.thedesignium.cdklognotifier.ILogNotifier {

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

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

    public LogNotifier(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.thedesignium.cdklognotifier.LogNotifierProps 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"), java.util.Objects.requireNonNull(props, "props is required") });
    }

    public static @org.jetbrains.annotations.NotNull com.thedesignium.cdklognotifier.ILogNotifier fromAttributes(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.thedesignium.cdklognotifier.LogNotifierAttributes attrs) {
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.thedesignium.cdklognotifier.LogNotifier.class, "fromAttributes", software.amazon.jsii.NativeType.forClass(com.thedesignium.cdklognotifier.ILogNotifier.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(attrs, "attrs is required") });
    }

    @Override
    public void watch(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.ILogGroup logGroup) {
        software.amazon.jsii.Kernel.call(this, "watch", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(logGroup, "logGroup is required") });
    }

    public @org.jetbrains.annotations.NotNull com.thedesignium.cdklognotifier.LogNotifierAttributes getAttributes() {
        return software.amazon.jsii.Kernel.get(this, "attributes", software.amazon.jsii.NativeType.forClass(com.thedesignium.cdklognotifier.LogNotifierAttributes.class));
    }

    @Override
    public @org.jetbrains.annotations.NotNull java.lang.String getDestinationFunctionArn() {
        return software.amazon.jsii.Kernel.get(this, "destinationFunctionArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
    }

    @Override
    public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.logs.IFilterPattern getFilterPattern() {
        return software.amazon.jsii.Kernel.get(this, "filterPattern", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.IFilterPattern.class));
    }

    protected @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction getHandleLogFunc() {
        return software.amazon.jsii.Kernel.get(this, "handleLogFunc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.IFunction.class));
    }

    protected void setHandleLogFunc(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.IFunction value) {
        software.amazon.jsii.Kernel.set(this, "handleLogFunc", java.util.Objects.requireNonNull(value, "handleLogFunc is required"));
    }

    /**
     * A fluent builder for {@link com.thedesignium.cdklognotifier.LogNotifier}.
     */
    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.
         */
        public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
            return new Builder(scope, id);
        }

        private final software.constructs.Construct scope;
        private final java.lang.String id;
        private final com.thedesignium.cdklognotifier.LogNotifierProps.Builder props;

        private Builder(final software.constructs.Construct scope, final java.lang.String id) {
            this.scope = scope;
            this.id = id;
            this.props = new com.thedesignium.cdklognotifier.LogNotifierProps.Builder();
        }

        /**
         * @return {@code this}
         * @param filterPattern This parameter is required.
         */
        public Builder filterPattern(final software.amazon.awscdk.services.logs.IFilterPattern filterPattern) {
            this.props.filterPattern(filterPattern);
            return this;
        }

        /**
         * @return {@code this}
         * @param slackIncomingWebhookUrl This parameter is required.
         */
        public Builder slackIncomingWebhookUrl(final java.lang.String slackIncomingWebhookUrl) {
            this.props.slackIncomingWebhookUrl(slackIncomingWebhookUrl);
            return this;
        }

        /**
         * @return {@code this}
         * @param dateTimeFormatOptions This parameter is required.
         */
        public Builder dateTimeFormatOptions(final com.thedesignium.cdklognotifier.DateTimeFormatOptions dateTimeFormatOptions) {
            this.props.dateTimeFormatOptions(dateTimeFormatOptions);
            return this;
        }

        /**
         * @return a newly built instance of {@link com.thedesignium.cdklognotifier.LogNotifier}.
         */
        @Override
        public com.thedesignium.cdklognotifier.LogNotifier build() {
            return new com.thedesignium.cdklognotifier.LogNotifier(
                this.scope,
                this.id,
                this.props.build()
            );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy