blib/lib/Paws/Braket.pm untested

filter: Statementstmt 0.0% 0 / 80 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 17 Podpod 0.0% 0 / 16 totaltotal 0.0% 0 / 121 CC 5 SCAR 15.8
CC
5
Cov
0%
SearchAllDevices
12.0
SearchAllQuantumTasks
12.0
service
2.0
CRAP 4.9
1 package Paws::Braket;
2 use Moose;
3 sub service { 'braket' }
4 sub signing_name { 'braket' }
5 sub version { '2019-09-01' }
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 CancelQuantumTask {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::Braket::CancelQuantumTask', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub CreateQuantumTask {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::Braket::CreateQuantumTask', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub GetDevice {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::Braket::GetDevice', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub GetQuantumTask {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::Braket::GetQuantumTask', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub ListTagsForResource {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::Braket::ListTagsForResource', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42 sub SearchDevices {
43 my $self = shift;
44 my $call_object = $self->new_with_coercions('Paws::Braket::SearchDevices', @_);
45 return $self->caller->do_call($self, $call_object);
46 }
47 sub SearchQuantumTasks {
48 my $self = shift;
49 my $call_object = $self->new_with_coercions('Paws::Braket::SearchQuantumTasks', @_);
50 return $self->caller->do_call($self, $call_object);
51 }
52 sub TagResource {
53 my $self = shift;
54 my $call_object = $self->new_with_coercions('Paws::Braket::TagResource', @_);
55 return $self->caller->do_call($self, $call_object);
56 }
57 sub UntagResource {
58 my $self = shift;
59 my $call_object = $self->new_with_coercions('Paws::Braket::UntagResource', @_);
60 return $self->caller->do_call($self, $call_object);
61 }
62
63 sub SearchAllDevices {
64 my $self = shift;
65  
66 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
67 my $result = $self->SearchDevices(@_);
68 my $next_result = $result;
69  
70 if (not defined $callback) {
71 while ($next_result->nextToken) {
72 $next_result = $self->SearchDevices(@_, nextToken => $next_result->nextToken);
73 push @{ $result->devices }, @{ $next_result->devices };
74 }
75 return $result;
76 } else {
77 while ($result->nextToken) {
78 $callback->($_ => 'devices') foreach (@{ $result->devices });
79 $result = $self->SearchDevices(@_, nextToken => $result->nextToken);
80 }
81 $callback->($_ => 'devices') foreach (@{ $result->devices });
82 }
83  
84 return undef
85 }
86 sub SearchAllQuantumTasks {
87 my $self = shift;
88  
89 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
90 my $result = $self->SearchQuantumTasks(@_);
91 my $next_result = $result;
92  
93 if (not defined $callback) {
94 while ($next_result->nextToken) {
95 $next_result = $self->SearchQuantumTasks(@_, nextToken => $next_result->nextToken);
96 push @{ $result->quantumTasks }, @{ $next_result->quantumTasks };
97 }
98 return $result;
99 } else {
100 while ($result->nextToken) {
101 $callback->($_ => 'quantumTasks') foreach (@{ $result->quantumTasks });
102 $result = $self->SearchQuantumTasks(@_, nextToken => $result->nextToken);
103 }
104 $callback->($_ => 'quantumTasks') foreach (@{ $result->quantumTasks });
105 }
106  
107 return undef
108 }
109  
110  
111 sub operations { qw/CancelQuantumTask CreateQuantumTask GetDevice GetQuantumTask ListTagsForResource SearchDevices SearchQuantumTasks TagResource UntagResource / }
112  
113 1;
114  
115 ### main pod documentation begin ###
116  
117 =head1 NAME
118  
119 Paws::Braket - Perl Interface to AWS Braket
120  
121 =head1 SYNOPSIS
122  
123 use Paws;
124  
125 my $obj = Paws->service('Braket');
126 my $res = $obj->Method(
127 Arg1 => $val1,
128 Arg2 => [ 'V1', 'V2' ],
129 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
130 # of the arguments type
131 Arg3 => { Att1 => 'Val1' },
132 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
133 # the constructor of the arguments type
134 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
135 );
136  
137 =head1 DESCRIPTION
138  
139 The Amazon Braket API Reference provides information about the
140 operations and structures supported in Amazon Braket.
141  
142 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01>
143  
144  
145 =head1 METHODS
146  
147 =head2 CancelQuantumTask
148  
149 =over
150  
151 =item ClientToken => Str
152  
153 =item QuantumTaskArn => Str
154  
155  
156 =back
157  
158 Each argument is described in detail in: L<Paws::Braket::CancelQuantumTask>
159  
160 Returns: a L<Paws::Braket::CancelQuantumTaskResponse> instance
161  
162 Cancels the specified task.
163  
164  
165 =head2 CreateQuantumTask
166  
167 =over
168  
169 =item Action => Str
170  
171 =item ClientToken => Str
172  
173 =item DeviceArn => Str
174  
175 =item OutputS3Bucket => Str
176  
177 =item OutputS3KeyPrefix => Str
178  
179 =item Shots => Int
180  
181 =item [DeviceParameters => Str]
182  
183 =item [Tags => L<Paws::Braket::TagsMap>]
184  
185  
186 =back
187  
188 Each argument is described in detail in: L<Paws::Braket::CreateQuantumTask>
189  
190 Returns: a L<Paws::Braket::CreateQuantumTaskResponse> instance
191  
192 Creates a quantum task.
193  
194  
195 =head2 GetDevice
196  
197 =over
198  
199 =item DeviceArn => Str
200  
201  
202 =back
203  
204 Each argument is described in detail in: L<Paws::Braket::GetDevice>
205  
206 Returns: a L<Paws::Braket::GetDeviceResponse> instance
207  
208 Retrieves the devices available in Amazon Braket.
209  
210  
211 =head2 GetQuantumTask
212  
213 =over
214  
215 =item QuantumTaskArn => Str
216  
217  
218 =back
219  
220 Each argument is described in detail in: L<Paws::Braket::GetQuantumTask>
221  
222 Returns: a L<Paws::Braket::GetQuantumTaskResponse> instance
223  
224 Retrieves the specified quantum task.
225  
226  
227 =head2 ListTagsForResource
228  
229 =over
230  
231 =item ResourceArn => Str
232  
233  
234 =back
235  
236 Each argument is described in detail in: L<Paws::Braket::ListTagsForResource>
237  
238 Returns: a L<Paws::Braket::ListTagsForResourceResponse> instance
239  
240 Shows the tags associated with this resource.
241  
242  
243 =head2 SearchDevices
244  
245 =over
246  
247 =item Filters => ArrayRef[L<Paws::Braket::SearchDevicesFilter>]
248  
249 =item [MaxResults => Int]
250  
251 =item [NextToken => Str]
252  
253  
254 =back
255  
256 Each argument is described in detail in: L<Paws::Braket::SearchDevices>
257  
258 Returns: a L<Paws::Braket::SearchDevicesResponse> instance
259  
260 Searches for devices using the specified filters.
261  
262  
263 =head2 SearchQuantumTasks
264  
265 =over
266  
267 =item Filters => ArrayRef[L<Paws::Braket::SearchQuantumTasksFilter>]
268  
269 =item [MaxResults => Int]
270  
271 =item [NextToken => Str]
272  
273  
274 =back
275  
276 Each argument is described in detail in: L<Paws::Braket::SearchQuantumTasks>
277  
278 Returns: a L<Paws::Braket::SearchQuantumTasksResponse> instance
279  
280 Searches for tasks that match the specified filter values.
281  
282  
283 =head2 TagResource
284  
285 =over
286  
287 =item ResourceArn => Str
288  
289 =item Tags => L<Paws::Braket::TagsMap>
290  
291  
292 =back
293  
294 Each argument is described in detail in: L<Paws::Braket::TagResource>
295  
296 Returns: a L<Paws::Braket::TagResourceResponse> instance
297  
298 Add a tag to the specified resource.
299  
300  
301 =head2 UntagResource
302  
303 =over
304  
305 =item ResourceArn => Str
306  
307 =item TagKeys => ArrayRef[Str|Undef]
308  
309  
310 =back
311  
312 Each argument is described in detail in: L<Paws::Braket::UntagResource>
313  
314 Returns: a L<Paws::Braket::UntagResourceResponse> instance
315  
316 Remove tags from a resource.
317  
318  
319  
320  
321 =head1 PAGINATORS
322  
323 Paginator methods are helpers that repetively call methods that return partial results
324  
325 =head2 SearchAllDevices(sub { },Filters => ArrayRef[L<Paws::Braket::SearchDevicesFilter>], [MaxResults => Int, NextToken => Str])
326  
327 =head2 SearchAllDevices(Filters => ArrayRef[L<Paws::Braket::SearchDevicesFilter>], [MaxResults => Int, NextToken => Str])
328  
329  
330 If passed a sub as first parameter, it will call the sub for each element found in :
331  
332 - devices, passing the object as the first parameter, and the string 'devices' as the second parameter
333  
334 If not, it will return a a L<Paws::Braket::SearchDevicesResponse> 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.
335  
336  
337 =head2 SearchAllQuantumTasks(sub { },Filters => ArrayRef[L<Paws::Braket::SearchQuantumTasksFilter>], [MaxResults => Int, NextToken => Str])
338  
339 =head2 SearchAllQuantumTasks(Filters => ArrayRef[L<Paws::Braket::SearchQuantumTasksFilter>], [MaxResults => Int, NextToken => Str])
340  
341  
342 If passed a sub as first parameter, it will call the sub for each element found in :
343  
344 - quantumTasks, passing the object as the first parameter, and the string 'quantumTasks' as the second parameter
345  
346 If not, it will return a a L<Paws::Braket::SearchQuantumTasksResponse> 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.
347  
348  
349  
350  
351  
352 =head1 SEE ALSO
353  
354 This service class forms part of L<Paws>
355  
356 =head1 BUGS and CONTRIBUTIONS
357  
358 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
359  
360 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
361  
362 =cut
363