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

software.amazon.awscdk.services.kms.AliasAttributes Maven / Gradle / Ivy

package software.amazon.awscdk.services.kms;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.14.2 (build e881f16)", date = "2019-07-25T16:36:47.753Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface AliasAttributes extends software.amazon.jsii.JsiiSerializable {
    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    java.lang.String getAliasName();
    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    software.amazon.awscdk.services.kms.IKey getAliasTargetKey();

    /**
     * @return a {@link Builder} of {@link AliasAttributes}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    static Builder builder() {
        return new Builder();
    }

    /**
     * A builder for {@link AliasAttributes}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    final class Builder {
        private java.lang.String _aliasName;
        private software.amazon.awscdk.services.kms.IKey _aliasTargetKey;

        /**
         * Sets the value of AliasName
         * @param value the value to be set
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder withAliasName(final java.lang.String value) {
            this._aliasName = java.util.Objects.requireNonNull(value, "aliasName is required");
            return this;
        }
        /**
         * Sets the value of AliasTargetKey
         * @param value the value to be set
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder withAliasTargetKey(final software.amazon.awscdk.services.kms.IKey value) {
            this._aliasTargetKey = java.util.Objects.requireNonNull(value, "aliasTargetKey is required");
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link AliasAttributes}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public AliasAttributes build() {
            return new AliasAttributes() {
                private final java.lang.String $aliasName = java.util.Objects.requireNonNull(_aliasName, "aliasName is required");
                private final software.amazon.awscdk.services.kms.IKey $aliasTargetKey = java.util.Objects.requireNonNull(_aliasTargetKey, "aliasTargetKey is required");

                @Override
                public java.lang.String getAliasName() {
                    return this.$aliasName;
                }

                @Override
                public software.amazon.awscdk.services.kms.IKey getAliasTargetKey() {
                    return this.$aliasTargetKey;
                }

                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("aliasName", om.valueToTree(this.getAliasName()));
                    obj.set("aliasTargetKey", om.valueToTree(this.getAliasTargetKey()));
                    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.services.kms.AliasAttributes {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public java.lang.String getAliasName() {
            return this.jsiiGet("aliasName", java.lang.String.class);
        }

        /**
         */
        @Override
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public software.amazon.awscdk.services.kms.IKey getAliasTargetKey() {
            return this.jsiiGet("aliasTargetKey", software.amazon.awscdk.services.kms.IKey.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy