« blib/lib/Paws/LocationService/BatchUpdateDevicePositionResponse.pm
↑ Summary
blib/lib/Paws/LocationService/CalculateRouteCarModeOptions.pm »
| 1 | |||
| 2 | package Paws::LocationService::CalculateRoute; | ||
| 3 | use Moose; | ||
| 4 | has CalculatorName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'CalculatorName', required => 1); | ||
| 5 | has CarModeOptions => (is => 'ro', isa => 'Paws::LocationService::CalculateRouteCarModeOptions'); | ||
| 6 | has DepartNow => (is => 'ro', isa => 'Bool'); | ||
| 7 | has DeparturePosition => (is => 'ro', isa => 'ArrayRef[Num]', required => 1); | ||
| 8 | has DepartureTime => (is => 'ro', isa => 'Str'); | ||
| 9 | has DestinationPosition => (is => 'ro', isa => 'ArrayRef[Num]', required => 1); | ||
| 10 | has DistanceUnit => (is => 'ro', isa => 'Str'); | ||
| 11 | has IncludeLegGeometry => (is => 'ro', isa => 'Bool'); | ||
| 12 | has TravelMode => (is => 'ro', isa => 'Str'); | ||
| 13 | has TruckModeOptions => (is => 'ro', isa => 'Paws::LocationService::CalculateRouteTruckModeOptions'); | ||
| 14 | has WaypointPositions => (is => 'ro', isa => 'ArrayRef[ArrayRef[Num]]'); | ||
| 15 | |||
| 16 | use MooseX::ClassAttribute; | ||
| 17 | |||
| 18 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CalculateRoute'); | ||
| 19 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/routes/v0/calculators/{CalculatorName}/calculate/route'); | ||
| 20 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 21 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LocationService::CalculateRouteResponse'); | ||
| 22 | 1; | ||
| 23 | |||
| 24 | ### main pod documentation begin ### | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | Paws::LocationService::CalculateRoute - Arguments for method CalculateRoute on L<Paws::LocationService> | ||
| 29 | |||
| 30 | =head1 DESCRIPTION | ||
| 31 | |||
| 32 | This class represents the parameters used for calling the method CalculateRoute on the | ||
| 33 | L<Amazon Location Service|Paws::LocationService> service. Use the attributes of this class | ||
| 34 | as arguments to method CalculateRoute. | ||
| 35 | |||
| 36 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CalculateRoute. | ||
| 37 | |||
| 38 | =head1 SYNOPSIS | ||
| 39 | |||
| 40 | my $geo = Paws->service('LocationService'); | ||
| 41 | my $CalculateRouteResponse = $geo->CalculateRoute( | ||
| 42 | CalculatorName => 'MyResourceName', | ||
| 43 | DeparturePosition => [ 1, ... ], | ||
| 44 | DestinationPosition => [ 1, ... ], | ||
| 45 | CarModeOptions => { | ||
| 46 | AvoidFerries => 1, # OPTIONAL | ||
| 47 | AvoidTolls => 1, # OPTIONAL | ||
| 48 | }, # OPTIONAL | ||
| 49 | DepartNow => 1, # OPTIONAL | ||
| 50 | DepartureTime => '1970-01-01T01:00:00', # OPTIONAL | ||
| 51 | DistanceUnit => 'Kilometers', # OPTIONAL | ||
| 52 | IncludeLegGeometry => 1, # OPTIONAL | ||
| 53 | TravelMode => 'Car', # OPTIONAL | ||
| 54 | TruckModeOptions => { | ||
| 55 | AvoidFerries => 1, # OPTIONAL | ||
| 56 | AvoidTolls => 1, # OPTIONAL | ||
| 57 | Dimensions => { | ||
| 58 | Height => 1, # OPTIONAL | ||
| 59 | Length => 1, # OPTIONAL | ||
| 60 | Unit => 'Meters', # values: Meters, Feet; OPTIONAL | ||
| 61 | Width => 1, # OPTIONAL | ||
| 62 | }, # OPTIONAL | ||
| 63 | Weight => { | ||
| 64 | Total => 1, # OPTIONAL | ||
| 65 | Unit => 'Kilograms', # values: Kilograms, Pounds; OPTIONAL | ||
| 66 | }, # OPTIONAL | ||
| 67 | }, # OPTIONAL | ||
| 68 | WaypointPositions => [ | ||
| 69 | [ 1, ... ], ... # min: 2, max: 2 | ||
| 70 | ], # OPTIONAL | ||
| 71 | ); | ||
| 72 | |||
| 73 | # Results: | ||
| 74 | my $Legs = $CalculateRouteResponse->Legs; | ||
| 75 | my $Summary = $CalculateRouteResponse->Summary; | ||
| 76 | |||
| 77 | # Returns a L<Paws::LocationService::CalculateRouteResponse> object. | ||
| 78 | |||
| 79 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 80 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/geo/CalculateRoute> | ||
| 81 | |||
| 82 | =head1 ATTRIBUTES | ||
| 83 | |||
| 84 | |||
| 85 | =head2 B<REQUIRED> CalculatorName => Str | ||
| 86 | |||
| 87 | The name of the route calculator resource that you want to use to | ||
| 88 | calculate a route. | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | =head2 CarModeOptions => L<Paws::LocationService::CalculateRouteCarModeOptions> | ||
| 93 | |||
| 94 | Specifies route preferences when traveling by C<Car>, such as avoiding | ||
| 95 | routes that use ferries or tolls. | ||
| 96 | |||
| 97 | Requirements: C<TravelMode> must be specified as C<Car>. | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 DepartNow => Bool | ||
| 102 | |||
| 103 | Sets the time of departure as the current time. Uses the current time | ||
| 104 | to calculate a route. Otherwise, the best time of day to travel with | ||
| 105 | the best traffic conditions is used to calculate the route. | ||
| 106 | |||
| 107 | Default Value: C<false> | ||
| 108 | |||
| 109 | Valid Values: C<false> | C<true> | ||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | =head2 B<REQUIRED> DeparturePosition => ArrayRef[Num] | ||
| 114 | |||
| 115 | The start position for the route. Defined in WGS 84 | ||
| 116 | (https://earth-info.nga.mil/GandG/wgs84/index.html) format: | ||
| 117 | C<[longitude, latitude]>. | ||
| 118 | |||
| 119 | =over | ||
| 120 | |||
| 121 | =item * | ||
| 122 | |||
| 123 | For example, C<[-123.115, 49.285]> | ||
| 124 | |||
| 125 | =back | ||
| 126 | |||
| 127 | If you specify a departure that's not located on a road, Amazon | ||
| 128 | Location moves the position to the nearest road | ||
| 129 | (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road). | ||
| 130 | |||
| 131 | Valid Values: C<[-180 to 180,-90 to 90]> | ||
| 132 | |||
| 133 | |||
| 134 | |||
| 135 | =head2 DepartureTime => Str | ||
| 136 | |||
| 137 | Specifies the desired time of departure. Uses the given time to | ||
| 138 | calculate a route. Otherwise, the best time of day to travel with the | ||
| 139 | best traffic conditions is used to calculate the route. | ||
| 140 | |||
| 141 | Setting a departure time in the past returns a C<400 | ||
| 142 | ValidationException> error. | ||
| 143 | |||
| 144 | =over | ||
| 145 | |||
| 146 | =item * | ||
| 147 | |||
| 148 | In ISO 8601 (https://www.iso.org/iso-8601-date-and-time-format.html) | ||
| 149 | format: C<YYYY-MM-DDThh:mm:ss.sssZ>. For example, | ||
| 150 | C<2020E<ndash>07-2T12:15:20.000Z+01:00> | ||
| 151 | |||
| 152 | =back | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | |||
| 157 | =head2 B<REQUIRED> DestinationPosition => ArrayRef[Num] | ||
| 158 | |||
| 159 | The finish position for the route. Defined in WGS 84 | ||
| 160 | (https://earth-info.nga.mil/GandG/wgs84/index.html) format: | ||
| 161 | C<[longitude, latitude]>. | ||
| 162 | |||
| 163 | =over | ||
| 164 | |||
| 165 | =item * | ||
| 166 | |||
| 167 | For example, C<[-122.339, 47.615]> | ||
| 168 | |||
| 169 | =back | ||
| 170 | |||
| 171 | If you specify a destination that's not located on a road, Amazon | ||
| 172 | Location moves the position to the nearest road | ||
| 173 | (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road). | ||
| 174 | |||
| 175 | Valid Values: C<[-180 to 180,-90 to 90]> | ||
| 176 | |||
| 177 | |||
| 178 | |||
| 179 | =head2 DistanceUnit => Str | ||
| 180 | |||
| 181 | Set the unit system to specify the distance. | ||
| 182 | |||
| 183 | Default Value: C<Kilometers> | ||
| 184 | |||
| 185 | Valid values are: C<"Kilometers">, C<"Miles"> | ||
| 186 | |||
| 187 | =head2 IncludeLegGeometry => Bool | ||
| 188 | |||
| 189 | Set to include the geometry details in the result for each path between | ||
| 190 | a pair of positions. | ||
| 191 | |||
| 192 | Default Value: C<false> | ||
| 193 | |||
| 194 | Valid Values: C<false> | C<true> | ||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | =head2 TravelMode => Str | ||
| 199 | |||
| 200 | Specifies the mode of transport when calculating a route. Used in | ||
| 201 | estimating the speed of travel and road compatibility. | ||
| 202 | |||
| 203 | The C<TravelMode> you specify determines how you specify route | ||
| 204 | preferences: | ||
| 205 | |||
| 206 | =over | ||
| 207 | |||
| 208 | =item * | ||
| 209 | |||
| 210 | If traveling by C<Car> use the C<CarModeOptions> parameter. | ||
| 211 | |||
| 212 | =item * | ||
| 213 | |||
| 214 | If traveling by C<Truck> use the C<TruckModeOptions> parameter. | ||
| 215 | |||
| 216 | =back | ||
| 217 | |||
| 218 | Default Value: C<Car> | ||
| 219 | |||
| 220 | Valid values are: C<"Car">, C<"Truck">, C<"Walking"> | ||
| 221 | |||
| 222 | =head2 TruckModeOptions => L<Paws::LocationService::CalculateRouteTruckModeOptions> | ||
| 223 | |||
| 224 | Specifies route preferences when traveling by C<Truck>, such as | ||
| 225 | avoiding routes that use ferries or tolls, and truck specifications to | ||
| 226 | consider when choosing an optimal road. | ||
| 227 | |||
| 228 | Requirements: C<TravelMode> must be specified as C<Truck>. | ||
| 229 | |||
| 230 | |||
| 231 | |||
| 232 | =head2 WaypointPositions => ArrayRef[ArrayRef[Num]] | ||
| 233 | |||
| 234 | Specifies an ordered list of up to 23 intermediate positions to include | ||
| 235 | along a route between the departure position and destination position. | ||
| 236 | |||
| 237 | =over | ||
| 238 | |||
| 239 | =item * | ||
| 240 | |||
| 241 | For example, from the C<DeparturePosition> C<[-123.115, 49.285]>, the | ||
| 242 | route follows the order that the waypoint positions are given | ||
| 243 | C<[[-122.757, 49.0021],[-122.349, 47.620]]> | ||
| 244 | |||
| 245 | =back | ||
| 246 | |||
| 247 | If you specify a waypoint position that's not located on a road, Amazon | ||
| 248 | Location moves the position to the nearest road | ||
| 249 | (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road). | ||
| 250 | |||
| 251 | Specifying more than 23 waypoints returns a C<400 ValidationException> | ||
| 252 | error. | ||
| 253 | |||
| 254 | Valid Values: C<[-180 to 180,-90 to 90]> | ||
| 255 | |||
| 256 | |||
| 257 | |||
| 258 | |||
| 259 | =head1 SEE ALSO | ||
| 260 | |||
| 261 | This class forms part of L<Paws>, documenting arguments for method CalculateRoute in L<Paws::LocationService> | ||
| 262 | |||
| 263 | =head1 BUGS and CONTRIBUTIONS | ||
| 264 | |||
| 265 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 266 | |||
| 267 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 268 | |||
| 269 | =cut | ||
| 270 |