software.amazon.awscdk.services.kms.CfnAliasProps Maven / Gradle / Ivy
Show all versions of kms Show documentation
package software.amazon.awscdk.services.kms;
/**
* Properties for defining a `AWS::KMS::Alias`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.14.1 (build 828de8a)", date = "2020-11-17T10:50:59.920Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.kms.$Module.class, fqn = "@aws-cdk/aws-kms.CfnAliasProps")
@software.amazon.jsii.Jsii.Proxy(CfnAliasProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnAliasProps extends software.amazon.jsii.JsiiSerializable {
/**
* `AWS::KMS::Alias.AliasName`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html#cfn-kms-alias-aliasname
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getAliasName();
/**
* `AWS::KMS::Alias.TargetKeyId`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html#cfn-kms-alias-targetkeyid
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getTargetKeyId();
/**
* @return a {@link Builder} of {@link CfnAliasProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnAliasProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private java.lang.String aliasName;
private java.lang.String targetKeyId;
/**
* Sets the value of {@link CfnAliasProps#getAliasName}
* @param aliasName `AWS::KMS::Alias.AliasName`. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder aliasName(java.lang.String aliasName) {
this.aliasName = aliasName;
return this;
}
/**
* Sets the value of {@link CfnAliasProps#getTargetKeyId}
* @param targetKeyId `AWS::KMS::Alias.TargetKeyId`. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder targetKeyId(java.lang.String targetKeyId) {
this.targetKeyId = targetKeyId;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnAliasProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnAliasProps build() {
return new Jsii$Proxy(aliasName, targetKeyId);
}
}
/**
* An implementation for {@link CfnAliasProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnAliasProps {
private final java.lang.String aliasName;
private final java.lang.String targetKeyId;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.aliasName = software.amazon.jsii.Kernel.get(this, "aliasName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.targetKeyId = software.amazon.jsii.Kernel.get(this, "targetKeyId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final java.lang.String aliasName, final java.lang.String targetKeyId) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.aliasName = java.util.Objects.requireNonNull(aliasName, "aliasName is required");
this.targetKeyId = java.util.Objects.requireNonNull(targetKeyId, "targetKeyId is required");
}
@Override
public final java.lang.String getAliasName() {
return this.aliasName;
}
@Override
public final java.lang.String getTargetKeyId() {
return this.targetKeyId;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
data.set("aliasName", om.valueToTree(this.getAliasName()));
data.set("targetKeyId", om.valueToTree(this.getTargetKeyId()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-kms.CfnAliasProps"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CfnAliasProps.Jsii$Proxy that = (CfnAliasProps.Jsii$Proxy) o;
if (!aliasName.equals(that.aliasName)) return false;
return this.targetKeyId.equals(that.targetKeyId);
}
@Override
public final int hashCode() {
int result = this.aliasName.hashCode();
result = 31 * result + (this.targetKeyId.hashCode());
return result;
}
}
}