io.github.cdklabs.generative_ai_cdk_constructs.BaseClassProps Maven / Gradle / Ivy
Show all versions of generative-ai-cdk-constructs Show documentation
package io.github.cdklabs.generative_ai_cdk_constructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T22:27:31.835Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.BaseClassProps")
@software.amazon.jsii.Jsii.Proxy(BaseClassProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface BaseClassProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) construct id.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getConstructId();
/**
* (experimental) name of the construct.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull io.github.cdklabs.generative_ai_cdk_constructs.ConstructName getConstructName();
/**
* (experimental) Enable observability.
*
* Warning: associated cost with the services
* used. Best practice to enable by default.
*
* Default: - true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getObservability() {
return null;
}
/**
* (experimental) Value will be appended to resources name.
*
* Default: - _dev
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getStage() {
return null;
}
/**
* @return a {@link Builder} of {@link BaseClassProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link BaseClassProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String constructId;
io.github.cdklabs.generative_ai_cdk_constructs.ConstructName constructName;
java.lang.Boolean observability;
java.lang.String stage;
/**
* Sets the value of {@link BaseClassProps#getConstructId}
* @param constructId construct id. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder constructId(java.lang.String constructId) {
this.constructId = constructId;
return this;
}
/**
* Sets the value of {@link BaseClassProps#getConstructName}
* @param constructName name of the construct. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder constructName(io.github.cdklabs.generative_ai_cdk_constructs.ConstructName constructName) {
this.constructName = constructName;
return this;
}
/**
* Sets the value of {@link BaseClassProps#getObservability}
* @param observability Enable observability.
* Warning: associated cost with the services
* used. Best practice to enable by default.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder observability(java.lang.Boolean observability) {
this.observability = observability;
return this;
}
/**
* Sets the value of {@link BaseClassProps#getStage}
* @param stage Value will be appended to resources name.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stage(java.lang.String stage) {
this.stage = stage;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link BaseClassProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public BaseClassProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link BaseClassProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BaseClassProps {
private final java.lang.String constructId;
private final io.github.cdklabs.generative_ai_cdk_constructs.ConstructName constructName;
private final java.lang.Boolean observability;
private final java.lang.String stage;
/**
* 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.constructId = software.amazon.jsii.Kernel.get(this, "constructId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.constructName = software.amazon.jsii.Kernel.get(this, "constructName", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.ConstructName.class));
this.observability = software.amazon.jsii.Kernel.get(this, "observability", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.stage = software.amazon.jsii.Kernel.get(this, "stage", 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.constructId = java.util.Objects.requireNonNull(builder.constructId, "constructId is required");
this.constructName = java.util.Objects.requireNonNull(builder.constructName, "constructName is required");
this.observability = builder.observability;
this.stage = builder.stage;
}
@Override
public final java.lang.String getConstructId() {
return this.constructId;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.ConstructName getConstructName() {
return this.constructName;
}
@Override
public final java.lang.Boolean getObservability() {
return this.observability;
}
@Override
public final java.lang.String getStage() {
return this.stage;
}
@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("constructId", om.valueToTree(this.getConstructId()));
data.set("constructName", om.valueToTree(this.getConstructName()));
if (this.getObservability() != null) {
data.set("observability", om.valueToTree(this.getObservability()));
}
if (this.getStage() != null) {
data.set("stage", om.valueToTree(this.getStage()));
}
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.BaseClassProps"));
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;
BaseClassProps.Jsii$Proxy that = (BaseClassProps.Jsii$Proxy) o;
if (!constructId.equals(that.constructId)) return false;
if (!constructName.equals(that.constructName)) return false;
if (this.observability != null ? !this.observability.equals(that.observability) : that.observability != null) return false;
return this.stage != null ? this.stage.equals(that.stage) : that.stage == null;
}
@Override
public final int hashCode() {
int result = this.constructId.hashCode();
result = 31 * result + (this.constructName.hashCode());
result = 31 * result + (this.observability != null ? this.observability.hashCode() : 0);
result = 31 * result + (this.stage != null ? this.stage.hashCode() : 0);
return result;
}
}
}