com.gammarer.cdk.aws.secure_bucket.SecureBucketProps Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-secure-bucket Show documentation
Show all versions of aws-secure-bucket Show documentation
This is a Simple S3 Secure Bucket.
package com.gammarer.cdk.aws.secure_bucket;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.89.0 (build 2f74b3e)", date = "2023-10-05T01:31:33.221Z")
@software.amazon.jsii.Jsii(module = com.gammarer.cdk.aws.secure_bucket.$Module.class, fqn = "@gammarer/aws-secure-bucket.SecureBucketProps")
@software.amazon.jsii.Jsii.Proxy(SecureBucketProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface SecureBucketProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getBucketName() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.gammarer.cdk.aws.secure_bucket.SecureBucketEncryption getEncryption() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEventBridgeEnabled() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getLifecycleRules() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.gammarer.cdk.aws.secure_bucket.SecureObjectOwnership getObjectOwnership() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getVersioned() {
return null;
}
/**
* @return a {@link Builder} of {@link SecureBucketProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SecureBucketProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String bucketName;
com.gammarer.cdk.aws.secure_bucket.SecureBucketEncryption encryption;
java.lang.Boolean eventBridgeEnabled;
java.util.List lifecycleRules;
com.gammarer.cdk.aws.secure_bucket.SecureObjectOwnership objectOwnership;
java.lang.Boolean versioned;
/**
* Sets the value of {@link SecureBucketProps#getBucketName}
* @param bucketName the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder bucketName(java.lang.String bucketName) {
this.bucketName = bucketName;
return this;
}
/**
* Sets the value of {@link SecureBucketProps#getEncryption}
* @param encryption the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder encryption(com.gammarer.cdk.aws.secure_bucket.SecureBucketEncryption encryption) {
this.encryption = encryption;
return this;
}
/**
* Sets the value of {@link SecureBucketProps#getEventBridgeEnabled}
* @param eventBridgeEnabled the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder eventBridgeEnabled(java.lang.Boolean eventBridgeEnabled) {
this.eventBridgeEnabled = eventBridgeEnabled;
return this;
}
/**
* Sets the value of {@link SecureBucketProps#getLifecycleRules}
* @param lifecycleRules the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder lifecycleRules(java.util.List extends software.amazon.awscdk.services.s3.LifecycleRule> lifecycleRules) {
this.lifecycleRules = (java.util.List)lifecycleRules;
return this;
}
/**
* Sets the value of {@link SecureBucketProps#getObjectOwnership}
* @param objectOwnership the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder objectOwnership(com.gammarer.cdk.aws.secure_bucket.SecureObjectOwnership objectOwnership) {
this.objectOwnership = objectOwnership;
return this;
}
/**
* Sets the value of {@link SecureBucketProps#getVersioned}
* @param versioned the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder versioned(java.lang.Boolean versioned) {
this.versioned = versioned;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SecureBucketProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public SecureBucketProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SecureBucketProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SecureBucketProps {
private final java.lang.String bucketName;
private final com.gammarer.cdk.aws.secure_bucket.SecureBucketEncryption encryption;
private final java.lang.Boolean eventBridgeEnabled;
private final java.util.List lifecycleRules;
private final com.gammarer.cdk.aws.secure_bucket.SecureObjectOwnership objectOwnership;
private final java.lang.Boolean versioned;
/**
* 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.bucketName = software.amazon.jsii.Kernel.get(this, "bucketName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.encryption = software.amazon.jsii.Kernel.get(this, "encryption", software.amazon.jsii.NativeType.forClass(com.gammarer.cdk.aws.secure_bucket.SecureBucketEncryption.class));
this.eventBridgeEnabled = software.amazon.jsii.Kernel.get(this, "eventBridgeEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.lifecycleRules = software.amazon.jsii.Kernel.get(this, "lifecycleRules", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.LifecycleRule.class)));
this.objectOwnership = software.amazon.jsii.Kernel.get(this, "objectOwnership", software.amazon.jsii.NativeType.forClass(com.gammarer.cdk.aws.secure_bucket.SecureObjectOwnership.class));
this.versioned = software.amazon.jsii.Kernel.get(this, "versioned", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.bucketName = builder.bucketName;
this.encryption = builder.encryption;
this.eventBridgeEnabled = builder.eventBridgeEnabled;
this.lifecycleRules = (java.util.List)builder.lifecycleRules;
this.objectOwnership = builder.objectOwnership;
this.versioned = builder.versioned;
}
@Override
public final java.lang.String getBucketName() {
return this.bucketName;
}
@Override
public final com.gammarer.cdk.aws.secure_bucket.SecureBucketEncryption getEncryption() {
return this.encryption;
}
@Override
public final java.lang.Boolean getEventBridgeEnabled() {
return this.eventBridgeEnabled;
}
@Override
public final java.util.List getLifecycleRules() {
return this.lifecycleRules;
}
@Override
public final com.gammarer.cdk.aws.secure_bucket.SecureObjectOwnership getObjectOwnership() {
return this.objectOwnership;
}
@Override
public final java.lang.Boolean getVersioned() {
return this.versioned;
}
@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();
if (this.getBucketName() != null) {
data.set("bucketName", om.valueToTree(this.getBucketName()));
}
if (this.getEncryption() != null) {
data.set("encryption", om.valueToTree(this.getEncryption()));
}
if (this.getEventBridgeEnabled() != null) {
data.set("eventBridgeEnabled", om.valueToTree(this.getEventBridgeEnabled()));
}
if (this.getLifecycleRules() != null) {
data.set("lifecycleRules", om.valueToTree(this.getLifecycleRules()));
}
if (this.getObjectOwnership() != null) {
data.set("objectOwnership", om.valueToTree(this.getObjectOwnership()));
}
if (this.getVersioned() != null) {
data.set("versioned", om.valueToTree(this.getVersioned()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@gammarer/aws-secure-bucket.SecureBucketProps"));
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;
SecureBucketProps.Jsii$Proxy that = (SecureBucketProps.Jsii$Proxy) o;
if (this.bucketName != null ? !this.bucketName.equals(that.bucketName) : that.bucketName != null) return false;
if (this.encryption != null ? !this.encryption.equals(that.encryption) : that.encryption != null) return false;
if (this.eventBridgeEnabled != null ? !this.eventBridgeEnabled.equals(that.eventBridgeEnabled) : that.eventBridgeEnabled != null) return false;
if (this.lifecycleRules != null ? !this.lifecycleRules.equals(that.lifecycleRules) : that.lifecycleRules != null) return false;
if (this.objectOwnership != null ? !this.objectOwnership.equals(that.objectOwnership) : that.objectOwnership != null) return false;
return this.versioned != null ? this.versioned.equals(that.versioned) : that.versioned == null;
}
@Override
public final int hashCode() {
int result = this.bucketName != null ? this.bucketName.hashCode() : 0;
result = 31 * result + (this.encryption != null ? this.encryption.hashCode() : 0);
result = 31 * result + (this.eventBridgeEnabled != null ? this.eventBridgeEnabled.hashCode() : 0);
result = 31 * result + (this.lifecycleRules != null ? this.lifecycleRules.hashCode() : 0);
result = 31 * result + (this.objectOwnership != null ? this.objectOwnership.hashCode() : 0);
result = 31 * result + (this.versioned != null ? this.versioned.hashCode() : 0);
return result;
}
}
}