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