io.github.cdklabs.generative_ai_cdk_constructs.bedrock.TopicProps 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.
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.410Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.TopicProps")
@software.amazon.jsii.Jsii.Proxy(TopicProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface TopicProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getDefinition() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getExamples() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getName() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getType() {
return null;
}
/**
* @return a {@link Builder} of {@link TopicProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link TopicProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String definition;
java.util.List examples;
java.lang.String name;
java.lang.String type;
/**
* Sets the value of {@link TopicProps#getDefinition}
* @param definition the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder definition(java.lang.String definition) {
this.definition = definition;
return this;
}
/**
* Sets the value of {@link TopicProps#getExamples}
* @param examples the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder examples(java.util.List examples) {
this.examples = examples;
return this;
}
/**
* Sets the value of {@link TopicProps#getName}
* @param name the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Sets the value of {@link TopicProps#getType}
* @param type the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder type(java.lang.String type) {
this.type = type;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link TopicProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public TopicProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link TopicProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TopicProps {
private final java.lang.String definition;
private final java.util.List examples;
private final java.lang.String name;
private final java.lang.String type;
/**
* 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.definition = software.amazon.jsii.Kernel.get(this, "definition", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.examples = software.amazon.jsii.Kernel.get(this, "examples", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.type = software.amazon.jsii.Kernel.get(this, "type", 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.definition = builder.definition;
this.examples = builder.examples;
this.name = builder.name;
this.type = builder.type;
}
@Override
public final java.lang.String getDefinition() {
return this.definition;
}
@Override
public final java.util.List getExamples() {
return this.examples;
}
@Override
public final java.lang.String getName() {
return this.name;
}
@Override
public final java.lang.String getType() {
return this.type;
}
@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.getDefinition() != null) {
data.set("definition", om.valueToTree(this.getDefinition()));
}
if (this.getExamples() != null) {
data.set("examples", om.valueToTree(this.getExamples()));
}
if (this.getName() != null) {
data.set("name", om.valueToTree(this.getName()));
}
if (this.getType() != null) {
data.set("type", om.valueToTree(this.getType()));
}
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.TopicProps"));
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;
TopicProps.Jsii$Proxy that = (TopicProps.Jsii$Proxy) o;
if (this.definition != null ? !this.definition.equals(that.definition) : that.definition != null) return false;
if (this.examples != null ? !this.examples.equals(that.examples) : that.examples != null) return false;
if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false;
return this.type != null ? this.type.equals(that.type) : that.type == null;
}
@Override
public final int hashCode() {
int result = this.definition != null ? this.definition.hashCode() : 0;
result = 31 * result + (this.examples != null ? this.examples.hashCode() : 0);
result = 31 * result + (this.name != null ? this.name.hashCode() : 0);
result = 31 * result + (this.type != null ? this.type.hashCode() : 0);
return result;
}
}
}