io.github.cdklabs.generative_ai_cdk_constructs.AsyncInferenceConfig Maven / Gradle / Ivy
package io.github.cdklabs.generative_ai_cdk_constructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-07T16:14:00.518Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.AsyncInferenceConfig")
@software.amazon.jsii.Jsii.Proxy(AsyncInferenceConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface AsyncInferenceConfig extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getFailurePath();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getOutputPath();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMaxConcurrentInvocationsPerInstance() {
return null;
}
/**
* @return a {@link Builder} of {@link AsyncInferenceConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AsyncInferenceConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String failurePath;
java.lang.String outputPath;
java.lang.Number maxConcurrentInvocationsPerInstance;
/**
* Sets the value of {@link AsyncInferenceConfig#getFailurePath}
* @param failurePath the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder failurePath(java.lang.String failurePath) {
this.failurePath = failurePath;
return this;
}
/**
* Sets the value of {@link AsyncInferenceConfig#getOutputPath}
* @param outputPath the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder outputPath(java.lang.String outputPath) {
this.outputPath = outputPath;
return this;
}
/**
* Sets the value of {@link AsyncInferenceConfig#getMaxConcurrentInvocationsPerInstance}
* @param maxConcurrentInvocationsPerInstance the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder maxConcurrentInvocationsPerInstance(java.lang.Number maxConcurrentInvocationsPerInstance) {
this.maxConcurrentInvocationsPerInstance = maxConcurrentInvocationsPerInstance;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AsyncInferenceConfig}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public AsyncInferenceConfig build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AsyncInferenceConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AsyncInferenceConfig {
private final java.lang.String failurePath;
private final java.lang.String outputPath;
private final java.lang.Number maxConcurrentInvocationsPerInstance;
/**
* 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.failurePath = software.amazon.jsii.Kernel.get(this, "failurePath", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.outputPath = software.amazon.jsii.Kernel.get(this, "outputPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.maxConcurrentInvocationsPerInstance = software.amazon.jsii.Kernel.get(this, "maxConcurrentInvocationsPerInstance", 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.failurePath = java.util.Objects.requireNonNull(builder.failurePath, "failurePath is required");
this.outputPath = java.util.Objects.requireNonNull(builder.outputPath, "outputPath is required");
this.maxConcurrentInvocationsPerInstance = builder.maxConcurrentInvocationsPerInstance;
}
@Override
public final java.lang.String getFailurePath() {
return this.failurePath;
}
@Override
public final java.lang.String getOutputPath() {
return this.outputPath;
}
@Override
public final java.lang.Number getMaxConcurrentInvocationsPerInstance() {
return this.maxConcurrentInvocationsPerInstance;
}
@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("failurePath", om.valueToTree(this.getFailurePath()));
data.set("outputPath", om.valueToTree(this.getOutputPath()));
if (this.getMaxConcurrentInvocationsPerInstance() != null) {
data.set("maxConcurrentInvocationsPerInstance", om.valueToTree(this.getMaxConcurrentInvocationsPerInstance()));
}
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.AsyncInferenceConfig"));
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;
AsyncInferenceConfig.Jsii$Proxy that = (AsyncInferenceConfig.Jsii$Proxy) o;
if (!failurePath.equals(that.failurePath)) return false;
if (!outputPath.equals(that.outputPath)) return false;
return this.maxConcurrentInvocationsPerInstance != null ? this.maxConcurrentInvocationsPerInstance.equals(that.maxConcurrentInvocationsPerInstance) : that.maxConcurrentInvocationsPerInstance == null;
}
@Override
public final int hashCode() {
int result = this.failurePath.hashCode();
result = 31 * result + (this.outputPath.hashCode());
result = 31 * result + (this.maxConcurrentInvocationsPerInstance != null ? this.maxConcurrentInvocationsPerInstance.hashCode() : 0);
return result;
}
}
}