/**
 * <p class=proto-main>This API is to push destinations from the vehicle for Last Mile Navigation, the TBM shall send the current location and target destination's data to the SDP when the TBM is connected.
 * SDP will forward the destination to consumer channel(s)
 * </p>
 *
 * <div class=proto-hier>
 * 	 UconnectAny
 * 	   |
 * 	   |---- <a href="#com.fca.uconnect.global.LastMilePush">LastMilePush lastMilePush</a>
 * 	   |
 * 	   |---- <a href="#com.fca.uconnect.global.Ack">LastMileResponse LastMileResponse (241)</a>
 *
 * </div>
 *
 *  <h3 class=change-log-hdr> Change Log</h3>
 *  <table id="change-log" class="change-log"><thead><tr>
 *	<td>Version</td><td>Date</td><td>Notes</td></tr></thead>
 *   <tbody>
 *    <tr><td>1.2</td><td>2019-07-25</td><td>Provided correct sample message per V2C-036 </td></tr>
 *    <tr><td>1.1</td><td>2018-05-15</td><td>Added ServiceRequestID </td></tr>
 *    <tr><td>1.0</td><td>2018-05-15</td><td>Release of initial proto</td></tr>
 * 	</tbody></table>
 *
 *  <h3 class=change-log-hdr>List of MQTT Topics</h3>
 *  <table class="change-log"><thead><tr>
 *	<td>Flow</td><td>Type</td><td>Topic Name</td></tr></thead>
 *    <tbody>
 *   <tr><td>Cloud send to Vehicle</td><td>Publish</td><td>fcasdp/${iot:ClientId}/LMN</td></tr>
 *	 <tr><td>Cloud receive from Vehicle</td><td>Subscribe</td><td>fcasdp/LMN/#</td></tr>
 *	 <tr><td>Vehicle send to Cloud </td><td>Publish</td><td>fcasdp/LMN/${iot:ClientId}</td></tr>
 *	 <tr><td>Vehicle receive from Cloud </td><td>Subscribe</td><td>fcasdp/${iot:ClientId}/#</td></tr>
 *	</tbody></table>
 * <h3 class=change-log-hdr>Data Flow</h3>
 * <p>The following sequence diagram depicts the flow of messages between the HU and the SDP:</p>
 *
 * <img class=img-border src=./images/LastMile.png>
 *
 * <table class=sequence-table><thead><tr>
 *	<td>Seq</td><td>Title</td><td>Role</td><td>Message</td><td>Topic</td><td>Description</td></tr></thead>
 *   <tbody>
 * <tr><td>1.</td><td>Last Mile Event</td><td>HU</td><td></td><td></td><td><p>The HU triggers Last Mile Navigation event which triggers LastMilePush to the SDP</p></td></tr>
 * <tr><td>2.</td><td>Assign MessageId</td><td>HU</td><td></td><td></td><td><p>The HU generates the messageId for the message by incrementing a sequence counter.</p></td></tr>
 * <tr><td>3.</td><td>Send LastMilePush Message</td><td>SDP</td><td>LastMilePush</td><td>${iot:ClientId}/SDTC</td><td><p>The HU populates the LastMilePush Message with the required elements and publishes to the SDP.</p></td></tr>
 * <tr><td>4.</td><td>Process Message</td><td>SDP</td><td></td><td></td><td><p>The HU processes the message and generates an LastMilePushResponse Message with the status and the correlationId set to the messageId from the received LastMilePush Message.</p></td></tr>
 * <tr><td>5.</td><td>Send DestinationPushResponse Message</td><td>SDP</td><td>LastMilePushResponse</td><td>/SDTC/${iot:ClientId}</td><td><p>The TBM publishes the response message to the HU </p></td></tr>
 * <tr><td>6.</td><td>Process Message</td><td>HU</td><td></td><td></td><td><p>The HU receives the message and verifies the correlationId matches the messageId of the sent request.</p></td></tr>
 * </tbody>
 * </table>
 */
 syntax="proto3";
 
package com.fca.uconnect.global;
//import public "Global_Uconnect_Control.proto";
import public "Global_Uconnect_VehicleInfo.proto";
/**
 * This message represents  the last mile destination.
 * {
 * "LMNRequestID": "abcdef",
 * "targetDestination": {
  *  "routePreference": "DEFAULT",
   * "createTimestamp": 1564062948246,
   * "location": {
   *   "positionLatitude": 2345.1,
   *   "positionLongitude": 2345.1,
   *   "estimatedPositionError": 1234,
   *  "positionAltitude": 2345.1,
   *   "isGPSFixNotAvailable": true,
   *   "estimatedAltitudeError": 1234,
   *   "positionDirection": 2345.1,
   *   "gpsFixTypeEnum": "ID_FIX_NO_POS"
   * },
   * "destinationPoi": {
    *  "name": "abcdef",
   *   "category": "abcdef",
   *   "id": 1234,
   *   "phoneNumber": "abcdef",
   *   "description": "abcdef",
   *   "url": "abcdef"
   * },
   * "destinationAddress": {
   *   "countryName": "abcdef",
   *   "countryCode": 1234,
   *   "provinceName": "abcdef",
   *   "provinceCode": 1234,
   *   "cityName": "abcdef",
   *   "cityCode": 1234,
   *   "districtCountyName": "abcdef",
   *   "districtCountyCode": 1234,
   *   "streetName": "abcdef",
   *   "secondUnitDesignator": "abcdef",
   *   "streetCode": 1234,
   *   "houseNumber": "abcdef",
   *   "postalCode": "abcdef"
   * }
  * },
  * "currentLocation": {
  *  "positionLatitude": 2345.1,
  *  "positionLongitude": 2345.1,
  *  "estimatedPositionError": 1234,
  *  "positionAltitude": 2345.1,
  *  "isGPSFixNotAvailable": true,
  *  "estimatedAltitudeError": 1234,
  *  "positionDirection": 2345.1,
  *  "gpsFixTypeEnum": "ID_FIX_NO_POS"
  * }
  * }
 */
message LastMilePush {

   Destination targetDestination=2; /// Final POI Destination information
   Location currentLocation = 3; /// Current Location as of Last Mile Push request
   bytes LMNRequestID = 4; /// Service Request ID Assigned by HU for Trace-ability
}
message LastMileResponse{

	enum ResponseEnum{
		SUCCESS = 0; /// Message Delivered Successful
		ERROR = 1;	/// Generic Error for Other App and System Level Errors
	}
	 ResponseEnum response = 1;
	 bytes LMNRequestID= 4; /// Assigned by the HU and used for traceability.
	 bool isTransient = 2; /// Indicates if the error is transient and to attempt a retry.
	 int32 failureReasonCode = 3; /// provide detailed error reason code.
}
//extend UconnectAny {
  //   DestinationPush destinationPush = 240;
   //  DestinationPushResponse destinationPushResponse = 241;
// }
