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