1# -*- perl -*-
2# !!! DO NOT EDIT !!!
3# This file was automatically generated.
4package Net::Amazon::Validate::ItemSearch::uk::State;
5
6use 5.006;
7use strict;
8use warnings;
9
10sub new {
11    my ($class , %options) = @_;
12    my $self = {
13        '_default' => 'Music',
14        %options,
15    };
16
17    push @{$self->{_options}}, 'Apparel';
18    push @{$self->{_options}}, 'Baby';
19    push @{$self->{_options}}, 'Classical';
20    push @{$self->{_options}}, 'DVD';
21    push @{$self->{_options}}, 'Music';
22    push @{$self->{_options}}, 'VHS';
23    push @{$self->{_options}}, 'Video';
24    push @{$self->{_options}}, 'Watches';
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 uk::State!\n";
48}
49
501;
51
52__END__
53
54=head1 NAME
55
56Net::Amazon::Validate::ItemSearch::uk::State - valid search indices for the uk locale and the State operation.
57
58=head1 DESCRIPTION
59
60The default value is Music, unless mode is specified.
61
62The list of available values are:
63
64    Apparel
65    Baby
66    Classical
67    DVD
68    Music
69    VHS
70    Video
71    Watches
72
73=cut
74