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