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