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