blib/lib/Paws/CodeGuruReviewer.pm untested

filter: Statementstmt 0.0% 0 / 75 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 21 Podpod 0.0% 0 / 20 totaltotal 0.0% 0 / 120 CC 3 SCAR 12.0
CC
3
Cov
0%
ListAllRepositoryAssociations
12.0
service
2.0
signing_name
2.0
CRAP 3.3
1 package Paws::CodeGuruReviewer;
2 use Moose;
3 sub service { 'codeguru-reviewer' }
4 sub signing_name { 'codeguru-reviewer' }
5 sub version { '2019-09-19' }
6 sub flattened_arrays { 0 }
7 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8 has retry => (is => 'ro', isa => 'HashRef', default => sub {
9 { base => 'rand', type => 'exponential', growth_factor => 2 }
10 });
11 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12 ] });
13  
14 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::RestJsonCaller';
15  
16
17 sub AssociateRepository {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::AssociateRepository', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub CreateCodeReview {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::CreateCodeReview', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub DescribeCodeReview {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::DescribeCodeReview', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub DescribeRecommendationFeedback {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::DescribeRecommendationFeedback', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub DescribeRepositoryAssociation {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::DescribeRepositoryAssociation', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42 sub DisassociateRepository {
43 my $self = shift;
44 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::DisassociateRepository', @_);
45 return $self->caller->do_call($self, $call_object);
46 }
47 sub ListCodeReviews {
48 my $self = shift;
49 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::ListCodeReviews', @_);
50 return $self->caller->do_call($self, $call_object);
51 }
52 sub ListRecommendationFeedback {
53 my $self = shift;
54 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::ListRecommendationFeedback', @_);
55 return $self->caller->do_call($self, $call_object);
56 }
57 sub ListRecommendations {
58 my $self = shift;
59 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::ListRecommendations', @_);
60 return $self->caller->do_call($self, $call_object);
61 }
62 sub ListRepositoryAssociations {
63 my $self = shift;
64 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::ListRepositoryAssociations', @_);
65 return $self->caller->do_call($self, $call_object);
66 }
67 sub ListTagsForResource {
68 my $self = shift;
69 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::ListTagsForResource', @_);
70 return $self->caller->do_call($self, $call_object);
71 }
72 sub PutRecommendationFeedback {
73 my $self = shift;
74 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::PutRecommendationFeedback', @_);
75 return $self->caller->do_call($self, $call_object);
76 }
77 sub TagResource {
78 my $self = shift;
79 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::TagResource', @_);
80 return $self->caller->do_call($self, $call_object);
81 }
82 sub UntagResource {
83 my $self = shift;
84 my $call_object = $self->new_with_coercions('Paws::CodeGuruReviewer::UntagResource', @_);
85 return $self->caller->do_call($self, $call_object);
86 }
87
88 sub ListAllRepositoryAssociations {
89 my $self = shift;
90  
91 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
92 my $result = $self->ListRepositoryAssociations(@_);
93 my $next_result = $result;
94  
95 if (not defined $callback) {
96 while ($next_result->NextToken) {
97 $next_result = $self->ListRepositoryAssociations(@_, NextToken => $next_result->NextToken);
98 push @{ $result->RepositoryAssociationSummaries }, @{ $next_result->RepositoryAssociationSummaries };
99 }
100 return $result;
101 } else {
102 while ($result->NextToken) {
103 $callback->($_ => 'RepositoryAssociationSummaries') foreach (@{ $result->RepositoryAssociationSummaries });
104 $result = $self->ListRepositoryAssociations(@_, NextToken => $result->NextToken);
105 }
106 $callback->($_ => 'RepositoryAssociationSummaries') foreach (@{ $result->RepositoryAssociationSummaries });
107 }
108  
109 return undef
110 }
111  
112  
113 sub operations { qw/AssociateRepository CreateCodeReview DescribeCodeReview DescribeRecommendationFeedback DescribeRepositoryAssociation DisassociateRepository ListCodeReviews ListRecommendationFeedback ListRecommendations ListRepositoryAssociations ListTagsForResource PutRecommendationFeedback TagResource UntagResource / }
114  
115 1;
116  
117 ### main pod documentation begin ###
118  
119 =head1 NAME
120  
121 Paws::CodeGuruReviewer - Perl Interface to AWS Amazon CodeGuru Reviewer
122  
123 =head1 SYNOPSIS
124  
125 use Paws;
126  
127 my $obj = Paws->service('CodeGuruReviewer');
128 my $res = $obj->Method(
129 Arg1 => $val1,
130 Arg2 => [ 'V1', 'V2' ],
131 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
132 # of the arguments type
133 Arg3 => { Att1 => 'Val1' },
134 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
135 # the constructor of the arguments type
136 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
137 );
138  
139 =head1 DESCRIPTION
140  
141 This section provides documentation for the Amazon CodeGuru Reviewer
142 API operations. CodeGuru Reviewer is a service that uses program
143 analysis and machine learning to detect potential defects that are
144 difficult for developers to find and recommends fixes in your Java and
145 Python code.
146  
147 By proactively detecting and providing recommendations for addressing
148 code defects and implementing best practices, CodeGuru Reviewer
149 improves the overall quality and maintainability of your code base
150 during the code review stage. For more information about CodeGuru
151 Reviewer, see the I< Amazon CodeGuru Reviewer User Guide
152 (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/welcome.html).>
153  
154 To improve the security of your CodeGuru Reviewer API calls, you can
155 establish a private connection between your VPC and CodeGuru Reviewer
156 by creating an I<interface VPC endpoint>. For more information, see
157 CodeGuru Reviewer and interface VPC endpoints (AWS PrivateLink)
158 (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/vpc-interface-endpoints.html)
159 in the I<Amazon CodeGuru Reviewer User Guide>.
160  
161 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19>
162  
163  
164 =head1 METHODS
165  
166 =head2 AssociateRepository
167  
168 =over
169  
170 =item Repository => L<Paws::CodeGuruReviewer::Repository>
171  
172 =item [ClientRequestToken => Str]
173  
174 =item [KMSKeyDetails => L<Paws::CodeGuruReviewer::KMSKeyDetails>]
175  
176 =item [Tags => L<Paws::CodeGuruReviewer::TagMap>]
177  
178  
179 =back
180  
181 Each argument is described in detail in: L<Paws::CodeGuruReviewer::AssociateRepository>
182  
183 Returns: a L<Paws::CodeGuruReviewer::AssociateRepositoryResponse> instance
184  
185 Use to associate an AWS CodeCommit repository or a repostory managed by
186 AWS CodeStar Connections with Amazon CodeGuru Reviewer. When you
187 associate a repository, CodeGuru Reviewer reviews source code changes
188 in the repository's pull requests and provides automatic
189 recommendations. You can view recommendations using the CodeGuru
190 Reviewer console. For more information, see Recommendations in Amazon
191 CodeGuru Reviewer
192 (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/recommendations.html)
193 in the I<Amazon CodeGuru Reviewer User Guide.>
194  
195 If you associate a CodeCommit or S3 repository, it must be in the same
196 AWS Region and AWS account where its CodeGuru Reviewer code reviews are
197 configured.
198  
199 Bitbucket and GitHub Enterprise Server repositories are managed by AWS
200 CodeStar Connections to connect to CodeGuru Reviewer. For more
201 information, see Associate a repository
202 (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-associate-repository.html)
203 in the I<Amazon CodeGuru Reviewer User Guide.>
204  
205 You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a
206 GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub
207 repository, use the console. For more information, see Getting started
208 with CodeGuru Reviewer
209 (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-with-guru.html)
210 in the I<CodeGuru Reviewer User Guide.>
211  
212  
213 =head2 CreateCodeReview
214  
215 =over
216  
217 =item Name => Str
218  
219 =item RepositoryAssociationArn => Str
220  
221 =item Type => L<Paws::CodeGuruReviewer::CodeReviewType>
222  
223 =item [ClientRequestToken => Str]
224  
225  
226 =back
227  
228 Each argument is described in detail in: L<Paws::CodeGuruReviewer::CreateCodeReview>
229  
230 Returns: a L<Paws::CodeGuruReviewer::CreateCodeReviewResponse> instance
231  
232 Use to create a code review with a C<CodeReviewType>
233 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html)
234 of C<RepositoryAnalysis>. This type of code review analyzes all code
235 under a specified branch in an associated repository. C<PullRequest>
236 code reviews are automatically triggered by a pull request.
237  
238  
239 =head2 DescribeCodeReview
240  
241 =over
242  
243 =item CodeReviewArn => Str
244  
245  
246 =back
247  
248 Each argument is described in detail in: L<Paws::CodeGuruReviewer::DescribeCodeReview>
249  
250 Returns: a L<Paws::CodeGuruReviewer::DescribeCodeReviewResponse> instance
251  
252 Returns the metadata associated with the code review along with its
253 status.
254  
255  
256 =head2 DescribeRecommendationFeedback
257  
258 =over
259  
260 =item CodeReviewArn => Str
261  
262 =item RecommendationId => Str
263  
264 =item [UserId => Str]
265  
266  
267 =back
268  
269 Each argument is described in detail in: L<Paws::CodeGuruReviewer::DescribeRecommendationFeedback>
270  
271 Returns: a L<Paws::CodeGuruReviewer::DescribeRecommendationFeedbackResponse> instance
272  
273 Describes the customer feedback for a CodeGuru Reviewer recommendation.
274  
275  
276 =head2 DescribeRepositoryAssociation
277  
278 =over
279  
280 =item AssociationArn => Str
281  
282  
283 =back
284  
285 Each argument is described in detail in: L<Paws::CodeGuruReviewer::DescribeRepositoryAssociation>
286  
287 Returns: a L<Paws::CodeGuruReviewer::DescribeRepositoryAssociationResponse> instance
288  
289 Returns a C<RepositoryAssociation>
290 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html)
291 object that contains information about the requested repository
292 association.
293  
294  
295 =head2 DisassociateRepository
296  
297 =over
298  
299 =item AssociationArn => Str
300  
301  
302 =back
303  
304 Each argument is described in detail in: L<Paws::CodeGuruReviewer::DisassociateRepository>
305  
306 Returns: a L<Paws::CodeGuruReviewer::DisassociateRepositoryResponse> instance
307  
308 Removes the association between Amazon CodeGuru Reviewer and a
309 repository.
310  
311  
312 =head2 ListCodeReviews
313  
314 =over
315  
316 =item Type => Str
317  
318 =item [MaxResults => Int]
319  
320 =item [NextToken => Str]
321  
322 =item [ProviderTypes => ArrayRef[Str|Undef]]
323  
324 =item [RepositoryNames => ArrayRef[Str|Undef]]
325  
326 =item [States => ArrayRef[Str|Undef]]
327  
328  
329 =back
330  
331 Each argument is described in detail in: L<Paws::CodeGuruReviewer::ListCodeReviews>
332  
333 Returns: a L<Paws::CodeGuruReviewer::ListCodeReviewsResponse> instance
334  
335 Lists all the code reviews that the customer has created in the past 90
336 days.
337  
338  
339 =head2 ListRecommendationFeedback
340  
341 =over
342  
343 =item CodeReviewArn => Str
344  
345 =item [MaxResults => Int]
346  
347 =item [NextToken => Str]
348  
349 =item [RecommendationIds => ArrayRef[Str|Undef]]
350  
351 =item [UserIds => ArrayRef[Str|Undef]]
352  
353  
354 =back
355  
356 Each argument is described in detail in: L<Paws::CodeGuruReviewer::ListRecommendationFeedback>
357  
358 Returns: a L<Paws::CodeGuruReviewer::ListRecommendationFeedbackResponse> instance
359  
360 Returns a list of C<RecommendationFeedbackSummary>
361 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RecommendationFeedbackSummary.html)
362 objects that contain customer recommendation feedback for all CodeGuru
363 Reviewer users.
364  
365  
366 =head2 ListRecommendations
367  
368 =over
369  
370 =item CodeReviewArn => Str
371  
372 =item [MaxResults => Int]
373  
374 =item [NextToken => Str]
375  
376  
377 =back
378  
379 Each argument is described in detail in: L<Paws::CodeGuruReviewer::ListRecommendations>
380  
381 Returns: a L<Paws::CodeGuruReviewer::ListRecommendationsResponse> instance
382  
383 Returns the list of all recommendations for a completed code review.
384  
385  
386 =head2 ListRepositoryAssociations
387  
388 =over
389  
390 =item [MaxResults => Int]
391  
392 =item [Names => ArrayRef[Str|Undef]]
393  
394 =item [NextToken => Str]
395  
396 =item [Owners => ArrayRef[Str|Undef]]
397  
398 =item [ProviderTypes => ArrayRef[Str|Undef]]
399  
400 =item [States => ArrayRef[Str|Undef]]
401  
402  
403 =back
404  
405 Each argument is described in detail in: L<Paws::CodeGuruReviewer::ListRepositoryAssociations>
406  
407 Returns: a L<Paws::CodeGuruReviewer::ListRepositoryAssociationsResponse> instance
408  
409 Returns a list of C<RepositoryAssociationSummary>
410 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html)
411 objects that contain summary information about a repository
412 association. You can filter the returned list by C<ProviderType>
413 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-ProviderType),
414 C<Name>
415 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Name),
416 C<State>
417 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-State),
418 and C<Owner>
419 (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Owner).
420  
421  
422 =head2 ListTagsForResource
423  
424 =over
425  
426 =item ResourceArn => Str
427  
428  
429 =back
430  
431 Each argument is described in detail in: L<Paws::CodeGuruReviewer::ListTagsForResource>
432  
433 Returns: a L<Paws::CodeGuruReviewer::ListTagsForResourceResponse> instance
434  
435 Returns the list of tags associated with an associated repository
436 resource.
437  
438  
439 =head2 PutRecommendationFeedback
440  
441 =over
442  
443 =item CodeReviewArn => Str
444  
445 =item Reactions => ArrayRef[Str|Undef]
446  
447 =item RecommendationId => Str
448  
449  
450 =back
451  
452 Each argument is described in detail in: L<Paws::CodeGuruReviewer::PutRecommendationFeedback>
453  
454 Returns: a L<Paws::CodeGuruReviewer::PutRecommendationFeedbackResponse> instance
455  
456 Stores customer feedback for a CodeGuru Reviewer recommendation. When
457 this API is called again with different reactions the previous feedback
458 is overwritten.
459  
460  
461 =head2 TagResource
462  
463 =over
464  
465 =item ResourceArn => Str
466  
467 =item Tags => L<Paws::CodeGuruReviewer::TagMap>
468  
469  
470 =back
471  
472 Each argument is described in detail in: L<Paws::CodeGuruReviewer::TagResource>
473  
474 Returns: a L<Paws::CodeGuruReviewer::TagResourceResponse> instance
475  
476 Adds one or more tags to an associated repository.
477  
478  
479 =head2 UntagResource
480  
481 =over
482  
483 =item ResourceArn => Str
484  
485 =item TagKeys => ArrayRef[Str|Undef]
486  
487  
488 =back
489  
490 Each argument is described in detail in: L<Paws::CodeGuruReviewer::UntagResource>
491  
492 Returns: a L<Paws::CodeGuruReviewer::UntagResourceResponse> instance
493  
494 Removes a tag from an associated repository.
495  
496  
497  
498  
499 =head1 PAGINATORS
500  
501 Paginator methods are helpers that repetively call methods that return partial results
502  
503 =head2 ListAllRepositoryAssociations(sub { },[MaxResults => Int, Names => ArrayRef[Str|Undef], NextToken => Str, Owners => ArrayRef[Str|Undef], ProviderTypes => ArrayRef[Str|Undef], States => ArrayRef[Str|Undef]])
504  
505 =head2 ListAllRepositoryAssociations([MaxResults => Int, Names => ArrayRef[Str|Undef], NextToken => Str, Owners => ArrayRef[Str|Undef], ProviderTypes => ArrayRef[Str|Undef], States => ArrayRef[Str|Undef]])
506  
507  
508 If passed a sub as first parameter, it will call the sub for each element found in :
509  
510 - RepositoryAssociationSummaries, passing the object as the first parameter, and the string 'RepositoryAssociationSummaries' as the second parameter
511  
512 If not, it will return a a L<Paws::CodeGuruReviewer::ListRepositoryAssociationsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
513  
514  
515  
516  
517  
518 =head1 SEE ALSO
519  
520 This service class forms part of L<Paws>
521  
522 =head1 BUGS and CONTRIBUTIONS
523  
524 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
525  
526 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
527  
528 =cut
529