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

io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ContentPolicyConfigProps Maven / Gradle / Ivy

Go to download

AWS Generative AI CDK Constructs is a library for well-architected generative AI patterns.

The newest version!
package io.github.cdklabs.generative_ai_cdk_constructs.bedrock;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-01T15:41:28.690Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.ContentPolicyConfigProps")
@software.amazon.jsii.Jsii.Proxy(ContentPolicyConfigProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ContentPolicyConfigProps extends software.amazon.jsii.JsiiSerializable {

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

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

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

    /**
     * @return a {@link Builder} of {@link ContentPolicyConfigProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link ContentPolicyConfigProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigType filtersConfigType;
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength inputStrength;
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength outputStrength;

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

        /**
         * Sets the value of {@link ContentPolicyConfigProps#getInputStrength}
         * @param inputStrength the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder inputStrength(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength inputStrength) {
            this.inputStrength = inputStrength;
            return this;
        }

        /**
         * Sets the value of {@link ContentPolicyConfigProps#getOutputStrength}
         * @param outputStrength the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder outputStrength(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength outputStrength) {
            this.outputStrength = outputStrength;
            return this;
        }

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

    /**
     * An implementation for {@link ContentPolicyConfigProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ContentPolicyConfigProps {
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigType filtersConfigType;
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength inputStrength;
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength outputStrength;

        /**
         * 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.filtersConfigType = software.amazon.jsii.Kernel.get(this, "filtersConfigType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigType.class));
            this.inputStrength = software.amazon.jsii.Kernel.get(this, "inputStrength", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength.class));
            this.outputStrength = software.amazon.jsii.Kernel.get(this, "outputStrength", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength.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.filtersConfigType = java.util.Objects.requireNonNull(builder.filtersConfigType, "filtersConfigType is required");
            this.inputStrength = builder.inputStrength;
            this.outputStrength = builder.outputStrength;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigType getFiltersConfigType() {
            return this.filtersConfigType;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength getInputStrength() {
            return this.inputStrength;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.FiltersConfigStrength getOutputStrength() {
            return this.outputStrength;
        }

        @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("filtersConfigType", om.valueToTree(this.getFiltersConfigType()));
            if (this.getInputStrength() != null) {
                data.set("inputStrength", om.valueToTree(this.getInputStrength()));
            }
            if (this.getOutputStrength() != null) {
                data.set("outputStrength", om.valueToTree(this.getOutputStrength()));
            }

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

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

            if (!filtersConfigType.equals(that.filtersConfigType)) return false;
            if (this.inputStrength != null ? !this.inputStrength.equals(that.inputStrength) : that.inputStrength != null) return false;
            return this.outputStrength != null ? this.outputStrength.equals(that.outputStrength) : that.outputStrength == null;
        }

        @Override
        public final int hashCode() {
            int result = this.filtersConfigType.hashCode();
            result = 31 * result + (this.inputStrength != null ? this.inputStrength.hashCode() : 0);
            result = 31 * result + (this.outputStrength != null ? this.outputStrength.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy