io.github.cdklabs.generative_ai_cdk_constructs.bedrock.S3Identifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of generative-ai-cdk-constructs Show documentation
Show all versions of generative-ai-cdk-constructs Show documentation
AWS Generative AI CDK Constructs is a library for well-architected generative AI patterns.
The newest version!
package io.github.cdklabs.generative_ai_cdk_constructs.bedrock;
/**
* (experimental) Result of the bind when S3ApiSchema
is used.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-01T15:41:28.763Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.S3Identifier")
@software.amazon.jsii.Jsii.Proxy(S3Identifier.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface S3Identifier extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The name of the S3 bucket.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getS3BucketName();
/**
* (experimental) The S3 object key containing the resource.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getS3ObjectKey();
/**
* @return a {@link Builder} of {@link S3Identifier}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link S3Identifier}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String s3BucketName;
java.lang.String s3ObjectKey;
/**
* Sets the value of {@link S3Identifier#getS3BucketName}
* @param s3BucketName The name of the S3 bucket. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder s3BucketName(java.lang.String s3BucketName) {
this.s3BucketName = s3BucketName;
return this;
}
/**
* Sets the value of {@link S3Identifier#getS3ObjectKey}
* @param s3ObjectKey The S3 object key containing the resource. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder s3ObjectKey(java.lang.String s3ObjectKey) {
this.s3ObjectKey = s3ObjectKey;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link S3Identifier}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public S3Identifier build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link S3Identifier}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements S3Identifier {
private final java.lang.String s3BucketName;
private final java.lang.String s3ObjectKey;
/**
* 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.s3BucketName = software.amazon.jsii.Kernel.get(this, "s3BucketName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.s3ObjectKey = software.amazon.jsii.Kernel.get(this, "s3ObjectKey", 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.s3BucketName = java.util.Objects.requireNonNull(builder.s3BucketName, "s3BucketName is required");
this.s3ObjectKey = java.util.Objects.requireNonNull(builder.s3ObjectKey, "s3ObjectKey is required");
}
@Override
public final java.lang.String getS3BucketName() {
return this.s3BucketName;
}
@Override
public final java.lang.String getS3ObjectKey() {
return this.s3ObjectKey;
}
@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("s3BucketName", om.valueToTree(this.getS3BucketName()));
data.set("s3ObjectKey", om.valueToTree(this.getS3ObjectKey()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/generative-ai-cdk-constructs.bedrock.S3Identifier"));
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;
S3Identifier.Jsii$Proxy that = (S3Identifier.Jsii$Proxy) o;
if (!s3BucketName.equals(that.s3BucketName)) return false;
return this.s3ObjectKey.equals(that.s3ObjectKey);
}
@Override
public final int hashCode() {
int result = this.s3BucketName.hashCode();
result = 31 * result + (this.s3ObjectKey.hashCode());
return result;
}
}
}