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

software.amazon.awscdk.AppProps Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
package software.amazon.awscdk;

/**
 * Custom construction properties for a CDK program.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.929Z")
public interface AppProps extends software.amazon.jsii.JsiiSerializable {
    /**
     * Automatically call run before the application exits.
     * 
     * If you set this, you don't have to call `run()` anymore.
     * 
     * Default: true if running via CDK toolkit (CDK_OUTDIR is set), false otherwise
     */
    java.lang.Boolean getAutoRun();
    /**
     * Additional context values for the application.
     * 
     * Default: No additional context
     */
    java.util.Map getContext();

    /**
     * @return a {@link Builder} of {@link AppProps}
     */
    static Builder builder() {
        return new Builder();
    }

    /**
     * A builder for {@link AppProps}
     */
    final class Builder {
        @javax.annotation.Nullable
        private java.lang.Boolean _autoRun;
        @javax.annotation.Nullable
        private java.util.Map _context;

        /**
         * Sets the value of AutoRun
         * @param value Automatically call run before the application exits.
         * @return {@code this}
         */
        public Builder withAutoRun(@javax.annotation.Nullable final java.lang.Boolean value) {
            this._autoRun = value;
            return this;
        }
        /**
         * Sets the value of Context
         * @param value Additional context values for the application.
         * @return {@code this}
         */
        public Builder withContext(@javax.annotation.Nullable final java.util.Map value) {
            this._context = value;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link AppProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        public AppProps build() {
            return new AppProps() {
                @javax.annotation.Nullable
                private final java.lang.Boolean $autoRun = _autoRun;
                @javax.annotation.Nullable
                private final java.util.Map $context = _context;

                @Override
                public java.lang.Boolean getAutoRun() {
                    return this.$autoRun;
                }

                @Override
                public java.util.Map getContext() {
                    return this.$context;
                }

                public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
                    com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
                    com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
                    obj.set("autoRun", om.valueToTree(this.getAutoRun()));
                    obj.set("context", om.valueToTree(this.getContext()));
                    return obj;
                }

            };
        }
    }

    /**
     * A proxy class which represents a concrete javascript instance of this type.
     */
    final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.AppProps {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         * Automatically call run before the application exits.
         * 
         * If you set this, you don't have to call `run()` anymore.
         * 
         * Default: true if running via CDK toolkit (CDK_OUTDIR is set), false otherwise
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.Boolean getAutoRun() {
            return this.jsiiGet("autoRun", java.lang.Boolean.class);
        }

        /**
         * Additional context values for the application.
         * 
         * Default: No additional context
         */
        @Override
        @javax.annotation.Nullable
        public java.util.Map getContext() {
            return this.jsiiGet("context", java.util.Map.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy