All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cdklabs.generative_ai_cdk_constructs.JumpStartSageMakerEndpointProps 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.584Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.JumpStartSageMakerEndpointProps")
@software.amazon.jsii.Jsii.Proxy(JumpStartSageMakerEndpointProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface JumpStartSageMakerEndpointProps extends software.amazon.jsii.JsiiSerializable {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getEndpointName();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull io.github.cdklabs.generative_ai_cdk_constructs.JumpStartModel getModel();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.Boolean getAcceptEula() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.util.Map getEnvironment() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.Number getInstanceCount() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.SageMakerInstanceType getInstanceType() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iam.Role getRole() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.Number getStartupHealthCheckTimeoutInSeconds() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sagemaker.CfnModel.VpcConfigProperty getVpcConfig() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link JumpStartSageMakerEndpointProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link JumpStartSageMakerEndpointProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.String endpointName;
        io.github.cdklabs.generative_ai_cdk_constructs.JumpStartModel model;
        java.lang.Boolean acceptEula;
        java.util.Map environment;
        java.lang.Number instanceCount;
        io.github.cdklabs.generative_ai_cdk_constructs.SageMakerInstanceType instanceType;
        software.amazon.awscdk.services.iam.Role role;
        java.lang.Number startupHealthCheckTimeoutInSeconds;
        software.amazon.awscdk.services.sagemaker.CfnModel.VpcConfigProperty vpcConfig;

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getEndpointName}
         * @param endpointName the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder endpointName(java.lang.String endpointName) {
            this.endpointName = endpointName;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getModel}
         * @param model the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder model(io.github.cdklabs.generative_ai_cdk_constructs.JumpStartModel model) {
            this.model = model;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getAcceptEula}
         * @param acceptEula the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder acceptEula(java.lang.Boolean acceptEula) {
            this.acceptEula = acceptEula;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getEnvironment}
         * @param environment the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder environment(java.util.Map environment) {
            this.environment = environment;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getInstanceCount}
         * @param instanceCount the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder instanceCount(java.lang.Number instanceCount) {
            this.instanceCount = instanceCount;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getInstanceType}
         * @param instanceType the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder instanceType(io.github.cdklabs.generative_ai_cdk_constructs.SageMakerInstanceType instanceType) {
            this.instanceType = instanceType;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getRole}
         * @param role the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder role(software.amazon.awscdk.services.iam.Role role) {
            this.role = role;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getStartupHealthCheckTimeoutInSeconds}
         * @param startupHealthCheckTimeoutInSeconds the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder startupHealthCheckTimeoutInSeconds(java.lang.Number startupHealthCheckTimeoutInSeconds) {
            this.startupHealthCheckTimeoutInSeconds = startupHealthCheckTimeoutInSeconds;
            return this;
        }

        /**
         * Sets the value of {@link JumpStartSageMakerEndpointProps#getVpcConfig}
         * @param vpcConfig the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder vpcConfig(software.amazon.awscdk.services.sagemaker.CfnModel.VpcConfigProperty vpcConfig) {
            this.vpcConfig = vpcConfig;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link JumpStartSageMakerEndpointProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @Override
        public JumpStartSageMakerEndpointProps build() {
            return new Jsii$Proxy(this);
        }
    }

    /**
     * An implementation for {@link JumpStartSageMakerEndpointProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements JumpStartSageMakerEndpointProps {
        private final java.lang.String endpointName;
        private final io.github.cdklabs.generative_ai_cdk_constructs.JumpStartModel model;
        private final java.lang.Boolean acceptEula;
        private final java.util.Map environment;
        private final java.lang.Number instanceCount;
        private final io.github.cdklabs.generative_ai_cdk_constructs.SageMakerInstanceType instanceType;
        private final software.amazon.awscdk.services.iam.Role role;
        private final java.lang.Number startupHealthCheckTimeoutInSeconds;
        private final software.amazon.awscdk.services.sagemaker.CfnModel.VpcConfigProperty vpcConfig;

        /**
         * 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.endpointName = software.amazon.jsii.Kernel.get(this, "endpointName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.model = software.amazon.jsii.Kernel.get(this, "model", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.JumpStartModel.class));
            this.acceptEula = software.amazon.jsii.Kernel.get(this, "acceptEula", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
            this.environment = software.amazon.jsii.Kernel.get(this, "environment", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
            this.instanceCount = software.amazon.jsii.Kernel.get(this, "instanceCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
            this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.SageMakerInstanceType.class));
            this.role = software.amazon.jsii.Kernel.get(this, "role", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Role.class));
            this.startupHealthCheckTimeoutInSeconds = software.amazon.jsii.Kernel.get(this, "startupHealthCheckTimeoutInSeconds", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
            this.vpcConfig = software.amazon.jsii.Kernel.get(this, "vpcConfig", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sagemaker.CfnModel.VpcConfigProperty.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.endpointName = java.util.Objects.requireNonNull(builder.endpointName, "endpointName is required");
            this.model = java.util.Objects.requireNonNull(builder.model, "model is required");
            this.acceptEula = builder.acceptEula;
            this.environment = builder.environment;
            this.instanceCount = builder.instanceCount;
            this.instanceType = builder.instanceType;
            this.role = builder.role;
            this.startupHealthCheckTimeoutInSeconds = builder.startupHealthCheckTimeoutInSeconds;
            this.vpcConfig = builder.vpcConfig;
        }

        @Override
        public final java.lang.String getEndpointName() {
            return this.endpointName;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.JumpStartModel getModel() {
            return this.model;
        }

        @Override
        public final java.lang.Boolean getAcceptEula() {
            return this.acceptEula;
        }

        @Override
        public final java.util.Map getEnvironment() {
            return this.environment;
        }

        @Override
        public final java.lang.Number getInstanceCount() {
            return this.instanceCount;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.SageMakerInstanceType getInstanceType() {
            return this.instanceType;
        }

        @Override
        public final software.amazon.awscdk.services.iam.Role getRole() {
            return this.role;
        }

        @Override
        public final java.lang.Number getStartupHealthCheckTimeoutInSeconds() {
            return this.startupHealthCheckTimeoutInSeconds;
        }

        @Override
        public final software.amazon.awscdk.services.sagemaker.CfnModel.VpcConfigProperty getVpcConfig() {
            return this.vpcConfig;
        }

        @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("endpointName", om.valueToTree(this.getEndpointName()));
            data.set("model", om.valueToTree(this.getModel()));
            if (this.getAcceptEula() != null) {
                data.set("acceptEula", om.valueToTree(this.getAcceptEula()));
            }
            if (this.getEnvironment() != null) {
                data.set("environment", om.valueToTree(this.getEnvironment()));
            }
            if (this.getInstanceCount() != null) {
                data.set("instanceCount", om.valueToTree(this.getInstanceCount()));
            }
            if (this.getInstanceType() != null) {
                data.set("instanceType", om.valueToTree(this.getInstanceType()));
            }
            if (this.getRole() != null) {
                data.set("role", om.valueToTree(this.getRole()));
            }
            if (this.getStartupHealthCheckTimeoutInSeconds() != null) {
                data.set("startupHealthCheckTimeoutInSeconds", om.valueToTree(this.getStartupHealthCheckTimeoutInSeconds()));
            }
            if (this.getVpcConfig() != null) {
                data.set("vpcConfig", om.valueToTree(this.getVpcConfig()));
            }

            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.JumpStartSageMakerEndpointProps"));
            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;

            JumpStartSageMakerEndpointProps.Jsii$Proxy that = (JumpStartSageMakerEndpointProps.Jsii$Proxy) o;

            if (!endpointName.equals(that.endpointName)) return false;
            if (!model.equals(that.model)) return false;
            if (this.acceptEula != null ? !this.acceptEula.equals(that.acceptEula) : that.acceptEula != null) return false;
            if (this.environment != null ? !this.environment.equals(that.environment) : that.environment != null) return false;
            if (this.instanceCount != null ? !this.instanceCount.equals(that.instanceCount) : that.instanceCount != null) return false;
            if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false;
            if (this.role != null ? !this.role.equals(that.role) : that.role != null) return false;
            if (this.startupHealthCheckTimeoutInSeconds != null ? !this.startupHealthCheckTimeoutInSeconds.equals(that.startupHealthCheckTimeoutInSeconds) : that.startupHealthCheckTimeoutInSeconds != null) return false;
            return this.vpcConfig != null ? this.vpcConfig.equals(that.vpcConfig) : that.vpcConfig == null;
        }

        @Override
        public final int hashCode() {
            int result = this.endpointName.hashCode();
            result = 31 * result + (this.model.hashCode());
            result = 31 * result + (this.acceptEula != null ? this.acceptEula.hashCode() : 0);
            result = 31 * result + (this.environment != null ? this.environment.hashCode() : 0);
            result = 31 * result + (this.instanceCount != null ? this.instanceCount.hashCode() : 0);
            result = 31 * result + (this.instanceType != null ? this.instanceType.hashCode() : 0);
            result = 31 * result + (this.role != null ? this.role.hashCode() : 0);
            result = 31 * result + (this.startupHealthCheckTimeoutInSeconds != null ? this.startupHealthCheckTimeoutInSeconds.hashCode() : 0);
            result = 31 * result + (this.vpcConfig != null ? this.vpcConfig.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy