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.98';
4 96     96   770 use strict;
  96         651  
  96         3031  
5 96     96   618 use warnings;
  96         257  
  96         2441  
6              
7 96     96   594 use Moose;
  96         241  
  96         696  
8 96     96   647337 use Moose::Util::TypeConstraints;
  96         278  
  96         1049  
9 96     96   216475 use MooseX::StrictConstructor 0.16;
  96         3281  
  96         779  
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   3 my ($self) = @_;
24              
25 1         40 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.98
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