/** * 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 #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeGuruReviewer { namespace Model { /** *

Information about a code review.

See Also:

AWS * API Reference

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

The name of the code review.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the code review.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the code review.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the code review.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the code review.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the code review.

*/ inline CodeReview& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the code review.

*/ inline CodeReview& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the code review.

*/ inline CodeReview& WithName(const char* value) { SetName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline const Aws::String& GetCodeReviewArn() const{ return m_codeReviewArn; } /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline bool CodeReviewArnHasBeenSet() const { return m_codeReviewArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline void SetCodeReviewArn(const Aws::String& value) { m_codeReviewArnHasBeenSet = true; m_codeReviewArn = value; } /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline void SetCodeReviewArn(Aws::String&& value) { m_codeReviewArnHasBeenSet = true; m_codeReviewArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline void SetCodeReviewArn(const char* value) { m_codeReviewArnHasBeenSet = true; m_codeReviewArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline CodeReview& WithCodeReviewArn(const Aws::String& value) { SetCodeReviewArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline CodeReview& WithCodeReviewArn(Aws::String&& value) { SetCodeReviewArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the * CodeReview object.

*/ inline CodeReview& WithCodeReviewArn(const char* value) { SetCodeReviewArn(value); return *this;} /** *

The name of the repository.

*/ inline const Aws::String& GetRepositoryName() const{ return m_repositoryName; } /** *

The name of the repository.

*/ inline bool RepositoryNameHasBeenSet() const { return m_repositoryNameHasBeenSet; } /** *

The name of the repository.

*/ inline void SetRepositoryName(const Aws::String& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = value; } /** *

The name of the repository.

*/ inline void SetRepositoryName(Aws::String&& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = std::move(value); } /** *

The name of the repository.

*/ inline void SetRepositoryName(const char* value) { m_repositoryNameHasBeenSet = true; m_repositoryName.assign(value); } /** *

The name of the repository.

*/ inline CodeReview& WithRepositoryName(const Aws::String& value) { SetRepositoryName(value); return *this;} /** *

The name of the repository.

*/ inline CodeReview& WithRepositoryName(Aws::String&& value) { SetRepositoryName(std::move(value)); return *this;} /** *

The name of the repository.

*/ inline CodeReview& WithRepositoryName(const char* value) { SetRepositoryName(value); return *this;} /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline const Aws::String& GetOwner() const{ return m_owner; } /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; } /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline void SetOwner(const Aws::String& value) { m_ownerHasBeenSet = true; m_owner = value; } /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline void SetOwner(Aws::String&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); } /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline void SetOwner(const char* value) { m_ownerHasBeenSet = true; m_owner.assign(value); } /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline CodeReview& WithOwner(const Aws::String& value) { SetOwner(value); return *this;} /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline CodeReview& WithOwner(Aws::String&& value) { SetOwner(std::move(value)); return *this;} /** *

The owner of the repository. For an AWS CodeCommit repository, this is the * AWS account ID of the account that owns the repository. For a GitHub or * Bitbucket repository, this is the username for the account that owns the * repository.

*/ inline CodeReview& WithOwner(const char* value) { SetOwner(value); return *this;} /** *

The type of repository that contains the reviewed code (for example, GitHub * or Bitbucket).

*/ inline const ProviderType& GetProviderType() const{ return m_providerType; } /** *

The type of repository that contains the reviewed code (for example, GitHub * or Bitbucket).

*/ inline bool ProviderTypeHasBeenSet() const { return m_providerTypeHasBeenSet; } /** *

The type of repository that contains the reviewed code (for example, GitHub * or Bitbucket).

*/ inline void SetProviderType(const ProviderType& value) { m_providerTypeHasBeenSet = true; m_providerType = value; } /** *

The type of repository that contains the reviewed code (for example, GitHub * or Bitbucket).

*/ inline void SetProviderType(ProviderType&& value) { m_providerTypeHasBeenSet = true; m_providerType = std::move(value); } /** *

The type of repository that contains the reviewed code (for example, GitHub * or Bitbucket).

*/ inline CodeReview& WithProviderType(const ProviderType& value) { SetProviderType(value); return *this;} /** *

The type of repository that contains the reviewed code (for example, GitHub * or Bitbucket).

*/ inline CodeReview& WithProviderType(ProviderType&& value) { SetProviderType(std::move(value)); return *this;} /** *

The valid code review states are:

  • Completed: * The code review is complete.

  • Pending: The code * review started and has not completed or failed.

  • * Failed: The code review failed.

  • * Deleting: The code review is being deleted.

*/ inline const JobState& GetState() const{ return m_state; } /** *

The valid code review states are:

  • Completed: * The code review is complete.

  • Pending: The code * review started and has not completed or failed.

  • * Failed: The code review failed.

  • * Deleting: The code review is being deleted.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The valid code review states are:

  • Completed: * The code review is complete.

  • Pending: The code * review started and has not completed or failed.

  • * Failed: The code review failed.

  • * Deleting: The code review is being deleted.

*/ inline void SetState(const JobState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The valid code review states are:

  • Completed: * The code review is complete.

  • Pending: The code * review started and has not completed or failed.

  • * Failed: The code review failed.

  • * Deleting: The code review is being deleted.

*/ inline void SetState(JobState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The valid code review states are:

  • Completed: * The code review is complete.

  • Pending: The code * review started and has not completed or failed.

  • * Failed: The code review failed.

  • * Deleting: The code review is being deleted.

*/ inline CodeReview& WithState(const JobState& value) { SetState(value); return *this;} /** *

The valid code review states are:

  • Completed: * The code review is complete.

  • Pending: The code * review started and has not completed or failed.

  • * Failed: The code review failed.

  • * Deleting: The code review is being deleted.

*/ inline CodeReview& WithState(JobState&& value) { SetState(std::move(value)); return *this;} /** *

The reason for the state of the code review.

*/ inline const Aws::String& GetStateReason() const{ return m_stateReason; } /** *

The reason for the state of the code review.

*/ inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; } /** *

The reason for the state of the code review.

*/ inline void SetStateReason(const Aws::String& value) { m_stateReasonHasBeenSet = true; m_stateReason = value; } /** *

The reason for the state of the code review.

*/ inline void SetStateReason(Aws::String&& value) { m_stateReasonHasBeenSet = true; m_stateReason = std::move(value); } /** *

The reason for the state of the code review.

*/ inline void SetStateReason(const char* value) { m_stateReasonHasBeenSet = true; m_stateReason.assign(value); } /** *

The reason for the state of the code review.

*/ inline CodeReview& WithStateReason(const Aws::String& value) { SetStateReason(value); return *this;} /** *

The reason for the state of the code review.

*/ inline CodeReview& WithStateReason(Aws::String&& value) { SetStateReason(std::move(value)); return *this;} /** *

The reason for the state of the code review.

*/ inline CodeReview& WithStateReason(const char* value) { SetStateReason(value); return *this;} /** *

The time, in milliseconds since the epoch, when the code review was created. *

*/ inline const Aws::Utils::DateTime& GetCreatedTimeStamp() const{ return m_createdTimeStamp; } /** *

The time, in milliseconds since the epoch, when the code review was created. *

*/ inline bool CreatedTimeStampHasBeenSet() const { return m_createdTimeStampHasBeenSet; } /** *

The time, in milliseconds since the epoch, when the code review was created. *

*/ inline void SetCreatedTimeStamp(const Aws::Utils::DateTime& value) { m_createdTimeStampHasBeenSet = true; m_createdTimeStamp = value; } /** *

The time, in milliseconds since the epoch, when the code review was created. *

*/ inline void SetCreatedTimeStamp(Aws::Utils::DateTime&& value) { m_createdTimeStampHasBeenSet = true; m_createdTimeStamp = std::move(value); } /** *

The time, in milliseconds since the epoch, when the code review was created. *

*/ inline CodeReview& WithCreatedTimeStamp(const Aws::Utils::DateTime& value) { SetCreatedTimeStamp(value); return *this;} /** *

The time, in milliseconds since the epoch, when the code review was created. *

*/ inline CodeReview& WithCreatedTimeStamp(Aws::Utils::DateTime&& value) { SetCreatedTimeStamp(std::move(value)); return *this;} /** *

The time, in milliseconds since the epoch, when the code review was last * updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedTimeStamp() const{ return m_lastUpdatedTimeStamp; } /** *

The time, in milliseconds since the epoch, when the code review was last * updated.

*/ inline bool LastUpdatedTimeStampHasBeenSet() const { return m_lastUpdatedTimeStampHasBeenSet; } /** *

The time, in milliseconds since the epoch, when the code review was last * updated.

*/ inline void SetLastUpdatedTimeStamp(const Aws::Utils::DateTime& value) { m_lastUpdatedTimeStampHasBeenSet = true; m_lastUpdatedTimeStamp = value; } /** *

The time, in milliseconds since the epoch, when the code review was last * updated.

*/ inline void SetLastUpdatedTimeStamp(Aws::Utils::DateTime&& value) { m_lastUpdatedTimeStampHasBeenSet = true; m_lastUpdatedTimeStamp = std::move(value); } /** *

The time, in milliseconds since the epoch, when the code review was last * updated.

*/ inline CodeReview& WithLastUpdatedTimeStamp(const Aws::Utils::DateTime& value) { SetLastUpdatedTimeStamp(value); return *this;} /** *

The time, in milliseconds since the epoch, when the code review was last * updated.

*/ inline CodeReview& WithLastUpdatedTimeStamp(Aws::Utils::DateTime&& value) { SetLastUpdatedTimeStamp(std::move(value)); return *this;} /** *

The type of code review.

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

The type of code review.

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

The type of code review.

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

The type of code review.

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

The type of code review.

*/ inline CodeReview& WithType(const Type& value) { SetType(value); return *this;} /** *

The type of code review.

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

The pull request ID for the code review.

*/ inline const Aws::String& GetPullRequestId() const{ return m_pullRequestId; } /** *

The pull request ID for the code review.

*/ inline bool PullRequestIdHasBeenSet() const { return m_pullRequestIdHasBeenSet; } /** *

The pull request ID for the code review.

*/ inline void SetPullRequestId(const Aws::String& value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId = value; } /** *

The pull request ID for the code review.

*/ inline void SetPullRequestId(Aws::String&& value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId = std::move(value); } /** *

The pull request ID for the code review.

*/ inline void SetPullRequestId(const char* value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId.assign(value); } /** *

The pull request ID for the code review.

*/ inline CodeReview& WithPullRequestId(const Aws::String& value) { SetPullRequestId(value); return *this;} /** *

The pull request ID for the code review.

*/ inline CodeReview& WithPullRequestId(Aws::String&& value) { SetPullRequestId(std::move(value)); return *this;} /** *

The pull request ID for the code review.

*/ inline CodeReview& WithPullRequestId(const char* value) { SetPullRequestId(value); return *this;} /** *

The type of the source code for the code review.

*/ inline const SourceCodeType& GetSourceCodeType() const{ return m_sourceCodeType; } /** *

The type of the source code for the code review.

*/ inline bool SourceCodeTypeHasBeenSet() const { return m_sourceCodeTypeHasBeenSet; } /** *

The type of the source code for the code review.

*/ inline void SetSourceCodeType(const SourceCodeType& value) { m_sourceCodeTypeHasBeenSet = true; m_sourceCodeType = value; } /** *

The type of the source code for the code review.

*/ inline void SetSourceCodeType(SourceCodeType&& value) { m_sourceCodeTypeHasBeenSet = true; m_sourceCodeType = std::move(value); } /** *

The type of the source code for the code review.

*/ inline CodeReview& WithSourceCodeType(const SourceCodeType& value) { SetSourceCodeType(value); return *this;} /** *

The type of the source code for the code review.

*/ inline CodeReview& WithSourceCodeType(SourceCodeType&& value) { SetSourceCodeType(std::move(value)); return *this;} /** *

The statistics from the code review.

*/ inline const Metrics& GetMetrics() const{ return m_metrics; } /** *

The statistics from the code review.

*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *

The statistics from the code review.

*/ inline void SetMetrics(const Metrics& value) { m_metricsHasBeenSet = true; m_metrics = value; } /** *

The statistics from the code review.

*/ inline void SetMetrics(Metrics&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } /** *

The statistics from the code review.

*/ inline CodeReview& WithMetrics(const Metrics& value) { SetMetrics(value); return *this;} /** *

The statistics from the code review.

*/ inline CodeReview& WithMetrics(Metrics&& value) { SetMetrics(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_codeReviewArn; bool m_codeReviewArnHasBeenSet; Aws::String m_repositoryName; bool m_repositoryNameHasBeenSet; Aws::String m_owner; bool m_ownerHasBeenSet; ProviderType m_providerType; bool m_providerTypeHasBeenSet; JobState m_state; bool m_stateHasBeenSet; Aws::String m_stateReason; bool m_stateReasonHasBeenSet; Aws::Utils::DateTime m_createdTimeStamp; bool m_createdTimeStampHasBeenSet; Aws::Utils::DateTime m_lastUpdatedTimeStamp; bool m_lastUpdatedTimeStampHasBeenSet; Type m_type; bool m_typeHasBeenSet; Aws::String m_pullRequestId; bool m_pullRequestIdHasBeenSet; SourceCodeType m_sourceCodeType; bool m_sourceCodeTypeHasBeenSet; Metrics m_metrics; bool m_metricsHasBeenSet; }; } // namespace Model } // namespace CodeGuruReviewer } // namespace Aws