blib/lib/Paws/IoT1ClickProjects.pm untested

filter: Statementstmt 0.0% 0 / 101 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 24 Podpod 0.0% 0 / 23 totaltotal 0.0% 0 / 156 CC 5 SCAR 14.2
CC
5
Cov
0%
ListAllPlacements
12.0
ListAllProjects
12.0
service
2.0
CRAP 4.1
1 package Paws::IoT1ClickProjects;
2 use Moose;
3 sub service { 'projects.iot1click' }
4 sub signing_name { 'iot1click' }
5 sub version { '2018-05-14' }
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 AssociateDeviceWithPlacement {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::AssociateDeviceWithPlacement', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub CreatePlacement {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::CreatePlacement', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub CreateProject {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::CreateProject', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub DeletePlacement {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::DeletePlacement', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub DeleteProject {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::DeleteProject', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42 sub DescribePlacement {
43 my $self = shift;
44 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::DescribePlacement', @_);
45 return $self->caller->do_call($self, $call_object);
46 }
47 sub DescribeProject {
48 my $self = shift;
49 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::DescribeProject', @_);
50 return $self->caller->do_call($self, $call_object);
51 }
52 sub DisassociateDeviceFromPlacement {
53 my $self = shift;
54 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::DisassociateDeviceFromPlacement', @_);
55 return $self->caller->do_call($self, $call_object);
56 }
57 sub GetDevicesInPlacement {
58 my $self = shift;
59 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::GetDevicesInPlacement', @_);
60 return $self->caller->do_call($self, $call_object);
61 }
62 sub ListPlacements {
63 my $self = shift;
64 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::ListPlacements', @_);
65 return $self->caller->do_call($self, $call_object);
66 }
67 sub ListProjects {
68 my $self = shift;
69 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::ListProjects', @_);
70 return $self->caller->do_call($self, $call_object);
71 }
72 sub ListTagsForResource {
73 my $self = shift;
74 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::ListTagsForResource', @_);
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::IoT1ClickProjects::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::IoT1ClickProjects::UntagResource', @_);
85 return $self->caller->do_call($self, $call_object);
86 }
87 sub UpdatePlacement {
88 my $self = shift;
89 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::UpdatePlacement', @_);
90 return $self->caller->do_call($self, $call_object);
91 }
92 sub UpdateProject {
93 my $self = shift;
94 my $call_object = $self->new_with_coercions('Paws::IoT1ClickProjects::UpdateProject', @_);
95 return $self->caller->do_call($self, $call_object);
96 }
97
98 sub ListAllPlacements {
99 my $self = shift;
100  
101 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
102 my $result = $self->ListPlacements(@_);
103 my $next_result = $result;
104  
105 if (not defined $callback) {
106 while ($next_result->nextToken) {
107 $next_result = $self->ListPlacements(@_, nextToken => $next_result->nextToken);
108 push @{ $result->placements }, @{ $next_result->placements };
109 }
110 return $result;
111 } else {
112 while ($result->nextToken) {
113 $callback->($_ => 'placements') foreach (@{ $result->placements });
114 $result = $self->ListPlacements(@_, nextToken => $result->nextToken);
115 }
116 $callback->($_ => 'placements') foreach (@{ $result->placements });
117 }
118  
119 return undef
120 }
121 sub ListAllProjects {
122 my $self = shift;
123  
124 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
125 my $result = $self->ListProjects(@_);
126 my $next_result = $result;
127  
128 if (not defined $callback) {
129 while ($next_result->nextToken) {
130 $next_result = $self->ListProjects(@_, nextToken => $next_result->nextToken);
131 push @{ $result->projects }, @{ $next_result->projects };
132 }
133 return $result;
134 } else {
135 while ($result->nextToken) {
136 $callback->($_ => 'projects') foreach (@{ $result->projects });
137 $result = $self->ListProjects(@_, nextToken => $result->nextToken);
138 }
139 $callback->($_ => 'projects') foreach (@{ $result->projects });
140 }
141  
142 return undef
143 }
144  
145  
146 sub operations { qw/AssociateDeviceWithPlacement CreatePlacement CreateProject DeletePlacement DeleteProject DescribePlacement DescribeProject DisassociateDeviceFromPlacement GetDevicesInPlacement ListPlacements ListProjects ListTagsForResource TagResource UntagResource UpdatePlacement UpdateProject / }
147  
148 1;
149  
150 ### main pod documentation begin ###
151  
152 =head1 NAME
153  
154 Paws::IoT1ClickProjects - Perl Interface to AWS AWS IoT 1-Click Projects Service
155  
156 =head1 SYNOPSIS
157  
158 use Paws;
159  
160 my $obj = Paws->service('IoT1ClickProjects');
161 my $res = $obj->Method(
162 Arg1 => $val1,
163 Arg2 => [ 'V1', 'V2' ],
164 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
165 # of the arguments type
166 Arg3 => { Att1 => 'Val1' },
167 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
168 # the constructor of the arguments type
169 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
170 );
171  
172 =head1 DESCRIPTION
173  
174 The AWS IoT 1-Click Projects API Reference
175  
176 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/projects.iot1click-2018-05-14>
177  
178  
179 =head1 METHODS
180  
181 =head2 AssociateDeviceWithPlacement
182  
183 =over
184  
185 =item DeviceId => Str
186  
187 =item DeviceTemplateName => Str
188  
189 =item PlacementName => Str
190  
191 =item ProjectName => Str
192  
193  
194 =back
195  
196 Each argument is described in detail in: L<Paws::IoT1ClickProjects::AssociateDeviceWithPlacement>
197  
198 Returns: a L<Paws::IoT1ClickProjects::AssociateDeviceWithPlacementResponse> instance
199  
200 Associates a physical device with a placement.
201  
202  
203 =head2 CreatePlacement
204  
205 =over
206  
207 =item PlacementName => Str
208  
209 =item ProjectName => Str
210  
211 =item [Attributes => L<Paws::IoT1ClickProjects::PlacementAttributeMap>]
212  
213  
214 =back
215  
216 Each argument is described in detail in: L<Paws::IoT1ClickProjects::CreatePlacement>
217  
218 Returns: a L<Paws::IoT1ClickProjects::CreatePlacementResponse> instance
219  
220 Creates an empty placement.
221  
222  
223 =head2 CreateProject
224  
225 =over
226  
227 =item ProjectName => Str
228  
229 =item [Description => Str]
230  
231 =item [PlacementTemplate => L<Paws::IoT1ClickProjects::PlacementTemplate>]
232  
233 =item [Tags => L<Paws::IoT1ClickProjects::TagMap>]
234  
235  
236 =back
237  
238 Each argument is described in detail in: L<Paws::IoT1ClickProjects::CreateProject>
239  
240 Returns: a L<Paws::IoT1ClickProjects::CreateProjectResponse> instance
241  
242 Creates an empty project with a placement template. A project contains
243 zero or more placements that adhere to the placement template defined
244 in the project.
245  
246  
247 =head2 DeletePlacement
248  
249 =over
250  
251 =item PlacementName => Str
252  
253 =item ProjectName => Str
254  
255  
256 =back
257  
258 Each argument is described in detail in: L<Paws::IoT1ClickProjects::DeletePlacement>
259  
260 Returns: a L<Paws::IoT1ClickProjects::DeletePlacementResponse> instance
261  
262 Deletes a placement. To delete a placement, it must not have any
263 devices associated with it.
264  
265 When you delete a placement, all associated data becomes irretrievable.
266  
267  
268 =head2 DeleteProject
269  
270 =over
271  
272 =item ProjectName => Str
273  
274  
275 =back
276  
277 Each argument is described in detail in: L<Paws::IoT1ClickProjects::DeleteProject>
278  
279 Returns: a L<Paws::IoT1ClickProjects::DeleteProjectResponse> instance
280  
281 Deletes a project. To delete a project, it must not have any placements
282 associated with it.
283  
284 When you delete a project, all associated data becomes irretrievable.
285  
286  
287 =head2 DescribePlacement
288  
289 =over
290  
291 =item PlacementName => Str
292  
293 =item ProjectName => Str
294  
295  
296 =back
297  
298 Each argument is described in detail in: L<Paws::IoT1ClickProjects::DescribePlacement>
299  
300 Returns: a L<Paws::IoT1ClickProjects::DescribePlacementResponse> instance
301  
302 Describes a placement in a project.
303  
304  
305 =head2 DescribeProject
306  
307 =over
308  
309 =item ProjectName => Str
310  
311  
312 =back
313  
314 Each argument is described in detail in: L<Paws::IoT1ClickProjects::DescribeProject>
315  
316 Returns: a L<Paws::IoT1ClickProjects::DescribeProjectResponse> instance
317  
318 Returns an object describing a project.
319  
320  
321 =head2 DisassociateDeviceFromPlacement
322  
323 =over
324  
325 =item DeviceTemplateName => Str
326  
327 =item PlacementName => Str
328  
329 =item ProjectName => Str
330  
331  
332 =back
333  
334 Each argument is described in detail in: L<Paws::IoT1ClickProjects::DisassociateDeviceFromPlacement>
335  
336 Returns: a L<Paws::IoT1ClickProjects::DisassociateDeviceFromPlacementResponse> instance
337  
338 Removes a physical device from a placement.
339  
340  
341 =head2 GetDevicesInPlacement
342  
343 =over
344  
345 =item PlacementName => Str
346  
347 =item ProjectName => Str
348  
349  
350 =back
351  
352 Each argument is described in detail in: L<Paws::IoT1ClickProjects::GetDevicesInPlacement>
353  
354 Returns: a L<Paws::IoT1ClickProjects::GetDevicesInPlacementResponse> instance
355  
356 Returns an object enumerating the devices in a placement.
357  
358  
359 =head2 ListPlacements
360  
361 =over
362  
363 =item ProjectName => Str
364  
365 =item [MaxResults => Int]
366  
367 =item [NextToken => Str]
368  
369  
370 =back
371  
372 Each argument is described in detail in: L<Paws::IoT1ClickProjects::ListPlacements>
373  
374 Returns: a L<Paws::IoT1ClickProjects::ListPlacementsResponse> instance
375  
376 Lists the placement(s) of a project.
377  
378  
379 =head2 ListProjects
380  
381 =over
382  
383 =item [MaxResults => Int]
384  
385 =item [NextToken => Str]
386  
387  
388 =back
389  
390 Each argument is described in detail in: L<Paws::IoT1ClickProjects::ListProjects>
391  
392 Returns: a L<Paws::IoT1ClickProjects::ListProjectsResponse> instance
393  
394 Lists the AWS IoT 1-Click project(s) associated with your AWS account
395 and region.
396  
397  
398 =head2 ListTagsForResource
399  
400 =over
401  
402 =item ResourceArn => Str
403  
404  
405 =back
406  
407 Each argument is described in detail in: L<Paws::IoT1ClickProjects::ListTagsForResource>
408  
409 Returns: a L<Paws::IoT1ClickProjects::ListTagsForResourceResponse> instance
410  
411 Lists the tags (metadata key/value pairs) which you have assigned to
412 the resource.
413  
414  
415 =head2 TagResource
416  
417 =over
418  
419 =item ResourceArn => Str
420  
421 =item Tags => L<Paws::IoT1ClickProjects::TagMap>
422  
423  
424 =back
425  
426 Each argument is described in detail in: L<Paws::IoT1ClickProjects::TagResource>
427  
428 Returns: a L<Paws::IoT1ClickProjects::TagResourceResponse> instance
429  
430 Creates or modifies tags for a resource. Tags are key/value pairs
431 (metadata) that can be used to manage a resource. For more information,
432 see AWS Tagging Strategies
433 (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/).
434  
435  
436 =head2 UntagResource
437  
438 =over
439  
440 =item ResourceArn => Str
441  
442 =item TagKeys => ArrayRef[Str|Undef]
443  
444  
445 =back
446  
447 Each argument is described in detail in: L<Paws::IoT1ClickProjects::UntagResource>
448  
449 Returns: a L<Paws::IoT1ClickProjects::UntagResourceResponse> instance
450  
451 Removes one or more tags (metadata key/value pairs) from a resource.
452  
453  
454 =head2 UpdatePlacement
455  
456 =over
457  
458 =item PlacementName => Str
459  
460 =item ProjectName => Str
461  
462 =item [Attributes => L<Paws::IoT1ClickProjects::PlacementAttributeMap>]
463  
464  
465 =back
466  
467 Each argument is described in detail in: L<Paws::IoT1ClickProjects::UpdatePlacement>
468  
469 Returns: a L<Paws::IoT1ClickProjects::UpdatePlacementResponse> instance
470  
471 Updates a placement with the given attributes. To clear an attribute,
472 pass an empty value (i.e., "").
473  
474  
475 =head2 UpdateProject
476  
477 =over
478  
479 =item ProjectName => Str
480  
481 =item [Description => Str]
482  
483 =item [PlacementTemplate => L<Paws::IoT1ClickProjects::PlacementTemplate>]
484  
485  
486 =back
487  
488 Each argument is described in detail in: L<Paws::IoT1ClickProjects::UpdateProject>
489  
490 Returns: a L<Paws::IoT1ClickProjects::UpdateProjectResponse> instance
491  
492 Updates a project associated with your AWS account and region. With the
493 exception of device template names, you can pass just the values that
494 need to be updated because the update request will change only the
495 values that are provided. To clear a value, pass the empty string
496 (i.e., C<"">).
497  
498  
499  
500  
501 =head1 PAGINATORS
502  
503 Paginator methods are helpers that repetively call methods that return partial results
504  
505 =head2 ListAllPlacements(sub { },ProjectName => Str, [MaxResults => Int, NextToken => Str])
506  
507 =head2 ListAllPlacements(ProjectName => Str, [MaxResults => Int, NextToken => Str])
508  
509  
510 If passed a sub as first parameter, it will call the sub for each element found in :
511  
512 - placements, passing the object as the first parameter, and the string 'placements' as the second parameter
513  
514 If not, it will return a a L<Paws::IoT1ClickProjects::ListPlacementsResponse> 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.
515  
516  
517 =head2 ListAllProjects(sub { },[MaxResults => Int, NextToken => Str])
518  
519 =head2 ListAllProjects([MaxResults => Int, NextToken => Str])
520  
521  
522 If passed a sub as first parameter, it will call the sub for each element found in :
523  
524 - projects, passing the object as the first parameter, and the string 'projects' as the second parameter
525  
526 If not, it will return a a L<Paws::IoT1ClickProjects::ListProjectsResponse> 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.
527  
528  
529  
530  
531  
532 =head1 SEE ALSO
533  
534 This service class forms part of L<Paws>
535  
536 =head1 BUGS and CONTRIBUTIONS
537  
538 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
539  
540 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
541  
542 =cut
543