line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*- |
2
|
|
|
|
|
|
|
# !!! DO NOT EDIT !!! |
3
|
|
|
|
|
|
|
# This file was automatically generated. |
4
|
|
|
|
|
|
|
package Net::Amazon::Validate::Type::ItemLookup; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
30
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
8
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
143
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
|
|
302
|
use constant RESPONSEGROUP_VALID_VALUES => { |
11
|
|
|
|
|
|
|
'Accessories' => 1, |
12
|
|
|
|
|
|
|
'AlternateVersions' => 1, |
13
|
|
|
|
|
|
|
'BrowseNodes' => 1, |
14
|
|
|
|
|
|
|
'Collections' => 1, |
15
|
|
|
|
|
|
|
'EditorialReview' => 1, |
16
|
|
|
|
|
|
|
'Images' => 1, |
17
|
|
|
|
|
|
|
'ItemAttributes' => 1, |
18
|
|
|
|
|
|
|
'ItemIds' => 1, |
19
|
|
|
|
|
|
|
'Large' => 1, |
20
|
|
|
|
|
|
|
'ListmaniaLists' => 1, |
21
|
|
|
|
|
|
|
'Medium' => 1, |
22
|
|
|
|
|
|
|
'MerchantItemAttributes' => 1, |
23
|
|
|
|
|
|
|
'OfferFull' => 1, |
24
|
|
|
|
|
|
|
'OfferListings' => 1, |
25
|
|
|
|
|
|
|
'OfferSummary' => 1, |
26
|
|
|
|
|
|
|
'Offers' => 1, |
27
|
|
|
|
|
|
|
'PromotionDetails' => 1, |
28
|
|
|
|
|
|
|
'PromotionSummary' => 1, |
29
|
|
|
|
|
|
|
'RelatedItems' => 1, |
30
|
|
|
|
|
|
|
'Reviews' => 1, |
31
|
|
|
|
|
|
|
'SalesRank' => 1, |
32
|
|
|
|
|
|
|
'Similarities' => 1, |
33
|
|
|
|
|
|
|
'Small' => 1, |
34
|
|
|
|
|
|
|
'Subjects' => 1, |
35
|
|
|
|
|
|
|
'TaggedGuides' => 1, |
36
|
|
|
|
|
|
|
'TaggedItems' => 1, |
37
|
|
|
|
|
|
|
'TaggedListmaniaLists' => 1, |
38
|
|
|
|
|
|
|
'Tags' => 1, |
39
|
|
|
|
|
|
|
'TagsSummary' => 1, |
40
|
|
|
|
|
|
|
'Tracks' => 1, |
41
|
|
|
|
|
|
|
'VariationImages' => 1, |
42
|
|
|
|
|
|
|
'VariationMatrix' => 1, |
43
|
|
|
|
|
|
|
'VariationMinimum' => 1, |
44
|
|
|
|
|
|
|
'VariationOffers' => 1, |
45
|
|
|
|
|
|
|
'VariationSummary' => 1, |
46
|
|
|
|
|
|
|
'Variations' => 1, |
47
|
1
|
|
|
1
|
|
5
|
}; |
|
1
|
|
|
|
|
2
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub new { |
50
|
2
|
|
|
2
|
0
|
7
|
my ($class , %options) = @_; |
51
|
2
|
|
|
|
|
4
|
my $self = { |
52
|
|
|
|
|
|
|
%options, |
53
|
|
|
|
|
|
|
}; |
54
|
2
|
|
|
|
|
9
|
bless $self, $class; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub assert { |
58
|
2
|
|
|
2
|
0
|
4
|
my ($self, $value, $name, $href) = @_; |
59
|
2
|
50
|
|
|
|
13
|
die "Unknown type in Net::Amazon::Request constructor: $value" unless defined $href->{$value}; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub validate { |
63
|
2
|
|
|
2
|
0
|
5
|
my ($self, $value, $name, $href) = @_; |
64
|
2
|
50
|
|
|
|
7
|
if ( ref ($value) eq 'ARRAY' ) { |
65
|
0
|
|
|
|
|
0
|
$self->assert($_, $name, $href) for (@$value); |
66
|
|
|
|
|
|
|
} else { |
67
|
2
|
|
|
|
|
7
|
$self->assert($value, $name, $href); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub ResponseGroup { |
72
|
2
|
|
|
2
|
0
|
6
|
my ($self, $value) = @_; |
73
|
2
|
|
|
|
|
6
|
$self->validate($value, "ResponseGroup", (RESPONSEGROUP_VALID_VALUES)); |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |