io.github.cdklabs.generative_ai_cdk_constructs.bedrock.BedrockFoundationModelProps Maven / Gradle / Ivy
Show all versions of generative-ai-cdk-constructs Show documentation
package io.github.cdklabs.generative_ai_cdk_constructs.bedrock;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T18:35:37.387Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.BedrockFoundationModelProps")
@software.amazon.jsii.Jsii.Proxy(BedrockFoundationModelProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface BedrockFoundationModelProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Bedrock Agents can use this model.
*
* Default: - false
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getSupportsAgents() {
return null;
}
/**
* (experimental) Bedrock Knowledge Base can use this model.
*
* Default: - false
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getSupportsKnowledgeBase() {
return null;
}
/**
* (experimental) Embedding models have different vector dimensions.
*
* Only applicable for embedding models.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getVectorDimensions() {
return null;
}
/**
* @return a {@link Builder} of {@link BedrockFoundationModelProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link BedrockFoundationModelProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Boolean supportsAgents;
java.lang.Boolean supportsKnowledgeBase;
java.lang.Number vectorDimensions;
/**
* Sets the value of {@link BedrockFoundationModelProps#getSupportsAgents}
* @param supportsAgents Bedrock Agents can use this model.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder supportsAgents(java.lang.Boolean supportsAgents) {
this.supportsAgents = supportsAgents;
return this;
}
/**
* Sets the value of {@link BedrockFoundationModelProps#getSupportsKnowledgeBase}
* @param supportsKnowledgeBase Bedrock Knowledge Base can use this model.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder supportsKnowledgeBase(java.lang.Boolean supportsKnowledgeBase) {
this.supportsKnowledgeBase = supportsKnowledgeBase;
return this;
}
/**
* Sets the value of {@link BedrockFoundationModelProps#getVectorDimensions}
* @param vectorDimensions Embedding models have different vector dimensions.
* Only applicable for embedding models.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vectorDimensions(java.lang.Number vectorDimensions) {
this.vectorDimensions = vectorDimensions;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link BedrockFoundationModelProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public BedrockFoundationModelProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link BedrockFoundationModelProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BedrockFoundationModelProps {
private final java.lang.Boolean supportsAgents;
private final java.lang.Boolean supportsKnowledgeBase;
private final java.lang.Number vectorDimensions;
/**
* 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.supportsAgents = software.amazon.jsii.Kernel.get(this, "supportsAgents", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.supportsKnowledgeBase = software.amazon.jsii.Kernel.get(this, "supportsKnowledgeBase", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.vectorDimensions = software.amazon.jsii.Kernel.get(this, "vectorDimensions", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.supportsAgents = builder.supportsAgents;
this.supportsKnowledgeBase = builder.supportsKnowledgeBase;
this.vectorDimensions = builder.vectorDimensions;
}
@Override
public final java.lang.Boolean getSupportsAgents() {
return this.supportsAgents;
}
@Override
public final java.lang.Boolean getSupportsKnowledgeBase() {
return this.supportsKnowledgeBase;
}
@Override
public final java.lang.Number getVectorDimensions() {
return this.vectorDimensions;
}
@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.getSupportsAgents() != null) {
data.set("supportsAgents", om.valueToTree(this.getSupportsAgents()));
}
if (this.getSupportsKnowledgeBase() != null) {
data.set("supportsKnowledgeBase", om.valueToTree(this.getSupportsKnowledgeBase()));
}
if (this.getVectorDimensions() != null) {
data.set("vectorDimensions", om.valueToTree(this.getVectorDimensions()));
}
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.BedrockFoundationModelProps"));
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;
BedrockFoundationModelProps.Jsii$Proxy that = (BedrockFoundationModelProps.Jsii$Proxy) o;
if (this.supportsAgents != null ? !this.supportsAgents.equals(that.supportsAgents) : that.supportsAgents != null) return false;
if (this.supportsKnowledgeBase != null ? !this.supportsKnowledgeBase.equals(that.supportsKnowledgeBase) : that.supportsKnowledgeBase != null) return false;
return this.vectorDimensions != null ? this.vectorDimensions.equals(that.vectorDimensions) : that.vectorDimensions == null;
}
@Override
public final int hashCode() {
int result = this.supportsAgents != null ? this.supportsAgents.hashCode() : 0;
result = 31 * result + (this.supportsKnowledgeBase != null ? this.supportsKnowledgeBase.hashCode() : 0);
result = 31 * result + (this.vectorDimensions != null ? this.vectorDimensions.hashCode() : 0);
return result;
}
}
}