File Coverage

blib/lib/Net/Amazon/S3/Operation/Object/Restore/Request.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1             # ABSTRACT: An internal class implementing RestoreObject operation
2             $Net::Amazon::S3::Operation::Object::Restore::Request::VERSION = '0.991';
3             use strict;
4 99     99   620 use warnings;
  99         225  
  99         2457  
5 99     99   468  
  99         216  
  99         1948  
6             use Moose;
7 99     99   521 use Moose::Util::TypeConstraints;
  99         202  
  99         518  
8 99     99   519981 use MooseX::StrictConstructor 0.16;
  99         255  
  99         807  
9 99     99   181633  
  99         2163  
  99         622  
10             extends 'Net::Amazon::S3::Request::Object';
11             with 'Net::Amazon::S3::Request::Role::HTTP::Method::POST';
12             with 'Net::Amazon::S3::Request::Role::Query::Action::Restore';
13             with 'Net::Amazon::S3::Request::Role::XML::Content';
14              
15             enum 'Tier' => [ qw(Standard Expedited Bulk) ];
16             has 'days' => (is => 'ro', isa => 'Int', required => 1);
17             has 'tier' => (is => 'ro', isa => 'Tier', required => 1);
18              
19             __PACKAGE__->meta->make_immutable;
20              
21             my ($self) = @_;
22              
23 1     1   4 return $self->_build_xml (RestoreRequest => [
24             { Days => $self->days },
25 1         35 { GlacierJobParameters => [
26             { Tier => $self->tier },
27             ]},
28             ]);
29             }
30              
31             1;
32              
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             Net::Amazon::S3::Operation::Object::Restore::Request - An internal class implementing RestoreObject operation
41              
42             =head1 VERSION
43              
44             version 0.991
45              
46             =head1 DESCRIPTION
47              
48             Implements an operation L<< RestoreObject|https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html >>
49              
50             =head1 AUTHOR
51              
52             Branislav Zahradník <barney@cpan.org>
53              
54             =head1 COPYRIGHT AND LICENSE
55              
56             This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
57              
58             This is free software; you can redistribute it and/or modify it under
59             the same terms as the Perl 5 programming language system itself.
60              
61             =cut