software.amazon.awsconstructs.services.constructsfactories.S3BucketFactoryResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of constructsfactories Show documentation
Show all versions of constructsfactories Show documentation
Factories to allow creation of individual resources
The newest version!
package software.amazon.awsconstructs.services.constructsfactories;
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-18T13:39:27.722Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.constructsfactories.$Module.class, fqn = "@aws-solutions-constructs/aws-constructs-factories.S3BucketFactoryResponse")
@software.amazon.jsii.Jsii.Proxy(S3BucketFactoryResponse.Jsii$Proxy.class)
public interface S3BucketFactoryResponse extends software.amazon.jsii.JsiiSerializable {
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.s3.Bucket getS3Bucket();
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.Bucket getS3LoggingBucket() {
return null;
}
/**
* @return a {@link Builder} of {@link S3BucketFactoryResponse}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link S3BucketFactoryResponse}
*/
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.s3.Bucket s3Bucket;
software.amazon.awscdk.services.s3.Bucket s3LoggingBucket;
/**
* Sets the value of {@link S3BucketFactoryResponse#getS3Bucket}
* @param s3Bucket the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder s3Bucket(software.amazon.awscdk.services.s3.Bucket s3Bucket) {
this.s3Bucket = s3Bucket;
return this;
}
/**
* Sets the value of {@link S3BucketFactoryResponse#getS3LoggingBucket}
* @param s3LoggingBucket the value to be set.
* @return {@code this}
*/
public Builder s3LoggingBucket(software.amazon.awscdk.services.s3.Bucket s3LoggingBucket) {
this.s3LoggingBucket = s3LoggingBucket;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link S3BucketFactoryResponse}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public S3BucketFactoryResponse build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link S3BucketFactoryResponse}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements S3BucketFactoryResponse {
private final software.amazon.awscdk.services.s3.Bucket s3Bucket;
private final software.amazon.awscdk.services.s3.Bucket s3LoggingBucket;
/**
* 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.s3Bucket = software.amazon.jsii.Kernel.get(this, "s3Bucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.Bucket.class));
this.s3LoggingBucket = software.amazon.jsii.Kernel.get(this, "s3LoggingBucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.Bucket.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.s3Bucket = java.util.Objects.requireNonNull(builder.s3Bucket, "s3Bucket is required");
this.s3LoggingBucket = builder.s3LoggingBucket;
}
@Override
public final software.amazon.awscdk.services.s3.Bucket getS3Bucket() {
return this.s3Bucket;
}
@Override
public final software.amazon.awscdk.services.s3.Bucket getS3LoggingBucket() {
return this.s3LoggingBucket;
}
@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("s3Bucket", om.valueToTree(this.getS3Bucket()));
if (this.getS3LoggingBucket() != null) {
data.set("s3LoggingBucket", om.valueToTree(this.getS3LoggingBucket()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-solutions-constructs/aws-constructs-factories.S3BucketFactoryResponse"));
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;
S3BucketFactoryResponse.Jsii$Proxy that = (S3BucketFactoryResponse.Jsii$Proxy) o;
if (!s3Bucket.equals(that.s3Bucket)) return false;
return this.s3LoggingBucket != null ? this.s3LoggingBucket.equals(that.s3LoggingBucket) : that.s3LoggingBucket == null;
}
@Override
public final int hashCode() {
int result = this.s3Bucket.hashCode();
result = 31 * result + (this.s3LoggingBucket != null ? this.s3LoggingBucket.hashCode() : 0);
return result;
}
}
}