/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Rekognition { namespace Model { /** *

Information about a word or line of text detected by DetectText.

*

The DetectedText field contains the text that Amazon Rekognition * detected in the image.

Every word and line has an identifier * (Id). Each word belongs to a line and has a parent identifier * (ParentId) that identifies the line of text in which the word * appears. The word Id is also an index for the word within a line of * words.

For more information, see Detecting text in the Amazon * Rekognition Developer Guide.

See Also:

AWS * API Reference

*/ class TextDetection { public: AWS_REKOGNITION_API TextDetection(); AWS_REKOGNITION_API TextDetection(Aws::Utils::Json::JsonView jsonValue); AWS_REKOGNITION_API TextDetection& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_REKOGNITION_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline const Aws::String& GetDetectedText() const{ return m_detectedText; } /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline bool DetectedTextHasBeenSet() const { return m_detectedTextHasBeenSet; } /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline void SetDetectedText(const Aws::String& value) { m_detectedTextHasBeenSet = true; m_detectedText = value; } /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline void SetDetectedText(Aws::String&& value) { m_detectedTextHasBeenSet = true; m_detectedText = std::move(value); } /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline void SetDetectedText(const char* value) { m_detectedTextHasBeenSet = true; m_detectedText.assign(value); } /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline TextDetection& WithDetectedText(const Aws::String& value) { SetDetectedText(value); return *this;} /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline TextDetection& WithDetectedText(Aws::String&& value) { SetDetectedText(std::move(value)); return *this;} /** *

The word or line of text recognized by Amazon Rekognition.

*/ inline TextDetection& WithDetectedText(const char* value) { SetDetectedText(value); return *this;} /** *

The type of text that was detected.

*/ inline const TextTypes& GetType() const{ return m_type; } /** *

The type of text that was detected.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of text that was detected.

*/ inline void SetType(const TextTypes& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of text that was detected.

*/ inline void SetType(TextTypes&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of text that was detected.

*/ inline TextDetection& WithType(const TextTypes& value) { SetType(value); return *this;} /** *

The type of text that was detected.

*/ inline TextDetection& WithType(TextTypes&& value) { SetType(std::move(value)); return *this;} /** *

The identifier for the detected text. The identifier is only unique for a * single call to DetectText.

*/ inline int GetId() const{ return m_id; } /** *

The identifier for the detected text. The identifier is only unique for a * single call to DetectText.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The identifier for the detected text. The identifier is only unique for a * single call to DetectText.

*/ inline void SetId(int value) { m_idHasBeenSet = true; m_id = value; } /** *

The identifier for the detected text. The identifier is only unique for a * single call to DetectText.

*/ inline TextDetection& WithId(int value) { SetId(value); return *this;} /** *

The Parent identifier for the detected text identified by the value of * ID. If the type of detected text is LINE, the value of * ParentId is Null.

*/ inline int GetParentId() const{ return m_parentId; } /** *

The Parent identifier for the detected text identified by the value of * ID. If the type of detected text is LINE, the value of * ParentId is Null.

*/ inline bool ParentIdHasBeenSet() const { return m_parentIdHasBeenSet; } /** *

The Parent identifier for the detected text identified by the value of * ID. If the type of detected text is LINE, the value of * ParentId is Null.

*/ inline void SetParentId(int value) { m_parentIdHasBeenSet = true; m_parentId = value; } /** *

The Parent identifier for the detected text identified by the value of * ID. If the type of detected text is LINE, the value of * ParentId is Null.

*/ inline TextDetection& WithParentId(int value) { SetParentId(value); return *this;} /** *

The confidence that Amazon Rekognition has in the accuracy of the detected * text and the accuracy of the geometry points around the detected text.

*/ inline double GetConfidence() const{ return m_confidence; } /** *

The confidence that Amazon Rekognition has in the accuracy of the detected * text and the accuracy of the geometry points around the detected text.

*/ inline bool ConfidenceHasBeenSet() const { return m_confidenceHasBeenSet; } /** *

The confidence that Amazon Rekognition has in the accuracy of the detected * text and the accuracy of the geometry points around the detected text.

*/ inline void SetConfidence(double value) { m_confidenceHasBeenSet = true; m_confidence = value; } /** *

The confidence that Amazon Rekognition has in the accuracy of the detected * text and the accuracy of the geometry points around the detected text.

*/ inline TextDetection& WithConfidence(double value) { SetConfidence(value); return *this;} /** *

The location of the detected text on the image. Includes an axis aligned * coarse bounding box surrounding the text and a finer grain polygon for more * accurate spatial information.

*/ inline const Geometry& GetGeometry() const{ return m_geometry; } /** *

The location of the detected text on the image. Includes an axis aligned * coarse bounding box surrounding the text and a finer grain polygon for more * accurate spatial information.

*/ inline bool GeometryHasBeenSet() const { return m_geometryHasBeenSet; } /** *

The location of the detected text on the image. Includes an axis aligned * coarse bounding box surrounding the text and a finer grain polygon for more * accurate spatial information.

*/ inline void SetGeometry(const Geometry& value) { m_geometryHasBeenSet = true; m_geometry = value; } /** *

The location of the detected text on the image. Includes an axis aligned * coarse bounding box surrounding the text and a finer grain polygon for more * accurate spatial information.

*/ inline void SetGeometry(Geometry&& value) { m_geometryHasBeenSet = true; m_geometry = std::move(value); } /** *

The location of the detected text on the image. Includes an axis aligned * coarse bounding box surrounding the text and a finer grain polygon for more * accurate spatial information.

*/ inline TextDetection& WithGeometry(const Geometry& value) { SetGeometry(value); return *this;} /** *

The location of the detected text on the image. Includes an axis aligned * coarse bounding box surrounding the text and a finer grain polygon for more * accurate spatial information.

*/ inline TextDetection& WithGeometry(Geometry&& value) { SetGeometry(std::move(value)); return *this;} private: Aws::String m_detectedText; bool m_detectedTextHasBeenSet = false; TextTypes m_type; bool m_typeHasBeenSet = false; int m_id; bool m_idHasBeenSet = false; int m_parentId; bool m_parentIdHasBeenSet = false; double m_confidence; bool m_confidenceHasBeenSet = false; Geometry m_geometry; bool m_geometryHasBeenSet = false; }; } // namespace Model } // namespace Rekognition } // namespace Aws