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

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

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

/**
 * The deployment environment for a stack.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.945Z")
public interface Environment extends software.amazon.jsii.JsiiSerializable {
    /**
     * The AWS account ID for this environment. If not specified, the context parameter `default-account` is used.
     */
    java.lang.String getAccount();
    /**
     * The AWS region for this environment. If not specified, the context parameter `default-region` is used.
     */
    java.lang.String getRegion();

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

    /**
     * A builder for {@link Environment}
     */
    final class Builder {
        @javax.annotation.Nullable
        private java.lang.String _account;
        @javax.annotation.Nullable
        private java.lang.String _region;

        /**
         * Sets the value of Account
         * @param value The AWS account ID for this environment. If not specified, the context parameter `default-account` is used.
         * @return {@code this}
         */
        public Builder withAccount(@javax.annotation.Nullable final java.lang.String value) {
            this._account = value;
            return this;
        }
        /**
         * Sets the value of Region
         * @param value The AWS region for this environment. If not specified, the context parameter `default-region` is used.
         * @return {@code this}
         */
        public Builder withRegion(@javax.annotation.Nullable final java.lang.String value) {
            this._region = value;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link Environment}
         * @throws NullPointerException if any required attribute was not provided
         */
        public Environment build() {
            return new Environment() {
                @javax.annotation.Nullable
                private final java.lang.String $account = _account;
                @javax.annotation.Nullable
                private final java.lang.String $region = _region;

                @Override
                public java.lang.String getAccount() {
                    return this.$account;
                }

                @Override
                public java.lang.String getRegion() {
                    return this.$region;
                }

                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("account", om.valueToTree(this.getAccount()));
                    obj.set("region", om.valueToTree(this.getRegion()));
                    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.Environment {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         * The AWS account ID for this environment. If not specified, the context parameter `default-account` is used.
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.String getAccount() {
            return this.jsiiGet("account", java.lang.String.class);
        }

        /**
         * The AWS region for this environment. If not specified, the context parameter `default-region` is used.
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.String getRegion() {
            return this.jsiiGet("region", java.lang.String.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy