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

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

package io.github.cdklabs.generative_ai_cdk_constructs.bedrock;

/**
 * (experimental) Interface to create a new standalone data source object.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-07T16:14:00.750Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.SharePointDataSourceProps")
@software.amazon.jsii.Jsii.Proxy(SharePointDataSourceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SharePointDataSourceProps extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.generative_ai_cdk_constructs.bedrock.SharePointDataSourceAssociationProps {

    /**
     * (experimental) The knowledge base to associate with the data source.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull io.github.cdklabs.generative_ai_cdk_constructs.bedrock.IKnowledgeBase getKnowledgeBase();

    /**
     * @return a {@link Builder} of {@link SharePointDataSourceProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link SharePointDataSourceProps}
     */
    @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.IKnowledgeBase knowledgeBase;
        software.amazon.awscdk.services.secretsmanager.ISecret authSecret;
        java.lang.String domain;
        java.util.List siteUrls;
        java.lang.String tenantId;
        java.util.List filters;
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ChunkingStrategy chunkingStrategy;
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.CustomTransformation customTransformation;
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.DataDeletionPolicy dataDeletionPolicy;
        java.lang.String dataSourceName;
        java.lang.String description;
        software.amazon.awscdk.services.kms.IKey kmsKey;
        io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ParsingStategy parsingStrategy;

        /**
         * Sets the value of {@link SharePointDataSourceProps#getKnowledgeBase}
         * @param knowledgeBase The knowledge base to associate with the data source. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder knowledgeBase(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.IKnowledgeBase knowledgeBase) {
            this.knowledgeBase = knowledgeBase;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getAuthSecret}
         * @param authSecret The AWS Secrets Manager secret that stores your authentication credentials for your Sharepoint instance URL. This parameter is required.
         *                   Secret must start with "AmazonBedrock-".
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder authSecret(software.amazon.awscdk.services.secretsmanager.ISecret authSecret) {
            this.authSecret = authSecret;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getDomain}
         * @param domain The domain of your SharePoint instance or site URL/URLs. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder domain(java.lang.String domain) {
            this.domain = domain;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getSiteUrls}
         * @param siteUrls The SharePoint site URL/URLs. This parameter is required.
         *                 Must start with “https”. All URLs must start with same protocol.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder siteUrls(java.util.List siteUrls) {
            this.siteUrls = siteUrls;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getTenantId}
         * @param tenantId The identifier of your Microsoft 365 tenant. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder tenantId(java.lang.String tenantId) {
            this.tenantId = tenantId;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getFilters}
         * @param filters The filters (regular expression patterns) for the crawling.
         *                If there's a conflict, the exclude pattern takes precedence.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @SuppressWarnings("unchecked")
        public Builder filters(java.util.List filters) {
            this.filters = (java.util.List)filters;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getChunkingStrategy}
         * @param chunkingStrategy The chunking stategy to use for splitting your documents or content.
         *                         The chunks are then converted to embeddings and written to the vector
         *                         index allowing for similarity search and retrieval of the content.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder chunkingStrategy(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ChunkingStrategy chunkingStrategy) {
            this.chunkingStrategy = chunkingStrategy;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getCustomTransformation}
         * @param customTransformation The custom transformation strategy to use.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder customTransformation(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.CustomTransformation customTransformation) {
            this.customTransformation = customTransformation;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getDataDeletionPolicy}
         * @param dataDeletionPolicy The data deletion policy to apply to the data source.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder dataDeletionPolicy(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.DataDeletionPolicy dataDeletionPolicy) {
            this.dataDeletionPolicy = dataDeletionPolicy;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getDataSourceName}
         * @param dataSourceName The name of the data source.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder dataSourceName(java.lang.String dataSourceName) {
            this.dataSourceName = dataSourceName;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getDescription}
         * @param description A description of the data source.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder description(java.lang.String description) {
            this.description = description;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getKmsKey}
         * @param kmsKey The KMS key to use to encrypt the data source.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder kmsKey(software.amazon.awscdk.services.kms.IKey kmsKey) {
            this.kmsKey = kmsKey;
            return this;
        }

        /**
         * Sets the value of {@link SharePointDataSourceProps#getParsingStrategy}
         * @param parsingStrategy The parsing strategy to use.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder parsingStrategy(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ParsingStategy parsingStrategy) {
            this.parsingStrategy = parsingStrategy;
            return this;
        }

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

    /**
     * An implementation for {@link SharePointDataSourceProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SharePointDataSourceProps {
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.IKnowledgeBase knowledgeBase;
        private final software.amazon.awscdk.services.secretsmanager.ISecret authSecret;
        private final java.lang.String domain;
        private final java.util.List siteUrls;
        private final java.lang.String tenantId;
        private final java.util.List filters;
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ChunkingStrategy chunkingStrategy;
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.CustomTransformation customTransformation;
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.DataDeletionPolicy dataDeletionPolicy;
        private final java.lang.String dataSourceName;
        private final java.lang.String description;
        private final software.amazon.awscdk.services.kms.IKey kmsKey;
        private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ParsingStategy parsingStrategy;

        /**
         * 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.knowledgeBase = software.amazon.jsii.Kernel.get(this, "knowledgeBase", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.IKnowledgeBase.class));
            this.authSecret = software.amazon.jsii.Kernel.get(this, "authSecret", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.ISecret.class));
            this.domain = software.amazon.jsii.Kernel.get(this, "domain", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.siteUrls = software.amazon.jsii.Kernel.get(this, "siteUrls", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
            this.tenantId = software.amazon.jsii.Kernel.get(this, "tenantId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.filters = software.amazon.jsii.Kernel.get(this, "filters", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.SharePointCrawlingFilters.class)));
            this.chunkingStrategy = software.amazon.jsii.Kernel.get(this, "chunkingStrategy", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ChunkingStrategy.class));
            this.customTransformation = software.amazon.jsii.Kernel.get(this, "customTransformation", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.CustomTransformation.class));
            this.dataDeletionPolicy = software.amazon.jsii.Kernel.get(this, "dataDeletionPolicy", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.DataDeletionPolicy.class));
            this.dataSourceName = software.amazon.jsii.Kernel.get(this, "dataSourceName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.kmsKey = software.amazon.jsii.Kernel.get(this, "kmsKey", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.kms.IKey.class));
            this.parsingStrategy = software.amazon.jsii.Kernel.get(this, "parsingStrategy", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ParsingStategy.class));
        }

        /**
         * Constructor that initializes the object based on literal property values passed by the {@link Builder}.
         */
        @SuppressWarnings("unchecked")
        protected Jsii$Proxy(final Builder builder) {
            super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.knowledgeBase = java.util.Objects.requireNonNull(builder.knowledgeBase, "knowledgeBase is required");
            this.authSecret = java.util.Objects.requireNonNull(builder.authSecret, "authSecret is required");
            this.domain = java.util.Objects.requireNonNull(builder.domain, "domain is required");
            this.siteUrls = java.util.Objects.requireNonNull(builder.siteUrls, "siteUrls is required");
            this.tenantId = java.util.Objects.requireNonNull(builder.tenantId, "tenantId is required");
            this.filters = (java.util.List)builder.filters;
            this.chunkingStrategy = builder.chunkingStrategy;
            this.customTransformation = builder.customTransformation;
            this.dataDeletionPolicy = builder.dataDeletionPolicy;
            this.dataSourceName = builder.dataSourceName;
            this.description = builder.description;
            this.kmsKey = builder.kmsKey;
            this.parsingStrategy = builder.parsingStrategy;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.IKnowledgeBase getKnowledgeBase() {
            return this.knowledgeBase;
        }

        @Override
        public final software.amazon.awscdk.services.secretsmanager.ISecret getAuthSecret() {
            return this.authSecret;
        }

        @Override
        public final java.lang.String getDomain() {
            return this.domain;
        }

        @Override
        public final java.util.List getSiteUrls() {
            return this.siteUrls;
        }

        @Override
        public final java.lang.String getTenantId() {
            return this.tenantId;
        }

        @Override
        public final java.util.List getFilters() {
            return this.filters;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ChunkingStrategy getChunkingStrategy() {
            return this.chunkingStrategy;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.CustomTransformation getCustomTransformation() {
            return this.customTransformation;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.DataDeletionPolicy getDataDeletionPolicy() {
            return this.dataDeletionPolicy;
        }

        @Override
        public final java.lang.String getDataSourceName() {
            return this.dataSourceName;
        }

        @Override
        public final java.lang.String getDescription() {
            return this.description;
        }

        @Override
        public final software.amazon.awscdk.services.kms.IKey getKmsKey() {
            return this.kmsKey;
        }

        @Override
        public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ParsingStategy getParsingStrategy() {
            return this.parsingStrategy;
        }

        @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("knowledgeBase", om.valueToTree(this.getKnowledgeBase()));
            data.set("authSecret", om.valueToTree(this.getAuthSecret()));
            data.set("domain", om.valueToTree(this.getDomain()));
            data.set("siteUrls", om.valueToTree(this.getSiteUrls()));
            data.set("tenantId", om.valueToTree(this.getTenantId()));
            if (this.getFilters() != null) {
                data.set("filters", om.valueToTree(this.getFilters()));
            }
            if (this.getChunkingStrategy() != null) {
                data.set("chunkingStrategy", om.valueToTree(this.getChunkingStrategy()));
            }
            if (this.getCustomTransformation() != null) {
                data.set("customTransformation", om.valueToTree(this.getCustomTransformation()));
            }
            if (this.getDataDeletionPolicy() != null) {
                data.set("dataDeletionPolicy", om.valueToTree(this.getDataDeletionPolicy()));
            }
            if (this.getDataSourceName() != null) {
                data.set("dataSourceName", om.valueToTree(this.getDataSourceName()));
            }
            if (this.getDescription() != null) {
                data.set("description", om.valueToTree(this.getDescription()));
            }
            if (this.getKmsKey() != null) {
                data.set("kmsKey", om.valueToTree(this.getKmsKey()));
            }
            if (this.getParsingStrategy() != null) {
                data.set("parsingStrategy", om.valueToTree(this.getParsingStrategy()));
            }

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

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

            if (!knowledgeBase.equals(that.knowledgeBase)) return false;
            if (!authSecret.equals(that.authSecret)) return false;
            if (!domain.equals(that.domain)) return false;
            if (!siteUrls.equals(that.siteUrls)) return false;
            if (!tenantId.equals(that.tenantId)) return false;
            if (this.filters != null ? !this.filters.equals(that.filters) : that.filters != null) return false;
            if (this.chunkingStrategy != null ? !this.chunkingStrategy.equals(that.chunkingStrategy) : that.chunkingStrategy != null) return false;
            if (this.customTransformation != null ? !this.customTransformation.equals(that.customTransformation) : that.customTransformation != null) return false;
            if (this.dataDeletionPolicy != null ? !this.dataDeletionPolicy.equals(that.dataDeletionPolicy) : that.dataDeletionPolicy != null) return false;
            if (this.dataSourceName != null ? !this.dataSourceName.equals(that.dataSourceName) : that.dataSourceName != null) return false;
            if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
            if (this.kmsKey != null ? !this.kmsKey.equals(that.kmsKey) : that.kmsKey != null) return false;
            return this.parsingStrategy != null ? this.parsingStrategy.equals(that.parsingStrategy) : that.parsingStrategy == null;
        }

        @Override
        public final int hashCode() {
            int result = this.knowledgeBase.hashCode();
            result = 31 * result + (this.authSecret.hashCode());
            result = 31 * result + (this.domain.hashCode());
            result = 31 * result + (this.siteUrls.hashCode());
            result = 31 * result + (this.tenantId.hashCode());
            result = 31 * result + (this.filters != null ? this.filters.hashCode() : 0);
            result = 31 * result + (this.chunkingStrategy != null ? this.chunkingStrategy.hashCode() : 0);
            result = 31 * result + (this.customTransformation != null ? this.customTransformation.hashCode() : 0);
            result = 31 * result + (this.dataDeletionPolicy != null ? this.dataDeletionPolicy.hashCode() : 0);
            result = 31 * result + (this.dataSourceName != null ? this.dataSourceName.hashCode() : 0);
            result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
            result = 31 * result + (this.kmsKey != null ? this.kmsKey.hashCode() : 0);
            result = 31 * result + (this.parsingStrategy != null ? this.parsingStrategy.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy