software.amazon.awsconstructs.services.resources.CreateTemplateWriterResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources Show documentation
Show all versions of resources Show documentation
Resource CDK Constructs for patterns library
package software.amazon.awsconstructs.services.resources;
@javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-08-11T02:35:46.602Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.resources.$Module.class, fqn = "@aws-solutions-constructs/resources.CreateTemplateWriterResponse")
@software.amazon.jsii.Jsii.Proxy(CreateTemplateWriterResponse.Jsii$Proxy.class)
public interface CreateTemplateWriterResponse extends software.amazon.jsii.JsiiSerializable {
@org.jetbrains.annotations.NotNull software.amazon.awscdk.CustomResource getCustomResource();
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.s3.IBucket getS3Bucket();
@org.jetbrains.annotations.NotNull java.lang.String getS3Key();
/**
* @return a {@link Builder} of {@link CreateTemplateWriterResponse}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CreateTemplateWriterResponse}
*/
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.CustomResource customResource;
software.amazon.awscdk.services.s3.IBucket s3Bucket;
java.lang.String s3Key;
/**
* Sets the value of {@link CreateTemplateWriterResponse#getCustomResource}
* @param customResource the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder customResource(software.amazon.awscdk.CustomResource customResource) {
this.customResource = customResource;
return this;
}
/**
* Sets the value of {@link CreateTemplateWriterResponse#getS3Bucket}
* @param s3Bucket the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder s3Bucket(software.amazon.awscdk.services.s3.IBucket s3Bucket) {
this.s3Bucket = s3Bucket;
return this;
}
/**
* Sets the value of {@link CreateTemplateWriterResponse#getS3Key}
* @param s3Key the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder s3Key(java.lang.String s3Key) {
this.s3Key = s3Key;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CreateTemplateWriterResponse}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public CreateTemplateWriterResponse build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CreateTemplateWriterResponse}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CreateTemplateWriterResponse {
private final software.amazon.awscdk.CustomResource customResource;
private final software.amazon.awscdk.services.s3.IBucket s3Bucket;
private final java.lang.String s3Key;
/**
* 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.customResource = software.amazon.jsii.Kernel.get(this, "customResource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.CustomResource.class));
this.s3Bucket = software.amazon.jsii.Kernel.get(this, "s3Bucket", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class));
this.s3Key = software.amazon.jsii.Kernel.get(this, "s3Key", 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 Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.customResource = java.util.Objects.requireNonNull(builder.customResource, "customResource is required");
this.s3Bucket = java.util.Objects.requireNonNull(builder.s3Bucket, "s3Bucket is required");
this.s3Key = java.util.Objects.requireNonNull(builder.s3Key, "s3Key is required");
}
@Override
public final software.amazon.awscdk.CustomResource getCustomResource() {
return this.customResource;
}
@Override
public final software.amazon.awscdk.services.s3.IBucket getS3Bucket() {
return this.s3Bucket;
}
@Override
public final java.lang.String getS3Key() {
return this.s3Key;
}
@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("customResource", om.valueToTree(this.getCustomResource()));
data.set("s3Bucket", om.valueToTree(this.getS3Bucket()));
data.set("s3Key", om.valueToTree(this.getS3Key()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-solutions-constructs/resources.CreateTemplateWriterResponse"));
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;
CreateTemplateWriterResponse.Jsii$Proxy that = (CreateTemplateWriterResponse.Jsii$Proxy) o;
if (!customResource.equals(that.customResource)) return false;
if (!s3Bucket.equals(that.s3Bucket)) return false;
return this.s3Key.equals(that.s3Key);
}
@Override
public final int hashCode() {
int result = this.customResource.hashCode();
result = 31 * result + (this.s3Bucket.hashCode());
result = 31 * result + (this.s3Key.hashCode());
return result;
}
}
}