1# -*- perl -*-
2# !!! DO NOT EDIT !!!
3# This file was automatically generated.
4package Net::Amazon::Validate::ItemSearch::de::Toys;
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}}, 'BrowseNode';
18    push @{$self->{_options}}, 'Condition';
19    push @{$self->{_options}}, 'Count';
20    push @{$self->{_options}}, 'ItemPage';
21    push @{$self->{_options}}, 'Keywords';
22    push @{$self->{_options}}, 'MerchantId';
23    push @{$self->{_options}}, 'Sort';
24    push @{$self->{_options}}, 'Title';
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 de::Toys!\n";
48}
49
501;
51
52__END__
53
54=head1 NAME
55
56Net::Amazon::Validate::ItemSearch::de::Toys - valid search indicies
57for the de locale and the Toys SearchIndex.
58
59=head1 DESCRIPTION
60
61The default value is Title, unless mode is specified.
62
63The list of available values are:
64
65    BrowseNode
66    Condition
67    Count
68    ItemPage
69    Keywords
70    MerchantId
71    Sort
72    Title
73
74=cut
75