@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Document extends Object implements Serializable, Cloneable, StructuredPojo
A document in an index.
Constructor and Description |
---|
Document() |
Modifier and Type | Method and Description |
---|---|
Document |
clone() |
boolean |
equals(Object obj) |
List<Principal> |
getAccessControlList()
Information to use for user context filtering.
|
List<DocumentAttribute> |
getAttributes()
Custom attributes to apply to the document.
|
ByteBuffer |
getBlob()
The contents of the document.
|
String |
getContentType()
The file type of the document in the
Blob field. |
String |
getId()
A unique identifier of the document in the index.
|
S3Path |
getS3Path() |
String |
getTitle()
The title of the document.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAccessControlList(Collection<Principal> accessControlList)
Information to use for user context filtering.
|
void |
setAttributes(Collection<DocumentAttribute> attributes)
Custom attributes to apply to the document.
|
void |
setBlob(ByteBuffer blob)
The contents of the document.
|
void |
setContentType(String contentType)
The file type of the document in the
Blob field. |
void |
setId(String id)
A unique identifier of the document in the index.
|
void |
setS3Path(S3Path s3Path) |
void |
setTitle(String title)
The title of the document.
|
String |
toString()
Returns a string representation of this object.
|
Document |
withAccessControlList(Collection<Principal> accessControlList)
Information to use for user context filtering.
|
Document |
withAccessControlList(Principal... accessControlList)
Information to use for user context filtering.
|
Document |
withAttributes(Collection<DocumentAttribute> attributes)
Custom attributes to apply to the document.
|
Document |
withAttributes(DocumentAttribute... attributes)
Custom attributes to apply to the document.
|
Document |
withBlob(ByteBuffer blob)
The contents of the document.
|
Document |
withContentType(ContentType contentType)
The file type of the document in the
Blob field. |
Document |
withContentType(String contentType)
The file type of the document in the
Blob field. |
Document |
withId(String id)
A unique identifier of the document in the index.
|
Document |
withS3Path(S3Path s3Path) |
Document |
withTitle(String title)
The title of the document.
|
public void setId(String id)
A unique identifier of the document in the index.
id
- A unique identifier of the document in the index.public String getId()
A unique identifier of the document in the index.
public Document withId(String id)
A unique identifier of the document in the index.
id
- A unique identifier of the document in the index.public void setTitle(String title)
The title of the document.
title
- The title of the document.public String getTitle()
The title of the document.
public Document withTitle(String title)
The title of the document.
title
- The title of the document.public void setBlob(ByteBuffer blob)
The contents of the document.
Documents passed to the Blob
parameter must be base64 encoded. Your code might not need to encode
the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are calling the
Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
blob
- The contents of the document.
Documents passed to the Blob
parameter must be base64 encoded. Your code might not need to
encode the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are
calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before
sending.
public ByteBuffer getBlob()
The contents of the document.
Documents passed to the Blob
parameter must be base64 encoded. Your code might not need to encode
the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are calling the
Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
Documents passed to the Blob
parameter must be base64 encoded. Your code might not need to
encode the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are
calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before
sending.
public Document withBlob(ByteBuffer blob)
The contents of the document.
Documents passed to the Blob
parameter must be base64 encoded. Your code might not need to encode
the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are calling the
Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
blob
- The contents of the document.
Documents passed to the Blob
parameter must be base64 encoded. Your code might not need to
encode the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are
calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before
sending.
public void setS3Path(S3Path s3Path)
s3Path
- public S3Path getS3Path()
public Document withS3Path(S3Path s3Path)
s3Path
- public List<DocumentAttribute> getAttributes()
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.
public void setAttributes(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.
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.public Document withAttributes(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.
NOTE: This method appends the values to the existing list (if any). Use
setAttributes(java.util.Collection)
or withAttributes(java.util.Collection)
if you want to
override the existing values.
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.public Document withAttributes(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.
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.public List<Principal> getAccessControlList()
Information to use for user context filtering.
public void setAccessControlList(Collection<Principal> accessControlList)
Information to use for user context filtering.
accessControlList
- Information to use for user context filtering.public Document withAccessControlList(Principal... accessControlList)
Information to use for user context filtering.
NOTE: This method appends the values to the existing list (if any). Use
setAccessControlList(java.util.Collection)
or withAccessControlList(java.util.Collection)
if
you want to override the existing values.
accessControlList
- Information to use for user context filtering.public Document withAccessControlList(Collection<Principal> accessControlList)
Information to use for user context filtering.
accessControlList
- Information to use for user context filtering.public void setContentType(String contentType)
The file type of the document in the Blob
field.
contentType
- The file type of the document in the Blob
field.ContentType
public String getContentType()
The file type of the document in the Blob
field.
Blob
field.ContentType
public Document withContentType(String contentType)
The file type of the document in the Blob
field.
contentType
- The file type of the document in the Blob
field.ContentType
public Document withContentType(ContentType contentType)
The file type of the document in the Blob
field.
contentType
- The file type of the document in the Blob
field.ContentType
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.