blib/lib/Paws/LocationService/Leg.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::LocationService::Leg;
3 use Moose;
4 has Distance => (is => 'ro', isa => 'Num', required => 1);
5 has DurationSeconds => (is => 'ro', isa => 'Num', required => 1);
6 has EndPosition => (is => 'ro', isa => 'ArrayRef[Num]', required => 1);
7 has Geometry => (is => 'ro', isa => 'Paws::LocationService::LegGeometry');
8 has StartPosition => (is => 'ro', isa => 'ArrayRef[Num]', required => 1);
9 has Steps => (is => 'ro', isa => 'ArrayRef[Paws::LocationService::Step]', required => 1);
10  
11 1;
12  
13 ### main pod documentation begin ###
14  
15 =head1 NAME
16  
17 Paws::LocationService::Leg
18  
19 =head1 USAGE
20  
21 This class represents one of two things:
22  
23 =head3 Arguments in a call to a service
24  
25 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
26 Each attribute should be used as a named argument in the calls that expect this type of object.
27  
28 As an example, if Att1 is expected to be a Paws::LocationService::Leg object:
29  
30 $service_obj->Method(Att1 => { Distance => $value, ..., Steps => $value });
31  
32 =head3 Results returned from an API call
33  
34 Use accessors for each attribute. If Att1 is expected to be an Paws::LocationService::Leg object:
35  
36 $result = $service_obj->Method(...);
37 $result->Att1->Distance
38  
39 =head1 DESCRIPTION
40  
41 Contains the calculated route's details for each path between a pair of
42 positions. The number of legs returned corresponds to one less than the
43 total number of positions in the request.
44  
45 For example, a route with a departure position and destination position
46 returns one leg with the positions snapped to a nearby road
47 (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road):
48  
49 =over
50  
51 =item *
52  
53 The C<StartPosition> is the departure position.
54  
55 =item *
56  
57 The C<EndPosition> is the destination position.
58  
59 =back
60  
61 A route with a waypoint between the departure and destination position
62 returns two legs with the positions snapped to a nearby road.:
63  
64 =over
65  
66 =item *
67  
68 Leg 1: The C<StartPosition> is the departure position . The
69 C<EndPosition> is the waypoint positon.
70  
71 =item *
72  
73 Leg 2: The C<StartPosition> is the waypoint position. The
74 C<EndPosition> is the destination position.
75  
76 =back
77  
78  
79 =head1 ATTRIBUTES
80  
81  
82 =head2 B<REQUIRED> Distance => Num
83  
84 The distance between the leg's C<StartPosition> and C<EndPosition>
85 along a calculated route.
86  
87 =over
88  
89 =item *
90  
91 The default measurement is C<Kilometers> unless the request specifies a
92 C<DistanceUnit> of C<Miles>.
93  
94 =back
95  
96  
97  
98 =head2 B<REQUIRED> DurationSeconds => Num
99  
100 The estimated travel time between the leg's C<StartPosition> and
101 C<EndPosition>. The travel mode and departure time that you specify in
102 the request determines the calculated time.
103  
104  
105 =head2 B<REQUIRED> EndPosition => ArrayRef[Num]
106  
107 The terminating position of the leg. Follows the format
108 C<[longitude,latitude]>.
109  
110 If the C<EndPosition> isn't located on a road, it's snapped to a nearby
111 road
112 (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road).
113  
114  
115 =head2 Geometry => L<Paws::LocationService::LegGeometry>
116  
117 Contains the calculated route's path as a linestring geometry.
118  
119  
120 =head2 B<REQUIRED> StartPosition => ArrayRef[Num]
121  
122 The starting position of the leg. Follows the format
123 C<[longitude,latitude]>.
124  
125 If the C<StartPosition> isn't located on a road, it's snapped to a
126 nearby road
127 (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road).
128  
129  
130 =head2 B<REQUIRED> Steps => ArrayRef[L<Paws::LocationService::Step>]
131  
132 Contains a list of steps, which represent subsections of a leg. Each
133 step provides instructions for how to move to the next step in the leg
134 such as the step's start position, end position, travel distance,
135 travel duration, and geometry offset.
136  
137  
138  
139 =head1 SEE ALSO
140  
141 This class forms part of L<Paws>, describing an object used in L<Paws::LocationService>
142  
143 =head1 BUGS and CONTRIBUTIONS
144  
145 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
146  
147 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
148  
149 =cut
150