/**
* 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
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace CodeGuruReviewer
{
namespace Model
{
class AssociateRepositoryRequest;
class DescribeCodeReviewRequest;
class DescribeRecommendationFeedbackRequest;
class DescribeRepositoryAssociationRequest;
class DisassociateRepositoryRequest;
class ListCodeReviewsRequest;
class ListRecommendationFeedbackRequest;
class ListRecommendationsRequest;
class ListRepositoryAssociationsRequest;
class PutRecommendationFeedbackRequest;
typedef Aws::Utils::Outcome AssociateRepositoryOutcome;
typedef Aws::Utils::Outcome DescribeCodeReviewOutcome;
typedef Aws::Utils::Outcome DescribeRecommendationFeedbackOutcome;
typedef Aws::Utils::Outcome DescribeRepositoryAssociationOutcome;
typedef Aws::Utils::Outcome DisassociateRepositoryOutcome;
typedef Aws::Utils::Outcome ListCodeReviewsOutcome;
typedef Aws::Utils::Outcome ListRecommendationFeedbackOutcome;
typedef Aws::Utils::Outcome ListRecommendationsOutcome;
typedef Aws::Utils::Outcome ListRepositoryAssociationsOutcome;
typedef Aws::Utils::Outcome PutRecommendationFeedbackOutcome;
typedef std::future AssociateRepositoryOutcomeCallable;
typedef std::future DescribeCodeReviewOutcomeCallable;
typedef std::future DescribeRecommendationFeedbackOutcomeCallable;
typedef std::future DescribeRepositoryAssociationOutcomeCallable;
typedef std::future DisassociateRepositoryOutcomeCallable;
typedef std::future ListCodeReviewsOutcomeCallable;
typedef std::future ListRecommendationFeedbackOutcomeCallable;
typedef std::future ListRecommendationsOutcomeCallable;
typedef std::future ListRepositoryAssociationsOutcomeCallable;
typedef std::future PutRecommendationFeedbackOutcomeCallable;
} // namespace Model
class CodeGuruReviewerClient;
typedef std::function&) > AssociateRepositoryResponseReceivedHandler;
typedef std::function&) > DescribeCodeReviewResponseReceivedHandler;
typedef std::function&) > DescribeRecommendationFeedbackResponseReceivedHandler;
typedef std::function&) > DescribeRepositoryAssociationResponseReceivedHandler;
typedef std::function&) > DisassociateRepositoryResponseReceivedHandler;
typedef std::function&) > ListCodeReviewsResponseReceivedHandler;
typedef std::function&) > ListRecommendationFeedbackResponseReceivedHandler;
typedef std::function&) > ListRecommendationsResponseReceivedHandler;
typedef std::function&) > ListRepositoryAssociationsResponseReceivedHandler;
typedef std::function&) > PutRecommendationFeedbackResponseReceivedHandler;
/**
* This section provides documentation for the Amazon CodeGuru Reviewer API
* operations. CodeGuru Reviewer is a service that uses program analysis and
* machine learning to detect potential defects that are difficult for developers
* to find and recommends fixes in your Java code.
By proactively detecting
* and providing recommendations for addressing code defects and implementing best
* practices, CodeGuru Reviewer improves the overall quality and maintainability of
* your code base during the code review stage. For more information about CodeGuru
* Reviewer, see the Amazon
* CodeGuru Reviewer User Guide.
*/
class AWS_CODEGURUREVIEWER_API CodeGuruReviewerClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
CodeGuruReviewerClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
CodeGuruReviewerClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
CodeGuruReviewerClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~CodeGuruReviewerClient();
/**
* Use to associate an AWS CodeCommit repository or a repostory managed by AWS
* CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a
* repository, CodeGuru Reviewer reviews source code changes in the repository's
* pull requests and provides automatic recommendations. You can view
* recommendations using the CodeGuru Reviewer console. For more information, see
* Recommendations
* in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User
* Guide.
If you associate a CodeCommit repository, it must be in the
* same AWS Region and AWS account where its CodeGuru Reviewer code reviews are
* configured.
Bitbucket and GitHub Enterprise Server repositories are
* managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more
* information, see Connect
* to a repository source provider in the Amazon CodeGuru Reviewer User
* Guide.
You cannot use the CodeGuru Reviewer SDK or the AWS
* CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate
* a GitHub repository, use the console. For more information, see Getting
* started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.
*
See Also:
AWS
* API Reference
*/
virtual Model::AssociateRepositoryOutcome AssociateRepository(const Model::AssociateRepositoryRequest& request) const;
/**
* Use to associate an AWS CodeCommit repository or a repostory managed by AWS
* CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a
* repository, CodeGuru Reviewer reviews source code changes in the repository's
* pull requests and provides automatic recommendations. You can view
* recommendations using the CodeGuru Reviewer console. For more information, see
* Recommendations
* in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User
* Guide.
If you associate a CodeCommit repository, it must be in the
* same AWS Region and AWS account where its CodeGuru Reviewer code reviews are
* configured.
Bitbucket and GitHub Enterprise Server repositories are
* managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more
* information, see Connect
* to a repository source provider in the Amazon CodeGuru Reviewer User
* Guide.
You cannot use the CodeGuru Reviewer SDK or the AWS
* CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate
* a GitHub repository, use the console. For more information, see Getting
* started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.
*
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::AssociateRepositoryOutcomeCallable AssociateRepositoryCallable(const Model::AssociateRepositoryRequest& request) const;
/**
* Use to associate an AWS CodeCommit repository or a repostory managed by AWS
* CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a
* repository, CodeGuru Reviewer reviews source code changes in the repository's
* pull requests and provides automatic recommendations. You can view
* recommendations using the CodeGuru Reviewer console. For more information, see
* Recommendations
* in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User
* Guide.
If you associate a CodeCommit repository, it must be in the
* same AWS Region and AWS account where its CodeGuru Reviewer code reviews are
* configured.
Bitbucket and GitHub Enterprise Server repositories are
* managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more
* information, see Connect
* to a repository source provider in the Amazon CodeGuru Reviewer User
* Guide.
You cannot use the CodeGuru Reviewer SDK or the AWS
* CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate
* a GitHub repository, use the console. For more information, see Getting
* started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.
*
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void AssociateRepositoryAsync(const Model::AssociateRepositoryRequest& request, const AssociateRepositoryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns the metadata associated with the code review along with its
* status.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeCodeReviewOutcome DescribeCodeReview(const Model::DescribeCodeReviewRequest& request) const;
/**
* Returns the metadata associated with the code review along with its
* status.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeCodeReviewOutcomeCallable DescribeCodeReviewCallable(const Model::DescribeCodeReviewRequest& request) const;
/**
* Returns the metadata associated with the code review along with its
* status.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeCodeReviewAsync(const Model::DescribeCodeReviewRequest& request, const DescribeCodeReviewResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Describes the customer feedback for a CodeGuru Reviewer recommendation.
*
See Also:
AWS
* API Reference
*/
virtual Model::DescribeRecommendationFeedbackOutcome DescribeRecommendationFeedback(const Model::DescribeRecommendationFeedbackRequest& request) const;
/**
* Describes the customer feedback for a CodeGuru Reviewer recommendation.
*
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeRecommendationFeedbackOutcomeCallable DescribeRecommendationFeedbackCallable(const Model::DescribeRecommendationFeedbackRequest& request) const;
/**
* Describes the customer feedback for a CodeGuru Reviewer recommendation.
*
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeRecommendationFeedbackAsync(const Model::DescribeRecommendationFeedbackRequest& request, const DescribeRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a
* RepositoryAssociation object that contains information about
* the requested repository association.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeRepositoryAssociationOutcome DescribeRepositoryAssociation(const Model::DescribeRepositoryAssociationRequest& request) const;
/**
* Returns a
* RepositoryAssociation object that contains information about
* the requested repository association.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeRepositoryAssociationOutcomeCallable DescribeRepositoryAssociationCallable(const Model::DescribeRepositoryAssociationRequest& request) const;
/**
* Returns a
* RepositoryAssociation object that contains information about
* the requested repository association.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeRepositoryAssociationAsync(const Model::DescribeRepositoryAssociationRequest& request, const DescribeRepositoryAssociationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Removes the association between Amazon CodeGuru Reviewer and a
* repository.
See Also:
AWS
* API Reference
*/
virtual Model::DisassociateRepositoryOutcome DisassociateRepository(const Model::DisassociateRepositoryRequest& request) const;
/**
* Removes the association between Amazon CodeGuru Reviewer and a
* repository.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DisassociateRepositoryOutcomeCallable DisassociateRepositoryCallable(const Model::DisassociateRepositoryRequest& request) const;
/**
* Removes the association between Amazon CodeGuru Reviewer and a
* repository.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DisassociateRepositoryAsync(const Model::DisassociateRepositoryRequest& request, const DisassociateRepositoryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Lists all the code reviews that the customer has created in the past 90
* days.
See Also:
AWS
* API Reference
*/
virtual Model::ListCodeReviewsOutcome ListCodeReviews(const Model::ListCodeReviewsRequest& request) const;
/**
* Lists all the code reviews that the customer has created in the past 90
* days.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListCodeReviewsOutcomeCallable ListCodeReviewsCallable(const Model::ListCodeReviewsRequest& request) const;
/**
* Lists all the code reviews that the customer has created in the past 90
* days.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListCodeReviewsAsync(const Model::ListCodeReviewsRequest& request, const ListCodeReviewsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of
* RecommendationFeedbackSummary objects that contain customer
* recommendation feedback for all CodeGuru Reviewer users.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListRecommendationFeedbackOutcome ListRecommendationFeedback(const Model::ListRecommendationFeedbackRequest& request) const;
/**
* Returns a list of
* RecommendationFeedbackSummary objects that contain customer
* recommendation feedback for all CodeGuru Reviewer users.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListRecommendationFeedbackOutcomeCallable ListRecommendationFeedbackCallable(const Model::ListRecommendationFeedbackRequest& request) const;
/**
* Returns a list of
* RecommendationFeedbackSummary objects that contain customer
* recommendation feedback for all CodeGuru Reviewer users.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListRecommendationFeedbackAsync(const Model::ListRecommendationFeedbackRequest& request, const ListRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns the list of all recommendations for a completed code review.
*
See Also:
AWS
* API Reference
*/
virtual Model::ListRecommendationsOutcome ListRecommendations(const Model::ListRecommendationsRequest& request) const;
/**
* Returns the list of all recommendations for a completed code review.
*
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListRecommendationsOutcomeCallable ListRecommendationsCallable(const Model::ListRecommendationsRequest& request) const;
/**
* Returns the list of all recommendations for a completed code review.
*
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListRecommendationsAsync(const Model::ListRecommendationsRequest& request, const ListRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns a list of
* RepositoryAssociationSummary objects that contain summary
* information about a repository association. You can filter the returned list by
*
* ProviderType ,
* Name ,
* State , and
* Owner .
See Also:
AWS
* API Reference
*/
virtual Model::ListRepositoryAssociationsOutcome ListRepositoryAssociations(const Model::ListRepositoryAssociationsRequest& request) const;
/**
* Returns a list of
* RepositoryAssociationSummary objects that contain summary
* information about a repository association. You can filter the returned list by
*
* ProviderType ,
* Name ,
* State , and
* Owner .
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListRepositoryAssociationsOutcomeCallable ListRepositoryAssociationsCallable(const Model::ListRepositoryAssociationsRequest& request) const;
/**
* Returns a list of
* RepositoryAssociationSummary objects that contain summary
* information about a repository association. You can filter the returned list by
*
* ProviderType ,
* Name ,
* State , and
* Owner .
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListRepositoryAssociationsAsync(const Model::ListRepositoryAssociationsRequest& request, const ListRepositoryAssociationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Stores customer feedback for a CodeGuru Reviewer recommendation. When this
* API is called again with different reactions the previous feedback is
* overwritten.
See Also:
AWS
* API Reference
*/
virtual Model::PutRecommendationFeedbackOutcome PutRecommendationFeedback(const Model::PutRecommendationFeedbackRequest& request) const;
/**
* Stores customer feedback for a CodeGuru Reviewer recommendation. When this
* API is called again with different reactions the previous feedback is
* overwritten.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::PutRecommendationFeedbackOutcomeCallable PutRecommendationFeedbackCallable(const Model::PutRecommendationFeedbackRequest& request) const;
/**
* Stores customer feedback for a CodeGuru Reviewer recommendation. When this
* API is called again with different reactions the previous feedback is
* overwritten.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void PutRecommendationFeedbackAsync(const Model::PutRecommendationFeedbackRequest& request, const PutRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void AssociateRepositoryAsyncHelper(const Model::AssociateRepositoryRequest& request, const AssociateRepositoryResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeCodeReviewAsyncHelper(const Model::DescribeCodeReviewRequest& request, const DescribeCodeReviewResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeRecommendationFeedbackAsyncHelper(const Model::DescribeRecommendationFeedbackRequest& request, const DescribeRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeRepositoryAssociationAsyncHelper(const Model::DescribeRepositoryAssociationRequest& request, const DescribeRepositoryAssociationResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DisassociateRepositoryAsyncHelper(const Model::DisassociateRepositoryRequest& request, const DisassociateRepositoryResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListCodeReviewsAsyncHelper(const Model::ListCodeReviewsRequest& request, const ListCodeReviewsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListRecommendationFeedbackAsyncHelper(const Model::ListRecommendationFeedbackRequest& request, const ListRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListRecommendationsAsyncHelper(const Model::ListRecommendationsRequest& request, const ListRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListRepositoryAssociationsAsyncHelper(const Model::ListRepositoryAssociationsRequest& request, const ListRepositoryAssociationsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void PutRecommendationFeedbackAsyncHelper(const Model::PutRecommendationFeedbackRequest& request, const PutRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace CodeGuruReviewer
} // namespace Aws