
software.amazon.awscdk.services.secretsmanager.CfnSecretProps Maven / Gradle / Ivy
package software.amazon.awscdk.services.secretsmanager;
/**
* Properties for defining a `AWS::SecretsManager::Secret`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html
*/
@javax.annotation.Generated(value = "jsii-pacmak/0.22.0 (build 14afdde)", date = "2020-03-03T11:43:14.070Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.secretsmanager.$Module.class, fqn = "@aws-cdk/aws-secretsmanager.CfnSecretProps")
@software.amazon.jsii.Jsii.Proxy(CfnSecretProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public interface CfnSecretProps extends software.amazon.jsii.JsiiSerializable {
/**
* `AWS::SecretsManager::Secret.Description`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html#cfn-secretsmanager-secret-description
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
default java.lang.String getDescription() {
return null;
}
/**
* `AWS::SecretsManager::Secret.GenerateSecretString`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html#cfn-secretsmanager-secret-generatesecretstring
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
default java.lang.Object getGenerateSecretString() {
return null;
}
/**
* `AWS::SecretsManager::Secret.KmsKeyId`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html#cfn-secretsmanager-secret-kmskeyid
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
default java.lang.String getKmsKeyId() {
return null;
}
/**
* `AWS::SecretsManager::Secret.Name`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html#cfn-secretsmanager-secret-name
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
default java.lang.String getName() {
return null;
}
/**
* `AWS::SecretsManager::Secret.SecretString`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html#cfn-secretsmanager-secret-secretstring
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
default java.lang.String getSecretString() {
return null;
}
/**
* `AWS::SecretsManager::Secret.Tags`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html#cfn-secretsmanager-secret-tags
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
default java.util.List getTags() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnSecretProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnSecretProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public static final class Builder {
private java.lang.String description;
private java.lang.Object generateSecretString;
private java.lang.String kmsKeyId;
private java.lang.String name;
private java.lang.String secretString;
private java.util.List tags;
/**
* Sets the value of {@link CfnSecretProps#getDescription}
* @param description `AWS::SecretsManager::Secret.Description`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link CfnSecretProps#getGenerateSecretString}
* @param generateSecretString `AWS::SecretsManager::Secret.GenerateSecretString`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder generateSecretString(software.amazon.awscdk.core.IResolvable generateSecretString) {
this.generateSecretString = generateSecretString;
return this;
}
/**
* Sets the value of {@link CfnSecretProps#getGenerateSecretString}
* @param generateSecretString `AWS::SecretsManager::Secret.GenerateSecretString`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder generateSecretString(software.amazon.awscdk.services.secretsmanager.CfnSecret.GenerateSecretStringProperty generateSecretString) {
this.generateSecretString = generateSecretString;
return this;
}
/**
* Sets the value of {@link CfnSecretProps#getKmsKeyId}
* @param kmsKeyId `AWS::SecretsManager::Secret.KmsKeyId`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder kmsKeyId(java.lang.String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
return this;
}
/**
* Sets the value of {@link CfnSecretProps#getName}
* @param name `AWS::SecretsManager::Secret.Name`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Sets the value of {@link CfnSecretProps#getSecretString}
* @param secretString `AWS::SecretsManager::Secret.SecretString`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder secretString(java.lang.String secretString) {
this.secretString = secretString;
return this;
}
/**
* Sets the value of {@link CfnSecretProps#getTags}
* @param tags `AWS::SecretsManager::Secret.Tags`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder tags(java.util.List tags) {
this.tags = tags;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnSecretProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public CfnSecretProps build() {
return new Jsii$Proxy(description, generateSecretString, kmsKeyId, name, secretString, tags);
}
}
/**
* An implementation for {@link CfnSecretProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnSecretProps {
private final java.lang.String description;
private final java.lang.Object generateSecretString;
private final java.lang.String kmsKeyId;
private final java.lang.String name;
private final java.lang.String secretString;
private final java.util.List tags;
/**
* 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.description = this.jsiiGet("description", java.lang.String.class);
this.generateSecretString = this.jsiiGet("generateSecretString", java.lang.Object.class);
this.kmsKeyId = this.jsiiGet("kmsKeyId", java.lang.String.class);
this.name = this.jsiiGet("name", java.lang.String.class);
this.secretString = this.jsiiGet("secretString", java.lang.String.class);
this.tags = this.jsiiGet("tags", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.CfnTag.class)));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final java.lang.String description, final java.lang.Object generateSecretString, final java.lang.String kmsKeyId, final java.lang.String name, final java.lang.String secretString, final java.util.List tags) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.description = description;
this.generateSecretString = generateSecretString;
this.kmsKeyId = kmsKeyId;
this.name = name;
this.secretString = secretString;
this.tags = tags;
}
@Override
public java.lang.String getDescription() {
return this.description;
}
@Override
public java.lang.Object getGenerateSecretString() {
return this.generateSecretString;
}
@Override
public java.lang.String getKmsKeyId() {
return this.kmsKeyId;
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public java.lang.String getSecretString() {
return this.secretString;
}
@Override
public java.util.List getTags() {
return this.tags;
}
@Override
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();
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getGenerateSecretString() != null) {
data.set("generateSecretString", om.valueToTree(this.getGenerateSecretString()));
}
if (this.getKmsKeyId() != null) {
data.set("kmsKeyId", om.valueToTree(this.getKmsKeyId()));
}
if (this.getName() != null) {
data.set("name", om.valueToTree(this.getName()));
}
if (this.getSecretString() != null) {
data.set("secretString", om.valueToTree(this.getSecretString()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-secretsmanager.CfnSecretProps"));
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 boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CfnSecretProps.Jsii$Proxy that = (CfnSecretProps.Jsii$Proxy) o;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.generateSecretString != null ? !this.generateSecretString.equals(that.generateSecretString) : that.generateSecretString != null) return false;
if (this.kmsKeyId != null ? !this.kmsKeyId.equals(that.kmsKeyId) : that.kmsKeyId != null) return false;
if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false;
if (this.secretString != null ? !this.secretString.equals(that.secretString) : that.secretString != null) return false;
return this.tags != null ? this.tags.equals(that.tags) : that.tags == null;
}
@Override
public int hashCode() {
int result = this.description != null ? this.description.hashCode() : 0;
result = 31 * result + (this.generateSecretString != null ? this.generateSecretString.hashCode() : 0);
result = 31 * result + (this.kmsKeyId != null ? this.kmsKeyId.hashCode() : 0);
result = 31 * result + (this.name != null ? this.name.hashCode() : 0);
result = 31 * result + (this.secretString != null ? this.secretString.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
return result;
}
}
}