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