/** * 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 CodeGuruReviewer { /** *

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 and Python 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.

To improve the security of your * CodeGuru Reviewer API calls, you can establish a private connection between your * VPC and CodeGuru Reviewer by creating an interface VPC endpoint. For more * information, see CodeGuru * Reviewer and interface VPC endpoints (Amazon Web Services PrivateLink) in * the Amazon CodeGuru Reviewer User Guide.

*/ class AWS_CODEGURUREVIEWER_API CodeGuruReviewerClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: typedef Aws::Client::AWSJsonClient BASECLASS; static const char* SERVICE_NAME; static const char* ALLOCATION_TAG; typedef CodeGuruReviewerClientConfiguration ClientConfigurationType; typedef CodeGuruReviewerEndpointProvider EndpointProviderType; /** * 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::CodeGuruReviewer::CodeGuruReviewerClientConfiguration& clientConfiguration = Aws::CodeGuruReviewer::CodeGuruReviewerClientConfiguration(), std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG)); /** * 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, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::CodeGuruReviewer::CodeGuruReviewerClientConfiguration& clientConfiguration = Aws::CodeGuruReviewer::CodeGuruReviewerClientConfiguration()); /** * 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, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::CodeGuruReviewer::CodeGuruReviewerClientConfiguration& clientConfiguration = Aws::CodeGuruReviewer::CodeGuruReviewerClientConfiguration()); /* Legacy constructors due deprecation */ /** * 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); /** * 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); /** * 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); /* End of legacy constructors due deprecation */ virtual ~CodeGuruReviewerClient(); /** *

Use to associate an Amazon Web Services CodeCommit repository or a repository * managed by Amazon Web Services 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 or S3 repository, it must be in * the same Amazon Web Services Region and Amazon Web Services account where its * CodeGuru Reviewer code reviews are configured.

Bitbucket and GitHub * Enterprise Server repositories are managed by Amazon Web Services CodeStar * Connections to connect to CodeGuru Reviewer. For more information, see Associate * a repository in the Amazon CodeGuru Reviewer User Guide.

*

You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services 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; /** * A Callable wrapper for AssociateRepository that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::AssociateRepositoryOutcomeCallable AssociateRepositoryCallable(const AssociateRepositoryRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::AssociateRepository, request); } /** * An Async wrapper for AssociateRepository that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void AssociateRepositoryAsync(const AssociateRepositoryRequestT& request, const AssociateRepositoryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::AssociateRepository, request, handler, context); } /** *

Use to create a code review with a CodeReviewType * of RepositoryAnalysis. This type of code review analyzes all code * under a specified branch in an associated repository. PullRequest * code reviews are automatically triggered by a pull request.

See * Also:

AWS * API Reference

*/ virtual Model::CreateCodeReviewOutcome CreateCodeReview(const Model::CreateCodeReviewRequest& request) const; /** * A Callable wrapper for CreateCodeReview that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateCodeReviewOutcomeCallable CreateCodeReviewCallable(const CreateCodeReviewRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::CreateCodeReview, request); } /** * An Async wrapper for CreateCodeReview that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateCodeReviewAsync(const CreateCodeReviewRequestT& request, const CreateCodeReviewResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::CreateCodeReview, request, handler, context); } /** *

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; /** * A Callable wrapper for DescribeCodeReview that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeCodeReviewOutcomeCallable DescribeCodeReviewCallable(const DescribeCodeReviewRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::DescribeCodeReview, request); } /** * An Async wrapper for DescribeCodeReview that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeCodeReviewAsync(const DescribeCodeReviewRequestT& request, const DescribeCodeReviewResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::DescribeCodeReview, request, handler, context); } /** *

Describes the customer feedback for a CodeGuru Reviewer * recommendation.

See Also:

AWS * API Reference

*/ virtual Model::DescribeRecommendationFeedbackOutcome DescribeRecommendationFeedback(const Model::DescribeRecommendationFeedbackRequest& request) const; /** * A Callable wrapper for DescribeRecommendationFeedback that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeRecommendationFeedbackOutcomeCallable DescribeRecommendationFeedbackCallable(const DescribeRecommendationFeedbackRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::DescribeRecommendationFeedback, request); } /** * An Async wrapper for DescribeRecommendationFeedback that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeRecommendationFeedbackAsync(const DescribeRecommendationFeedbackRequestT& request, const DescribeRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::DescribeRecommendationFeedback, request, handler, context); } /** *

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; /** * A Callable wrapper for DescribeRepositoryAssociation that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DescribeRepositoryAssociationOutcomeCallable DescribeRepositoryAssociationCallable(const DescribeRepositoryAssociationRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::DescribeRepositoryAssociation, request); } /** * An Async wrapper for DescribeRepositoryAssociation that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DescribeRepositoryAssociationAsync(const DescribeRepositoryAssociationRequestT& request, const DescribeRepositoryAssociationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::DescribeRepositoryAssociation, request, handler, context); } /** *

Removes the association between Amazon CodeGuru Reviewer and a * repository.

See Also:

AWS * API Reference

*/ virtual Model::DisassociateRepositoryOutcome DisassociateRepository(const Model::DisassociateRepositoryRequest& request) const; /** * A Callable wrapper for DisassociateRepository that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DisassociateRepositoryOutcomeCallable DisassociateRepositoryCallable(const DisassociateRepositoryRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::DisassociateRepository, request); } /** * An Async wrapper for DisassociateRepository that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DisassociateRepositoryAsync(const DisassociateRepositoryRequestT& request, const DisassociateRepositoryResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::DisassociateRepository, request, handler, context); } /** *

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; /** * A Callable wrapper for ListCodeReviews that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListCodeReviewsOutcomeCallable ListCodeReviewsCallable(const ListCodeReviewsRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::ListCodeReviews, request); } /** * An Async wrapper for ListCodeReviews that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListCodeReviewsAsync(const ListCodeReviewsRequestT& request, const ListCodeReviewsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::ListCodeReviews, request, handler, context); } /** *

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; /** * A Callable wrapper for ListRecommendationFeedback that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListRecommendationFeedbackOutcomeCallable ListRecommendationFeedbackCallable(const ListRecommendationFeedbackRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::ListRecommendationFeedback, request); } /** * An Async wrapper for ListRecommendationFeedback that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListRecommendationFeedbackAsync(const ListRecommendationFeedbackRequestT& request, const ListRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::ListRecommendationFeedback, request, handler, context); } /** *

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; /** * A Callable wrapper for ListRecommendations that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListRecommendationsOutcomeCallable ListRecommendationsCallable(const ListRecommendationsRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::ListRecommendations, request); } /** * An Async wrapper for ListRecommendations that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListRecommendationsAsync(const ListRecommendationsRequestT& request, const ListRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::ListRecommendations, request, handler, context); } /** *

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; /** * A Callable wrapper for ListRepositoryAssociations that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListRepositoryAssociationsOutcomeCallable ListRepositoryAssociationsCallable(const ListRepositoryAssociationsRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::ListRepositoryAssociations, request); } /** * An Async wrapper for ListRepositoryAssociations that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListRepositoryAssociationsAsync(const ListRepositoryAssociationsRequestT& request, const ListRepositoryAssociationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::ListRepositoryAssociations, request, handler, context); } /** *

Returns the list of tags associated with an associated repository * resource.

See Also:

AWS * API Reference

*/ virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const; /** * A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::ListTagsForResource, request); } /** * An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::ListTagsForResource, request, handler, context); } /** *

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; /** * A Callable wrapper for PutRecommendationFeedback that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::PutRecommendationFeedbackOutcomeCallable PutRecommendationFeedbackCallable(const PutRecommendationFeedbackRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::PutRecommendationFeedback, request); } /** * An Async wrapper for PutRecommendationFeedback that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void PutRecommendationFeedbackAsync(const PutRecommendationFeedbackRequestT& request, const PutRecommendationFeedbackResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::PutRecommendationFeedback, request, handler, context); } /** *

Adds one or more tags to an associated repository.

See Also:

* AWS * API Reference

*/ virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const; /** * A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::TagResource, request); } /** * An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::TagResource, request, handler, context); } /** *

Removes a tag from an associated repository.

See Also:

AWS * API Reference

*/ virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const; /** * A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const { return SubmitCallable(&CodeGuruReviewerClient::UntagResource, request); } /** * An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&CodeGuruReviewerClient::UntagResource, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const CodeGuruReviewerClientConfiguration& clientConfiguration); CodeGuruReviewerClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace CodeGuruReviewer } // namespace Aws