/** * 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 CodeCommit { namespace Model { /** *

Returns information about a specific comment.

See Also:

AWS * API Reference

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

The system-generated comment ID.

*/ inline const Aws::String& GetCommentId() const{ return m_commentId; } /** *

The system-generated comment ID.

*/ inline bool CommentIdHasBeenSet() const { return m_commentIdHasBeenSet; } /** *

The system-generated comment ID.

*/ inline void SetCommentId(const Aws::String& value) { m_commentIdHasBeenSet = true; m_commentId = value; } /** *

The system-generated comment ID.

*/ inline void SetCommentId(Aws::String&& value) { m_commentIdHasBeenSet = true; m_commentId = std::move(value); } /** *

The system-generated comment ID.

*/ inline void SetCommentId(const char* value) { m_commentIdHasBeenSet = true; m_commentId.assign(value); } /** *

The system-generated comment ID.

*/ inline Comment& WithCommentId(const Aws::String& value) { SetCommentId(value); return *this;} /** *

The system-generated comment ID.

*/ inline Comment& WithCommentId(Aws::String&& value) { SetCommentId(std::move(value)); return *this;} /** *

The system-generated comment ID.

*/ inline Comment& WithCommentId(const char* value) { SetCommentId(value); return *this;} /** *

The content of the comment.

*/ inline const Aws::String& GetContent() const{ return m_content; } /** *

The content of the comment.

*/ inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } /** *

The content of the comment.

*/ inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } /** *

The content of the comment.

*/ inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } /** *

The content of the comment.

*/ inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } /** *

The content of the comment.

*/ inline Comment& WithContent(const Aws::String& value) { SetContent(value); return *this;} /** *

The content of the comment.

*/ inline Comment& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} /** *

The content of the comment.

*/ inline Comment& WithContent(const char* value) { SetContent(value); return *this;} /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline const Aws::String& GetInReplyTo() const{ return m_inReplyTo; } /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline bool InReplyToHasBeenSet() const { return m_inReplyToHasBeenSet; } /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline void SetInReplyTo(const Aws::String& value) { m_inReplyToHasBeenSet = true; m_inReplyTo = value; } /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline void SetInReplyTo(Aws::String&& value) { m_inReplyToHasBeenSet = true; m_inReplyTo = std::move(value); } /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline void SetInReplyTo(const char* value) { m_inReplyToHasBeenSet = true; m_inReplyTo.assign(value); } /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline Comment& WithInReplyTo(const Aws::String& value) { SetInReplyTo(value); return *this;} /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline Comment& WithInReplyTo(Aws::String&& value) { SetInReplyTo(std::move(value)); return *this;} /** *

The ID of the comment for which this comment is a reply, if any.

*/ inline Comment& WithInReplyTo(const char* value) { SetInReplyTo(value); return *this;} /** *

The date and time the comment was created, in timestamp format.

*/ inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; } /** *

The date and time the comment was created, in timestamp format.

*/ inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; } /** *

The date and time the comment was created, in timestamp format.

*/ inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; } /** *

The date and time the comment was created, in timestamp format.

*/ inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); } /** *

The date and time the comment was created, in timestamp format.

*/ inline Comment& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;} /** *

The date and time the comment was created, in timestamp format.

*/ inline Comment& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;} /** *

The date and time the comment was most recently modified, in timestamp * format.

*/ inline const Aws::Utils::DateTime& GetLastModifiedDate() const{ return m_lastModifiedDate; } /** *

The date and time the comment was most recently modified, in timestamp * format.

*/ inline bool LastModifiedDateHasBeenSet() const { return m_lastModifiedDateHasBeenSet; } /** *

The date and time the comment was most recently modified, in timestamp * format.

*/ inline void SetLastModifiedDate(const Aws::Utils::DateTime& value) { m_lastModifiedDateHasBeenSet = true; m_lastModifiedDate = value; } /** *

The date and time the comment was most recently modified, in timestamp * format.

*/ inline void SetLastModifiedDate(Aws::Utils::DateTime&& value) { m_lastModifiedDateHasBeenSet = true; m_lastModifiedDate = std::move(value); } /** *

The date and time the comment was most recently modified, in timestamp * format.

*/ inline Comment& WithLastModifiedDate(const Aws::Utils::DateTime& value) { SetLastModifiedDate(value); return *this;} /** *

The date and time the comment was most recently modified, in timestamp * format.

*/ inline Comment& WithLastModifiedDate(Aws::Utils::DateTime&& value) { SetLastModifiedDate(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline const Aws::String& GetAuthorArn() const{ return m_authorArn; } /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline bool AuthorArnHasBeenSet() const { return m_authorArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline void SetAuthorArn(const Aws::String& value) { m_authorArnHasBeenSet = true; m_authorArn = value; } /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline void SetAuthorArn(Aws::String&& value) { m_authorArnHasBeenSet = true; m_authorArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline void SetAuthorArn(const char* value) { m_authorArnHasBeenSet = true; m_authorArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline Comment& WithAuthorArn(const Aws::String& value) { SetAuthorArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline Comment& WithAuthorArn(Aws::String&& value) { SetAuthorArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the person who posted the comment.

*/ inline Comment& WithAuthorArn(const char* value) { SetAuthorArn(value); return *this;} /** *

A Boolean value indicating whether the comment has been deleted.

*/ inline bool GetDeleted() const{ return m_deleted; } /** *

A Boolean value indicating whether the comment has been deleted.

*/ inline bool DeletedHasBeenSet() const { return m_deletedHasBeenSet; } /** *

A Boolean value indicating whether the comment has been deleted.

*/ inline void SetDeleted(bool value) { m_deletedHasBeenSet = true; m_deleted = value; } /** *

A Boolean value indicating whether the comment has been deleted.

*/ inline Comment& WithDeleted(bool value) { SetDeleted(value); return *this;} /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline Comment& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline Comment& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

A unique, client-generated idempotency token that, when provided in a * request, ensures the request cannot be repeated with a changed parameter. If a * request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token.

*/ inline Comment& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline const Aws::Vector& GetCallerReactions() const{ return m_callerReactions; } /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline bool CallerReactionsHasBeenSet() const { return m_callerReactionsHasBeenSet; } /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline void SetCallerReactions(const Aws::Vector& value) { m_callerReactionsHasBeenSet = true; m_callerReactions = value; } /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline void SetCallerReactions(Aws::Vector&& value) { m_callerReactionsHasBeenSet = true; m_callerReactions = std::move(value); } /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline Comment& WithCallerReactions(const Aws::Vector& value) { SetCallerReactions(value); return *this;} /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline Comment& WithCallerReactions(Aws::Vector&& value) { SetCallerReactions(std::move(value)); return *this;} /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline Comment& AddCallerReactions(const Aws::String& value) { m_callerReactionsHasBeenSet = true; m_callerReactions.push_back(value); return *this; } /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline Comment& AddCallerReactions(Aws::String&& value) { m_callerReactionsHasBeenSet = true; m_callerReactions.push_back(std::move(value)); return *this; } /** *

The emoji reactions to a comment, if any, submitted by the user whose * credentials are associated with the call to the API.

*/ inline Comment& AddCallerReactions(const char* value) { m_callerReactionsHasBeenSet = true; m_callerReactions.push_back(value); return *this; } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline const Aws::Map& GetReactionCounts() const{ return m_reactionCounts; } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline bool ReactionCountsHasBeenSet() const { return m_reactionCountsHasBeenSet; } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline void SetReactionCounts(const Aws::Map& value) { m_reactionCountsHasBeenSet = true; m_reactionCounts = value; } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline void SetReactionCounts(Aws::Map&& value) { m_reactionCountsHasBeenSet = true; m_reactionCounts = std::move(value); } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline Comment& WithReactionCounts(const Aws::Map& value) { SetReactionCounts(value); return *this;} /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline Comment& WithReactionCounts(Aws::Map&& value) { SetReactionCounts(std::move(value)); return *this;} /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline Comment& AddReactionCounts(const Aws::String& key, int value) { m_reactionCountsHasBeenSet = true; m_reactionCounts.emplace(key, value); return *this; } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline Comment& AddReactionCounts(Aws::String&& key, int value) { m_reactionCountsHasBeenSet = true; m_reactionCounts.emplace(std::move(key), value); return *this; } /** *

A string to integer map that represents the number of individual users who * have responded to a comment with the specified reactions.

*/ inline Comment& AddReactionCounts(const char* key, int value) { m_reactionCountsHasBeenSet = true; m_reactionCounts.emplace(key, value); return *this; } private: Aws::String m_commentId; bool m_commentIdHasBeenSet = false; Aws::String m_content; bool m_contentHasBeenSet = false; Aws::String m_inReplyTo; bool m_inReplyToHasBeenSet = false; Aws::Utils::DateTime m_creationDate; bool m_creationDateHasBeenSet = false; Aws::Utils::DateTime m_lastModifiedDate; bool m_lastModifiedDateHasBeenSet = false; Aws::String m_authorArn; bool m_authorArnHasBeenSet = false; bool m_deleted; bool m_deletedHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::Vector m_callerReactions; bool m_callerReactionsHasBeenSet = false; Aws::Map m_reactionCounts; bool m_reactionCountsHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws