1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use crate::{
    client::GoogleMapsClient,
    directions::request::{location::Location, Request},
}; // use crate

// =============================================================================

impl<'a> Request<'a> {

    // -------------------------------------------------------------------------
    //
    /// Initializes the data structure for the builder pattern.
    ///
    /// ## Arguments:
    ///
    /// This method accepts no arguments.

    pub fn new(
        client: &'a GoogleMapsClient,
        origin: Location,
        destination: Location,
    ) -> Request<'a> {

        Request {
            // Required parameters:
            client,
            destination,
            origin,
            // Optional parameters:
            alternatives: None,
            arrival_time: None,
            departure_time: None,
            language: None,
            region: None,
            restrictions: None,
            traffic_model: None,
            transit_modes: None,
            transit_route_preference: None,
            travel_mode: None,
            unit_system: None,
            waypoint_optimization: false,
            waypoints: None,
            // Internal use only:
            query: None,
            validated: false,
        } // struct

    } // fn

} // impl