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