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