Interface Document.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Document.Builder,Document>,SdkBuilder<Document.Builder,Document>,SdkPojo
- Enclosing class:
- Document
public static interface Document.Builder extends SdkPojo, CopyableBuilder<Document.Builder,Document>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Document.BuilderaccessControlConfigurationId(String accessControlConfigurationId)The identifier of the access control configuration that you want to apply to the document.Document.BuilderaccessControlList(Collection<Principal> accessControlList)Information on principals (users and/or groups) and which documents they should have access to.Document.BuilderaccessControlList(Consumer<Principal.Builder>... accessControlList)Information on principals (users and/or groups) and which documents they should have access to.Document.BuilderaccessControlList(Principal... accessControlList)Information on principals (users and/or groups) and which documents they should have access to.Document.Builderattributes(Collection<DocumentAttribute> attributes)Custom attributes to apply to the document.Document.Builderattributes(Consumer<DocumentAttribute.Builder>... attributes)Custom attributes to apply to the document.Document.Builderattributes(DocumentAttribute... attributes)Custom attributes to apply to the document.Document.Builderblob(SdkBytes blob)The contents of the document.Document.BuildercontentType(String contentType)The file type of the document in theBlobfield.Document.BuildercontentType(ContentType contentType)The file type of the document in theBlobfield.Document.BuilderhierarchicalAccessControlList(Collection<HierarchicalPrincipal> hierarchicalAccessControlList)The list of principal lists that define the hierarchy for which documents users should have access to.Document.BuilderhierarchicalAccessControlList(Consumer<HierarchicalPrincipal.Builder>... hierarchicalAccessControlList)The list of principal lists that define the hierarchy for which documents users should have access to.Document.BuilderhierarchicalAccessControlList(HierarchicalPrincipal... hierarchicalAccessControlList)The list of principal lists that define the hierarchy for which documents users should have access to.Document.Builderid(String id)A identifier of the document in the index.default Document.Builders3Path(Consumer<S3Path.Builder> s3Path)Sets the value of the S3Path property for this object.Document.Builders3Path(S3Path s3Path)Sets the value of the S3Path property for this object.Document.Buildertitle(String title)The title of the document.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
id
Document.Builder id(String id)
A identifier of the document in the index.
Note, each document ID must be unique per index. You cannot create a data source to index your documents with their unique IDs and then use the
BatchPutDocumentAPI to index the same documents, or vice versa. You can delete a data source and then use theBatchPutDocumentAPI to index the same documents, or vice versa.- Parameters:
id- A identifier of the document in the index.Note, each document ID must be unique per index. You cannot create a data source to index your documents with their unique IDs and then use the
BatchPutDocumentAPI to index the same documents, or vice versa. You can delete a data source and then use theBatchPutDocumentAPI to index the same documents, or vice versa.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
title
Document.Builder title(String title)
The title of the document.
- Parameters:
title- The title of the document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blob
Document.Builder blob(SdkBytes blob)
The contents of the document.
Documents passed to the
Blobparameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.- Parameters:
blob- The contents of the document.Documents passed to the
Blobparameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Kendra APIs. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
s3Path
Document.Builder s3Path(S3Path s3Path)
Sets the value of the S3Path property for this object.- Parameters:
s3Path- The new value for the S3Path property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
s3Path
default Document.Builder s3Path(Consumer<S3Path.Builder> s3Path)
Sets the value of the S3Path property for this object. This is a convenience method that creates an instance of theS3Path.Builderavoiding the need to create one manually viaS3Path.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tos3Path(S3Path).- Parameters:
s3Path- a consumer that will call methods onS3Path.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
s3Path(S3Path)
-
attributes
Document.Builder attributes(Collection<DocumentAttribute> attributes)
Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.
For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.
- Parameters:
attributes- Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
attributes
Document.Builder attributes(DocumentAttribute... attributes)
Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.
For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.
- Parameters:
attributes- Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
attributes
Document.Builder attributes(Consumer<DocumentAttribute.Builder>... attributes)
Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.
For example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that provide information on the synchronization of documents running on a data source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as Amazon Kendra will use the ID of a running sync job.
This is a convenience method that creates an instance of theDocumentAttribute.Builderavoiding the need to create one manually viaDocumentAttribute.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#attributes(List.) - Parameters:
attributes- a consumer that will call methods onDocumentAttribute.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#attributes(java.util.Collection)
-
accessControlList
Document.Builder accessControlList(Collection<Principal> accessControlList)
Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
- Parameters:
accessControlList- Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accessControlList
Document.Builder accessControlList(Principal... accessControlList)
Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
- Parameters:
accessControlList- Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accessControlList
Document.Builder accessControlList(Consumer<Principal.Builder>... accessControlList)
Information on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
This is a convenience method that creates an instance of thePrincipal.Builderavoiding the need to create one manually viaPrincipal.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#accessControlList(List.) - Parameters:
accessControlList- a consumer that will call methods onPrincipal.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#accessControlList(java.util.Collection)
-
hierarchicalAccessControlList
Document.Builder hierarchicalAccessControlList(Collection<HierarchicalPrincipal> hierarchicalAccessControlList)
The list of principal lists that define the hierarchy for which documents users should have access to.
- Parameters:
hierarchicalAccessControlList- The list of principal lists that define the hierarchy for which documents users should have access to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
hierarchicalAccessControlList
Document.Builder hierarchicalAccessControlList(HierarchicalPrincipal... hierarchicalAccessControlList)
The list of principal lists that define the hierarchy for which documents users should have access to.
- Parameters:
hierarchicalAccessControlList- The list of principal lists that define the hierarchy for which documents users should have access to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
hierarchicalAccessControlList
Document.Builder hierarchicalAccessControlList(Consumer<HierarchicalPrincipal.Builder>... hierarchicalAccessControlList)
The list of principal lists that define the hierarchy for which documents users should have access to.
This is a convenience method that creates an instance of theHierarchicalPrincipal.Builderavoiding the need to create one manually viaHierarchicalPrincipal.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#hierarchicalAccessControlList(List.) - Parameters:
hierarchicalAccessControlList- a consumer that will call methods onHierarchicalPrincipal.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#hierarchicalAccessControlList(java.util.Collection)
-
contentType
Document.Builder contentType(String contentType)
The file type of the document in the
Blobfield.If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the
HTMLstart and closing tags (<HTML>content</HTML>) around the content.- Parameters:
contentType- The file type of the document in theBlobfield.If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the
HTMLstart and closing tags (<HTML>content</HTML>) around the content.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ContentType,ContentType
-
contentType
Document.Builder contentType(ContentType contentType)
The file type of the document in the
Blobfield.If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the
HTMLstart and closing tags (<HTML>content</HTML>) around the content.- Parameters:
contentType- The file type of the document in theBlobfield.If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you must add the
HTMLstart and closing tags (<HTML>content</HTML>) around the content.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ContentType,ContentType
-
accessControlConfigurationId
Document.Builder accessControlConfigurationId(String accessControlConfigurationId)
The identifier of the access control configuration that you want to apply to the document.
- Parameters:
accessControlConfigurationId- The identifier of the access control configuration that you want to apply to the document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-