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

An extracted segment of the text that is an attribute of an entity, or * otherwise related to an entity, such as the dosage of a medication taken. It * contains information about the attribute such as id, begin and end offset within * the input text, and the segment of the input text.

See Also:

* AWS * API Reference

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

The type of attribute.

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

The type of attribute.

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

The type of attribute.

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

The type of attribute.

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

The type of attribute.

*/ inline Attribute& WithType(const EntitySubType& value) { SetType(value); return *this;} /** *

The type of attribute.

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

The level of confidence that Amazon Comprehend Medical has that the segment * of text is correctly recognized as an attribute.

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

The level of confidence that Amazon Comprehend Medical has that the segment * of text is correctly recognized as an attribute.

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

The level of confidence that Amazon Comprehend Medical has that the segment * of text is correctly recognized as an attribute.

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

The level of confidence that Amazon Comprehend Medical has that the segment * of text is correctly recognized as an attribute.

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

The level of confidence that Amazon Comprehend Medical has that this * attribute is correctly related to this entity.

*/ inline double GetRelationshipScore() const{ return m_relationshipScore; } /** *

The level of confidence that Amazon Comprehend Medical has that this * attribute is correctly related to this entity.

*/ inline bool RelationshipScoreHasBeenSet() const { return m_relationshipScoreHasBeenSet; } /** *

The level of confidence that Amazon Comprehend Medical has that this * attribute is correctly related to this entity.

*/ inline void SetRelationshipScore(double value) { m_relationshipScoreHasBeenSet = true; m_relationshipScore = value; } /** *

The level of confidence that Amazon Comprehend Medical has that this * attribute is correctly related to this entity.

*/ inline Attribute& WithRelationshipScore(double value) { SetRelationshipScore(value); return *this;} /** *

The type of relationship between the entity and attribute. Type for the * relationship is OVERLAP, indicating that the entity occurred at the * same time as the Date_Expression.

*/ inline const RelationshipType& GetRelationshipType() const{ return m_relationshipType; } /** *

The type of relationship between the entity and attribute. Type for the * relationship is OVERLAP, indicating that the entity occurred at the * same time as the Date_Expression.

*/ inline bool RelationshipTypeHasBeenSet() const { return m_relationshipTypeHasBeenSet; } /** *

The type of relationship between the entity and attribute. Type for the * relationship is OVERLAP, indicating that the entity occurred at the * same time as the Date_Expression.

*/ inline void SetRelationshipType(const RelationshipType& value) { m_relationshipTypeHasBeenSet = true; m_relationshipType = value; } /** *

The type of relationship between the entity and attribute. Type for the * relationship is OVERLAP, indicating that the entity occurred at the * same time as the Date_Expression.

*/ inline void SetRelationshipType(RelationshipType&& value) { m_relationshipTypeHasBeenSet = true; m_relationshipType = std::move(value); } /** *

The type of relationship between the entity and attribute. Type for the * relationship is OVERLAP, indicating that the entity occurred at the * same time as the Date_Expression.

*/ inline Attribute& WithRelationshipType(const RelationshipType& value) { SetRelationshipType(value); return *this;} /** *

The type of relationship between the entity and attribute. Type for the * relationship is OVERLAP, indicating that the entity occurred at the * same time as the Date_Expression.

*/ inline Attribute& WithRelationshipType(RelationshipType&& value) { SetRelationshipType(std::move(value)); return *this;} /** *

The numeric identifier for this attribute. This is a monotonically * increasing id unique within this response rather than a global unique * identifier.

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

The numeric identifier for this attribute. This is a monotonically * increasing id unique within this response rather than a global unique * identifier.

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

The numeric identifier for this attribute. This is a monotonically * increasing id unique within this response rather than a global unique * identifier.

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

The numeric identifier for this attribute. This is a monotonically * increasing id unique within this response rather than a global unique * identifier.

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

The 0-based character offset in the input text that shows where the * attribute begins. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute begins. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute begins. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute begins. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute ends. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute ends. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute ends. The offset returns the UTF-8 code point in the string.

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

The 0-based character offset in the input text that shows where the * attribute ends. The offset returns the UTF-8 code point in the string.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The segment of input text extracted as this attribute.

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

The category of attribute.

*/ inline const EntityType& GetCategory() const{ return m_category; } /** *

The category of attribute.

*/ inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; } /** *

The category of attribute.

*/ inline void SetCategory(const EntityType& value) { m_categoryHasBeenSet = true; m_category = value; } /** *

The category of attribute.

*/ inline void SetCategory(EntityType&& value) { m_categoryHasBeenSet = true; m_category = std::move(value); } /** *

The category of attribute.

*/ inline Attribute& WithCategory(const EntityType& value) { SetCategory(value); return *this;} /** *

The category of attribute.

*/ inline Attribute& WithCategory(EntityType&& value) { SetCategory(std::move(value)); return *this;} /** *

Contextual information for this attribute.

*/ inline const Aws::Vector& GetTraits() const{ return m_traits; } /** *

Contextual information for this attribute.

*/ inline bool TraitsHasBeenSet() const { return m_traitsHasBeenSet; } /** *

Contextual information for this attribute.

*/ inline void SetTraits(const Aws::Vector& value) { m_traitsHasBeenSet = true; m_traits = value; } /** *

Contextual information for this attribute.

*/ inline void SetTraits(Aws::Vector&& value) { m_traitsHasBeenSet = true; m_traits = std::move(value); } /** *

Contextual information for this attribute.

*/ inline Attribute& WithTraits(const Aws::Vector& value) { SetTraits(value); return *this;} /** *

Contextual information for this attribute.

*/ inline Attribute& WithTraits(Aws::Vector&& value) { SetTraits(std::move(value)); return *this;} /** *

Contextual information for this attribute.

*/ inline Attribute& AddTraits(const Trait& value) { m_traitsHasBeenSet = true; m_traits.push_back(value); return *this; } /** *

Contextual information for this attribute.

*/ inline Attribute& AddTraits(Trait&& value) { m_traitsHasBeenSet = true; m_traits.push_back(std::move(value)); return *this; } private: EntitySubType m_type; bool m_typeHasBeenSet = false; double m_score; bool m_scoreHasBeenSet = false; double m_relationshipScore; bool m_relationshipScoreHasBeenSet = false; RelationshipType m_relationshipType; bool m_relationshipTypeHasBeenSet = false; int m_id; bool m_idHasBeenSet = false; int m_beginOffset; bool m_beginOffsetHasBeenSet = false; int m_endOffset; bool m_endOffsetHasBeenSet = false; Aws::String m_text; bool m_textHasBeenSet = false; EntityType m_category; bool m_categoryHasBeenSet = false; Aws::Vector m_traits; bool m_traitsHasBeenSet = false; }; } // namespace Model } // namespace ComprehendMedical } // namespace Aws