| 1 | # -*- perl -*- | ||
| 2 | # !!! DO NOT EDIT !!! | ||
| 3 | # This file was automatically generated. | ||
| 4 | package Net::Amazon::Validate::Type::ListSearch; | ||
| 5 | |||
| 6 | use 5.006; | ||
| 7 | use strict; | ||
| 8 | use warnings; | ||
| 9 | |||
| 10 | use constant RESPONSEGROUP_VALID_VALUES => { | ||
| 11 | 'ListInfo' => 1, | ||
| 12 | 'ListMinimum' => 1, | ||
| 13 | }; | ||
| 14 | |||
| 15 | sub new { | ||
| 16 | my ($class , %options) = @_; | ||
| 17 | my $self = { | ||
| 18 | %options, | ||
| 19 | }; | ||
| 20 | bless $self, $class; | ||
| 21 | } | ||
| 22 | |||
| 23 | sub assert { | ||
| 24 | my ($self, $value, $name, $href) = @_; | ||
| 25 | die "Unknown type in Net::Amazon::Request constructor: $value" unless defined $href->{$value}; | ||
| 26 | } | ||
| 27 | |||
| 28 | sub validate { | ||
| 29 | my ($self, $value, $name, $href) = @_; | ||
| 30 | if ( ref ($value) eq 'ARRAY' ) { | ||
| 31 | $self->assert($_, $name, $href) for (@$value); | ||
| 32 | } else { | ||
| 33 | $self->assert($value, $name, $href); | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | sub ResponseGroup { | ||
| 38 | my ($self, $value) = @_; | ||
| 39 | $self->validate($value, "ResponseGroup", (RESPONSEGROUP_VALID_VALUES)); | ||
| 40 | } | ||
| 41 | |||
| 42 | 1; |