software.amazon.awsconstructs.services.s3stepfunctions.S3ToStepfunctionsProps Maven / Gradle / Ivy
Show all versions of s3stepfunctions Show documentation
package software.amazon.awsconstructs.services.s3stepfunctions;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-27T01:38:10.128Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.s3stepfunctions.$Module.class, fqn = "@aws-solutions-constructs/aws-s3-stepfunctions.S3ToStepfunctionsProps")
@software.amazon.jsii.Jsii.Proxy(S3ToStepfunctionsProps.Jsii$Proxy.class)
public interface S3ToStepfunctionsProps extends software.amazon.jsii.JsiiSerializable {
/**
* User provided StateMachineProps to override the defaults.
*
* Default: - None
*/
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.stepfunctions.StateMachineProps getStateMachineProps();
/**
* Optional user provided props to override the default props for the S3 Bucket.
*
* Default: - Default props are used
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.BucketProps getBucketProps() {
return null;
}
/**
* Whether to create recommended CloudWatch alarms.
*
* Default: - Alarms are created
*/
default @org.jetbrains.annotations.Nullable java.lang.Boolean getCreateCloudWatchAlarms() {
return null;
}
/**
* Whether to deploy a Trail in AWS CloudTrail to log API events in Amazon S3.
*
* Default: - true
*/
default @org.jetbrains.annotations.Nullable java.lang.Boolean getDeployCloudTrail() {
return null;
}
/**
* Optional user provided eventRuleProps to override the defaults.
*
* Default: - None
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.RuleProps getEventRuleProps() {
return null;
}
/**
* Existing instance of S3 Bucket object, providing both this and bucketProps
will cause an error.
*
* The Amazon EventBridge property must be enabled in the existing bucket for the construct to work.
*
* Default: - None
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.IBucket getExistingBucketObj() {
return null;
}
/**
* Optional user provided props to override the default props for the S3 Logging Bucket.
*
* Default: - Default props are used
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.BucketProps getLoggingBucketProps() {
return null;
}
/**
* Optional user provided props to override the default props for the CloudWatchLogs LogGroup.
*
* Default: - Default props are used
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.logs.LogGroupProps getLogGroupProps() {
return null;
}
/**
* Whether to turn on Access Logs for the S3 bucket with the associated storage costs.
*
* Enabling Access Logging is a best practice.
*
* Default: - true
*/
default @org.jetbrains.annotations.Nullable java.lang.Boolean getLogS3AccessLogs() {
return null;
}
/**
* @return a {@link Builder} of {@link S3ToStepfunctionsProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link S3ToStepfunctionsProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.stepfunctions.StateMachineProps stateMachineProps;
software.amazon.awscdk.services.s3.BucketProps bucketProps;
java.lang.Boolean createCloudWatchAlarms;
java.lang.Boolean deployCloudTrail;
software.amazon.awscdk.services.events.RuleProps eventRuleProps;
software.amazon.awscdk.services.s3.IBucket existingBucketObj;
software.amazon.awscdk.services.s3.BucketProps loggingBucketProps;
software.amazon.awscdk.services.logs.LogGroupProps logGroupProps;
java.lang.Boolean logS3AccessLogs;
/**
* Sets the value of {@link S3ToStepfunctionsProps#getStateMachineProps}
* @param stateMachineProps User provided StateMachineProps to override the defaults. This parameter is required.
* @return {@code this}
*/
public Builder stateMachineProps(software.amazon.awscdk.services.stepfunctions.StateMachineProps stateMachineProps) {
this.stateMachineProps = stateMachineProps;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getBucketProps}
* @param bucketProps Optional user provided props to override the default props for the S3 Bucket.
* @return {@code this}
*/
public Builder bucketProps(software.amazon.awscdk.services.s3.BucketProps bucketProps) {
this.bucketProps = bucketProps;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getCreateCloudWatchAlarms}
* @param createCloudWatchAlarms Whether to create recommended CloudWatch alarms.
* @return {@code this}
*/
public Builder createCloudWatchAlarms(java.lang.Boolean createCloudWatchAlarms) {
this.createCloudWatchAlarms = createCloudWatchAlarms;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getDeployCloudTrail}
* @param deployCloudTrail Whether to deploy a Trail in AWS CloudTrail to log API events in Amazon S3.
* @return {@code this}
*/
public Builder deployCloudTrail(java.lang.Boolean deployCloudTrail) {
this.deployCloudTrail = deployCloudTrail;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getEventRuleProps}
* @param eventRuleProps Optional user provided eventRuleProps to override the defaults.
* @return {@code this}
*/
public Builder eventRuleProps(software.amazon.awscdk.services.events.RuleProps eventRuleProps) {
this.eventRuleProps = eventRuleProps;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getExistingBucketObj}
* @param existingBucketObj Existing instance of S3 Bucket object, providing both this and bucketProps
will cause an error.
* The Amazon EventBridge property must be enabled in the existing bucket for the construct to work.
* @return {@code this}
*/
public Builder existingBucketObj(software.amazon.awscdk.services.s3.IBucket existingBucketObj) {
this.existingBucketObj = existingBucketObj;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getLoggingBucketProps}
* @param loggingBucketProps Optional user provided props to override the default props for the S3 Logging Bucket.
* @return {@code this}
*/
public Builder loggingBucketProps(software.amazon.awscdk.services.s3.BucketProps loggingBucketProps) {
this.loggingBucketProps = loggingBucketProps;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getLogGroupProps}
* @param logGroupProps Optional user provided props to override the default props for the CloudWatchLogs LogGroup.
* @return {@code this}
*/
public Builder logGroupProps(software.amazon.awscdk.services.logs.LogGroupProps logGroupProps) {
this.logGroupProps = logGroupProps;
return this;
}
/**
* Sets the value of {@link S3ToStepfunctionsProps#getLogS3AccessLogs}
* @param logS3AccessLogs Whether to turn on Access Logs for the S3 bucket with the associated storage costs.
* Enabling Access Logging is a best practice.
* @return {@code this}
*/
public Builder logS3AccessLogs(java.lang.Boolean logS3AccessLogs) {
this.logS3AccessLogs = logS3AccessLogs;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link S3ToStepfunctionsProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public S3ToStepfunctionsProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link S3ToStepfunctionsProps}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements S3ToStepfunctionsProps {
private final software.amazon.awscdk.services.stepfunctions.StateMachineProps stateMachineProps;
private final software.amazon.awscdk.services.s3.BucketProps bucketProps;
private final java.lang.Boolean createCloudWatchAlarms;
private final java.lang.Boolean deployCloudTrail;
private final software.amazon.awscdk.services.events.RuleProps eventRuleProps;
private final software.amazon.awscdk.services.s3.IBucket existingBucketObj;
private final software.amazon.awscdk.services.s3.BucketProps loggingBucketProps;
private final software.amazon.awscdk.services.logs.LogGroupProps logGroupProps;
private final java.lang.Boolean logS3AccessLogs;
/**
* 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.stateMachineProps = software.amazon.jsii.Kernel.get(this, "stateMachineProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.stepfunctions.StateMachineProps.class));
this.bucketProps = software.amazon.jsii.Kernel.get(this, "bucketProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.BucketProps.class));
this.createCloudWatchAlarms = software.amazon.jsii.Kernel.get(this, "createCloudWatchAlarms", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.deployCloudTrail = software.amazon.jsii.Kernel.get(this, "deployCloudTrail", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.eventRuleProps = software.amazon.jsii.Kernel.get(this, "eventRuleProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.RuleProps.class));
this.existingBucketObj = software.amazon.jsii.Kernel.get(this, "existingBucketObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class));
this.loggingBucketProps = software.amazon.jsii.Kernel.get(this, "loggingBucketProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.BucketProps.class));
this.logGroupProps = software.amazon.jsii.Kernel.get(this, "logGroupProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.LogGroupProps.class));
this.logS3AccessLogs = software.amazon.jsii.Kernel.get(this, "logS3AccessLogs", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.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.stateMachineProps = java.util.Objects.requireNonNull(builder.stateMachineProps, "stateMachineProps is required");
this.bucketProps = builder.bucketProps;
this.createCloudWatchAlarms = builder.createCloudWatchAlarms;
this.deployCloudTrail = builder.deployCloudTrail;
this.eventRuleProps = builder.eventRuleProps;
this.existingBucketObj = builder.existingBucketObj;
this.loggingBucketProps = builder.loggingBucketProps;
this.logGroupProps = builder.logGroupProps;
this.logS3AccessLogs = builder.logS3AccessLogs;
}
@Override
public final software.amazon.awscdk.services.stepfunctions.StateMachineProps getStateMachineProps() {
return this.stateMachineProps;
}
@Override
public final software.amazon.awscdk.services.s3.BucketProps getBucketProps() {
return this.bucketProps;
}
@Override
public final java.lang.Boolean getCreateCloudWatchAlarms() {
return this.createCloudWatchAlarms;
}
@Override
public final java.lang.Boolean getDeployCloudTrail() {
return this.deployCloudTrail;
}
@Override
public final software.amazon.awscdk.services.events.RuleProps getEventRuleProps() {
return this.eventRuleProps;
}
@Override
public final software.amazon.awscdk.services.s3.IBucket getExistingBucketObj() {
return this.existingBucketObj;
}
@Override
public final software.amazon.awscdk.services.s3.BucketProps getLoggingBucketProps() {
return this.loggingBucketProps;
}
@Override
public final software.amazon.awscdk.services.logs.LogGroupProps getLogGroupProps() {
return this.logGroupProps;
}
@Override
public final java.lang.Boolean getLogS3AccessLogs() {
return this.logS3AccessLogs;
}
@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("stateMachineProps", om.valueToTree(this.getStateMachineProps()));
if (this.getBucketProps() != null) {
data.set("bucketProps", om.valueToTree(this.getBucketProps()));
}
if (this.getCreateCloudWatchAlarms() != null) {
data.set("createCloudWatchAlarms", om.valueToTree(this.getCreateCloudWatchAlarms()));
}
if (this.getDeployCloudTrail() != null) {
data.set("deployCloudTrail", om.valueToTree(this.getDeployCloudTrail()));
}
if (this.getEventRuleProps() != null) {
data.set("eventRuleProps", om.valueToTree(this.getEventRuleProps()));
}
if (this.getExistingBucketObj() != null) {
data.set("existingBucketObj", om.valueToTree(this.getExistingBucketObj()));
}
if (this.getLoggingBucketProps() != null) {
data.set("loggingBucketProps", om.valueToTree(this.getLoggingBucketProps()));
}
if (this.getLogGroupProps() != null) {
data.set("logGroupProps", om.valueToTree(this.getLogGroupProps()));
}
if (this.getLogS3AccessLogs() != null) {
data.set("logS3AccessLogs", om.valueToTree(this.getLogS3AccessLogs()));
}
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-s3-stepfunctions.S3ToStepfunctionsProps"));
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;
S3ToStepfunctionsProps.Jsii$Proxy that = (S3ToStepfunctionsProps.Jsii$Proxy) o;
if (!stateMachineProps.equals(that.stateMachineProps)) return false;
if (this.bucketProps != null ? !this.bucketProps.equals(that.bucketProps) : that.bucketProps != null) return false;
if (this.createCloudWatchAlarms != null ? !this.createCloudWatchAlarms.equals(that.createCloudWatchAlarms) : that.createCloudWatchAlarms != null) return false;
if (this.deployCloudTrail != null ? !this.deployCloudTrail.equals(that.deployCloudTrail) : that.deployCloudTrail != null) return false;
if (this.eventRuleProps != null ? !this.eventRuleProps.equals(that.eventRuleProps) : that.eventRuleProps != null) return false;
if (this.existingBucketObj != null ? !this.existingBucketObj.equals(that.existingBucketObj) : that.existingBucketObj != null) return false;
if (this.loggingBucketProps != null ? !this.loggingBucketProps.equals(that.loggingBucketProps) : that.loggingBucketProps != null) return false;
if (this.logGroupProps != null ? !this.logGroupProps.equals(that.logGroupProps) : that.logGroupProps != null) return false;
return this.logS3AccessLogs != null ? this.logS3AccessLogs.equals(that.logS3AccessLogs) : that.logS3AccessLogs == null;
}
@Override
public final int hashCode() {
int result = this.stateMachineProps.hashCode();
result = 31 * result + (this.bucketProps != null ? this.bucketProps.hashCode() : 0);
result = 31 * result + (this.createCloudWatchAlarms != null ? this.createCloudWatchAlarms.hashCode() : 0);
result = 31 * result + (this.deployCloudTrail != null ? this.deployCloudTrail.hashCode() : 0);
result = 31 * result + (this.eventRuleProps != null ? this.eventRuleProps.hashCode() : 0);
result = 31 * result + (this.existingBucketObj != null ? this.existingBucketObj.hashCode() : 0);
result = 31 * result + (this.loggingBucketProps != null ? this.loggingBucketProps.hashCode() : 0);
result = 31 * result + (this.logGroupProps != null ? this.logGroupProps.hashCode() : 0);
result = 31 * result + (this.logS3AccessLogs != null ? this.logS3AccessLogs.hashCode() : 0);
return result;
}
}
}