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

Provides information about an entity.

See Also:

AWS * API Reference

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

The level of confidence that Amazon Comprehend has in the accuracy of the * detection.

*/ inline double GetScore() const{ return m_score; } /** *

The level of confidence that Amazon Comprehend has in the accuracy of the * detection.

*/ inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; } /** *

The level of confidence that Amazon Comprehend has in the accuracy of the * detection.

*/ inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; } /** *

The level of confidence that Amazon Comprehend has in the accuracy of the * detection.

*/ inline Entity& WithScore(double value) { SetScore(value); return *this;} /** *

The entity type. For entity detection using the built-in model, this field * contains one of the standard entity types listed below.

For custom entity * detection, this field contains one of the entity types that you specified when * you trained your custom model.

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

The entity type. For entity detection using the built-in model, this field * contains one of the standard entity types listed below.

For custom entity * detection, this field contains one of the entity types that you specified when * you trained your custom model.

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

The entity type. For entity detection using the built-in model, this field * contains one of the standard entity types listed below.

For custom entity * detection, this field contains one of the entity types that you specified when * you trained your custom model.

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

The entity type. For entity detection using the built-in model, this field * contains one of the standard entity types listed below.

For custom entity * detection, this field contains one of the entity types that you specified when * you trained your custom model.

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

The entity type. For entity detection using the built-in model, this field * contains one of the standard entity types listed below.

For custom entity * detection, this field contains one of the entity types that you specified when * you trained your custom model.

*/ inline Entity& WithType(const EntityType& value) { SetType(value); return *this;} /** *

The entity type. For entity detection using the built-in model, this field * contains one of the standard entity types listed below.

For custom entity * detection, this field contains one of the entity types that you specified when * you trained your custom model.

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

The text of the entity.

*/ inline const Aws::String& GetText() const{ return m_text; } /** *

The text of the entity.

*/ inline bool TextHasBeenSet() const { return m_textHasBeenSet; } /** *

The text of the entity.

*/ inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; } /** *

The text of the entity.

*/ inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); } /** *

The text of the entity.

*/ inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); } /** *

The text of the entity.

*/ inline Entity& WithText(const Aws::String& value) { SetText(value); return *this;} /** *

The text of the entity.

*/ inline Entity& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;} /** *

The text of the entity.

*/ inline Entity& WithText(const char* value) { SetText(value); return *this;} /** *

The zero-based offset from the beginning of the source text to the first * character in the entity.

This field is empty for non-text input.

*/ inline int GetBeginOffset() const{ return m_beginOffset; } /** *

The zero-based offset from the beginning of the source text to the first * character in the entity.

This field is empty for non-text input.

*/ inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; } /** *

The zero-based offset from the beginning of the source text to the first * character in the entity.

This field is empty for non-text input.

*/ inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; } /** *

The zero-based offset from the beginning of the source text to the first * character in the entity.

This field is empty for non-text input.

*/ inline Entity& WithBeginOffset(int value) { SetBeginOffset(value); return *this;} /** *

The zero-based offset from the beginning of the source text to the last * character in the entity.

This field is empty for non-text input.

*/ inline int GetEndOffset() const{ return m_endOffset; } /** *

The zero-based offset from the beginning of the source text to the last * character in the entity.

This field is empty for non-text input.

*/ inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; } /** *

The zero-based offset from the beginning of the source text to the last * character in the entity.

This field is empty for non-text input.

*/ inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; } /** *

The zero-based offset from the beginning of the source text to the last * character in the entity.

This field is empty for non-text input.

*/ inline Entity& WithEndOffset(int value) { SetEndOffset(value); return *this;} /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline const Aws::Vector& GetBlockReferences() const{ return m_blockReferences; } /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline bool BlockReferencesHasBeenSet() const { return m_blockReferencesHasBeenSet; } /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline void SetBlockReferences(const Aws::Vector& value) { m_blockReferencesHasBeenSet = true; m_blockReferences = value; } /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline void SetBlockReferences(Aws::Vector&& value) { m_blockReferencesHasBeenSet = true; m_blockReferences = std::move(value); } /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline Entity& WithBlockReferences(const Aws::Vector& value) { SetBlockReferences(value); return *this;} /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline Entity& WithBlockReferences(Aws::Vector&& value) { SetBlockReferences(std::move(value)); return *this;} /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline Entity& AddBlockReferences(const BlockReference& value) { m_blockReferencesHasBeenSet = true; m_blockReferences.push_back(value); return *this; } /** *

A reference to each block for this entity. This field is empty for plain-text * input.

*/ inline Entity& AddBlockReferences(BlockReference&& value) { m_blockReferencesHasBeenSet = true; m_blockReferences.push_back(std::move(value)); return *this; } private: double m_score; bool m_scoreHasBeenSet = false; EntityType m_type; bool m_typeHasBeenSet = false; Aws::String m_text; bool m_textHasBeenSet = false; int m_beginOffset; bool m_beginOffsetHasBeenSet = false; int m_endOffset; bool m_endOffsetHasBeenSet = false; Aws::Vector m_blockReferences; bool m_blockReferencesHasBeenSet = false; }; } // namespace Model } // namespace Comprehend } // namespace Aws