« Net/Amazon/S3/Operation/Object/Restore.pm
↑ Summary
Net/Amazon/S3/Operation/Object/Restore/Response.pm »
| 1 | package Net::Amazon::S3::Operation::Object::Restore::Request; | ||
| 2 | # ABSTRACT: An internal class implementing RestoreObject operation | ||
| 3 | 99 | $Net::Amazon::S3::Operation::Object::Restore::Request::VERSION = '0.992'; | |
| 4 | 99 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 99 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 99 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 99 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 99 | ▶ | use MooseX::StrictConstructor 0.16; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 99 | extends 'Net::Amazon::S3::Request::Object'; | |
| 12 | 99 | with 'Net::Amazon::S3::Request::Role::HTTP::Method::POST'; | |
| 13 | 99 | with 'Net::Amazon::S3::Request::Role::Query::Action::Restore'; | |
| 14 | 99 | with 'Net::Amazon::S3::Request::Role::XML::Content'; | |
| 15 | |||
| 16 | 99 | enum 'Tier' => [ qw(Standard Expedited Bulk) ]; | |
| 17 | 99 | has 'days' => (is => 'ro', isa => 'Int', required => 1); | |
| 18 | 99 | has 'tier' => (is => 'ro', isa => 'Tier', required => 1); | |
| 19 | |||
| 20 | 99 | __PACKAGE__->meta->make_immutable; | |
| 21 | |||
| 22 | 1 | ▶ | sub _request_content { |
|
Subroutine
_request_content: called CC=1 SCAR=0.0
| |||
| 23 | 1 | my ($self) = @_; | |
| 24 | |||
| 25 | 1 | return $self->_build_xml (RestoreRequest => [ | |
| 26 | { Days => $self->days }, | ||
| 27 | { GlacierJobParameters => [ | ||
| 28 | { Tier => $self->tier }, | ||
| 29 | ]}, | ||
| 30 | ]); | ||
| 31 | } | ||
| 32 | |||
| 33 | 99 | 1; | |
| 34 | |||
| 35 | __END__ | ||