File Coverage

blib/lib/Net/Google/Storage/Bucket.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1 1     1   6 use strict;
  1         2  
  1         25  
2 1     1   5 use warnings;
  1         2  
  1         44  
3             package Net::Google::Storage::Bucket;
4             $Net::Google::Storage::Bucket::VERSION = '0.2.0';
5             # ABSTRACT: Interface for a Google Storage Bucket
6             # https://developers.google.com/storage/docs/json_api/v1/buckets#resource
7              
8 1     1   5 use Moose;
  1         2  
  1         7  
9              
10 1     1   7003 use Net::Google::Storage::Types;
  1         3  
  1         156  
11              
12              
13             has id => (
14             is => 'ro',
15             isa => 'Str',
16             );
17              
18              
19             has projectId => (
20             is => 'ro',
21             isa => 'Int',
22             );
23              
24              
25             has selfLink => (
26             is => 'ro',
27             isa => 'Str'
28             );
29              
30              
31             has timeCreated => (
32             is => 'ro',
33             isa => 'Str',
34             );
35              
36              
37             has owner => (
38             is => 'ro',
39             isa => 'HashRef[Str]',
40             );
41              
42              
43             has location => (
44             is => 'rw',
45             isa => 'Net::Google::Storage::Types::BucketLocation',
46             default => 'US',
47             );
48              
49 1     1   8 no Moose;
  1         2  
  1         7  
50             __PACKAGE__->meta->make_immutable;
51              
52             1;
53              
54             __END__
55              
56             =pod
57              
58             =encoding UTF-8
59              
60             =head1 NAME
61              
62             Net::Google::Storage::Bucket - Interface for a Google Storage Bucket
63              
64             =head1 VERSION
65              
66             version 0.2.0
67              
68             =head1 DESCRIPTION
69              
70             Object for storing the data of a bucket, slightly cut down from
71             L<https://developers.google.com/storage/docs/json_api/v1/buckets#resource>.
72              
73             Generally Net::Google::Storage::Bucket objects are acquired from a
74             C<get_bucket>, C<list_buckets>, or C<insert_bucket> call on a
75             L<Net::Google::Storage> object.
76              
77             =head1 ATTRIBUTES
78              
79             =head2 id
80              
81             The name of the bucket.
82              
83             =head2 projectId
84              
85             The id of the project to which this bucket belongs.
86              
87             =head2 selfLink
88              
89             The url of this bucket.
90              
91             =head2 timeCreated
92              
93             The creation date of the bucket in
94             L<RFC3339https://tools.ietf.org/html/rfc3339> format, eg
95             C<2012-09-16T07:00:26.982Z>.
96              
97             =head2 owner
98              
99             Hashref of the owner details for the bucket - see
100             L<the docs|https://developers.google.com/storage/docs/json_api/v1/buckets#resource>.
101              
102             =head2 location
103              
104             Physical location of the servers containing this bucket, currently only C<US>
105             or C<EU>.
106              
107             =head1 AUTHOR
108              
109             Glenn Fowler <cebjyre@cpan.org>
110              
111             =head1 COPYRIGHT AND LICENSE
112              
113             This software is copyright (c) 2012 by Glenn Fowler.
114              
115             This is free software; you can redistribute it and/or modify it under
116             the same terms as the Perl 5 programming language system itself.
117              
118             =cut