1# -*- perl -*- 2# !!! DO NOT EDIT !!! 3# This file was automatically generated. 4package Net::Amazon::Validate::ItemSearch::us::Classical; 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}}, 'Artist'; 18 push @{$self->{_options}}, 'Author'; 19 push @{$self->{_options}}, 'Availability'; 20 push @{$self->{_options}}, 'BrowseNode'; 21 push @{$self->{_options}}, 'Composer'; 22 push @{$self->{_options}}, 'Conductor'; 23 push @{$self->{_options}}, 'Count'; 24 push @{$self->{_options}}, 'Format'; 25 push @{$self->{_options}}, 'ItemPage'; 26 push @{$self->{_options}}, 'Keywords'; 27 push @{$self->{_options}}, 'Magazines'; 28 push @{$self->{_options}}, 'MusicLabel'; 29 push @{$self->{_options}}, 'Orchestra'; 30 push @{$self->{_options}}, 'Performer'; 31 push @{$self->{_options}}, 'PostalCode'; 32 push @{$self->{_options}}, 'Sort'; 33 push @{$self->{_options}}, 'State'; 34 push @{$self->{_options}}, 'Title'; 35 36 bless $self, $class; 37} 38 39sub user_or_default { 40 my ($self, $user) = @_; 41 if (defined $user && length($user) > 0) { 42 return $self->find_match($user); 43 } 44 return $self->default(); 45} 46 47sub default { 48 my ($self) = @_; 49 return $self->{_default}; 50} 51 52sub find_match { 53 my ($self, $value) = @_; 54 for (@{$self->{_options}}) { 55 return $_ if lc($_) eq lc($value); 56 } 57 die "$value is not a valid value for us::Classical!\n"; 58} 59 601; 61 62__END__ 63 64=head1 NAME 65 66Net::Amazon::Validate::ItemSearch::us::Classical - valid search indicies 67for the us locale and the Classical SearchIndex. 68 69=head1 DESCRIPTION 70 71The default value is Title, unless mode is specified. 72 73The list of available values are: 74 75 Artist 76 Author 77 Availability 78 BrowseNode 79 Composer 80 Conductor 81 Count 82 Format 83 ItemPage 84 Keywords 85 Magazines 86 MusicLabel 87 Orchestra 88 Performer 89 PostalCode 90 Sort 91 State 92 Title 93 94=cut 95