@Generated(value="software.amazon.awssdk:codegen") public final class DetectEntitiesResponse extends ComprehendResponse implements ToCopyableBuilder<DetectEntitiesResponse.Builder,DetectEntitiesResponse>
| Modifier and Type | Class and Description |
|---|---|
static interface |
DetectEntitiesResponse.Builder |
| Modifier and Type | Method and Description |
|---|---|
List<Block> |
blocks()
Information about each block of text in the input document.
|
static DetectEntitiesResponse.Builder |
builder() |
DocumentMetadata |
documentMetadata()
Information about the document, discovered during text extraction.
|
List<DocumentTypeListItem> |
documentType()
The document type for each page in the input document.
|
List<Entity> |
entities()
A collection of entities identified in the input text.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
List<ErrorsListItem> |
errors()
Page-level errors that the system detected while processing the input document.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasBlocks()
For responses, this returns true if the service returned a value for the Blocks property.
|
boolean |
hasDocumentType()
For responses, this returns true if the service returned a value for the DocumentType property.
|
boolean |
hasEntities()
For responses, this returns true if the service returned a value for the Entities property.
|
boolean |
hasErrors()
For responses, this returns true if the service returned a value for the Errors property.
|
int |
hashCode() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends DetectEntitiesResponse.Builder> |
serializableBuilderClass() |
DetectEntitiesResponse.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
responseMetadatasdkHttpResponseclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final boolean hasEntities()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Entity> entities()
A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.
If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see Entities in the Comprehend Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasEntities() method.
If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see Entities in the Comprehend Developer Guide.
public final DocumentMetadata documentMetadata()
Information about the document, discovered during text extraction. This field is present in the response only if
your request used the Byte parameter.
Byte parameter.public final boolean hasDocumentType()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<DocumentTypeListItem> documentType()
The document type for each page in the input document. This field is present in the response only if your request
used the Byte parameter.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasDocumentType() method.
Byte parameter.public final boolean hasBlocks()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Block> blocks()
Information about each block of text in the input document. Blocks are nested. A page block contains a block for each line of text, which contains a block for each word.
The Block content for a Word input document does not include a Geometry field.
The Block field is not present in the response for plain-text inputs.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasBlocks() method.
The Block content for a Word input document does not include a Geometry field.
The Block field is not present in the response for plain-text inputs.
public final boolean hasErrors()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<ErrorsListItem> errors()
Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasErrors() method.
public DetectEntitiesResponse.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<DetectEntitiesResponse.Builder,DetectEntitiesResponse>toBuilder in class AwsResponsepublic static DetectEntitiesResponse.Builder builder()
public static Class<? extends DetectEntitiesResponse.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsResponsepublic final boolean equals(Object obj)
equals in class AwsResponsepublic final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkResponseCopyright © 2023. All rights reserved.