1# -*- perl -*- 2# !!! DO NOT EDIT !!! 3# This file was automatically generated. 4package Net::Amazon::Validate::ItemSearch::jp::Condition; 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}}, 'Apparel'; 18 push @{$self->{_options}}, 'Baby'; 19 push @{$self->{_options}}, 'Books'; 20 push @{$self->{_options}}, 'Electronics'; 21 push @{$self->{_options}}, 'ForeignBooks'; 22 push @{$self->{_options}}, 'HealthPersonalCare'; 23 push @{$self->{_options}}, 'Hobbies'; 24 push @{$self->{_options}}, 'Kitchen'; 25 push @{$self->{_options}}, 'MusicTracks'; 26 push @{$self->{_options}}, 'Software'; 27 push @{$self->{_options}}, 'SportingGoods'; 28 push @{$self->{_options}}, 'Toys'; 29 push @{$self->{_options}}, 'VideoGames'; 30 push @{$self->{_options}}, 'Watches'; 31 32 bless $self, $class; 33} 34 35sub user_or_default { 36 my ($self, $user) = @_; 37 if (defined $user && length($user) > 0) { 38 return $self->find_match($user); 39 } 40 return $self->default(); 41} 42 43sub default { 44 my ($self) = @_; 45 return $self->{_default}; 46} 47 48sub find_match { 49 my ($self, $value) = @_; 50 for (@{$self->{_options}}) { 51 return $_ if lc($_) eq lc($value); 52 } 53 die "$value is not a valid value for jp::Condition!\n"; 54} 55 561; 57 58__END__ 59 60=head1 NAME 61 62Net::Amazon::Validate::ItemSearch::jp::Condition - valid search indices for the jp locale and the Condition operation. 63 64=head1 DESCRIPTION 65 66The default value is Books, unless mode is specified. 67 68The list of available values are: 69 70 Apparel 71 Baby 72 Books 73 Electronics 74 ForeignBooks 75 HealthPersonalCare 76 Hobbies 77 Kitchen 78 MusicTracks 79 Software 80 SportingGoods 81 Toys 82 VideoGames 83 Watches 84 85=cut 86