1# -*- perl -*- 2# !!! DO NOT EDIT !!! 3# This file was automatically generated. 4package Net::Amazon::Validate::ItemSearch::us::Magazines; 5 6use 5.006; 7use strict; 8use warnings; 9 10sub new { 11 my ($class , %options) = @_; 12 my $self = { 13 '_default' => 'Title', 14 %options, 15 }; 16 17 push @{$self->{_options}}, 'BrowseNode'; 18 push @{$self->{_options}}, 'Condition'; 19 push @{$self->{_options}}, 'ItemPage'; 20 push @{$self->{_options}}, 'Keywords'; 21 push @{$self->{_options}}, 'MaximumPrice'; 22 push @{$self->{_options}}, 'MerchantId'; 23 push @{$self->{_options}}, 'MinimumPrice'; 24 push @{$self->{_options}}, 'Publisher'; 25 push @{$self->{_options}}, 'Sort'; 26 push @{$self->{_options}}, 'State'; 27 push @{$self->{_options}}, 'Title'; 28 29 bless $self, $class; 30} 31 32sub user_or_default { 33 my ($self, $user) = @_; 34 if (defined $user && length($user) > 0) { 35 return $self->find_match($user); 36 } 37 return $self->default(); 38} 39 40sub default { 41 my ($self) = @_; 42 return $self->{_default}; 43} 44 45sub find_match { 46 my ($self, $value) = @_; 47 for (@{$self->{_options}}) { 48 return $_ if lc($_) eq lc($value); 49 } 50 die "$value is not a valid value for us::Magazines!\n"; 51} 52 531; 54 55__END__ 56 57=head1 NAME 58 59Net::Amazon::Validate::ItemSearch::us::Magazines - valid search indicies 60for the us locale and the Magazines SearchIndex. 61 62=head1 DESCRIPTION 63 64The default value is Title, unless mode is specified. 65 66The list of available values are: 67 68 BrowseNode 69 Condition 70 ItemPage 71 Keywords 72 MaximumPrice 73 MerchantId 74 MinimumPrice 75 Publisher 76 Sort 77 State 78 Title 79 80=cut 81