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