/**
 * <p class=proto-main>This API is to find the location of the vehicle.
 * </p>
 *
 * <div class=proto-hier>
 * 	 UconnectAny
 * 	   |
 * 	   |---- <a href="#com.fca.uconnect.global.VehicleLocationRequest">VehicleLocationRequest</a>
 * 	   |
 *	   |---- <a href="#com.fca.uconnect.global.VehicleLocationResponse">VehicleLocationResponse</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.6</td><td>2018-09-26</td><td>Added FAILURE_SPEED_LOCKOUT to response enum</td></tr>
 * <tr><td>1.5</td><td>2018-06-20</td><td>Updated VehicleLocationUpdate period enum to milliseconds</td></tr>
 * <tr><td>1.4</td><td>2018-06-20</td><td>Added VehicleLocationUpate for periodic updates</td></tr>
 * <tr><td>1.3</td><td>2017-11-2</td><td>Update to Proto3</td></tr>
 *	<tr><td>1.0</td><td>2017-08-10</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}/VFND</td></tr>
 *	 <tr><td>Cloud receive from Vehicle</td><td>Subscribe</td><td>fcasdp/VFND/#</td></tr>
 *	 <tr><td>Vehicle send to Cloud </td><td>Publish</td><td>fcasdp/VFND/${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 TBM and the SDP:</p>
 *
 * <img class=img-border src=./images/vehfinder.png>
 *
 *
 */
 syntax="proto3";
package com.fca.uconnect.global;
// import public "Global_Uconnect_Control.proto";
import public "Global_Uconnect_VehicleInfo.proto";
/**
 * This message is for SDP to request Location of the Vehicle.
 * <div class=exmsg-main>
 * <h4>VehicleLocationRequest Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 *		timestamp: 1489804992665
 * 		messageId: 11
 * 		messages
 * 		{
 * 		 [com.fca.uconnect.global.vehicleLocationRequest]
 * 		 {
 *
 * 		 }
 * 		}
 * </code>
 * </div>
 * </div>

 */
message VehicleLocationRequest{
	bytes serviceRequestID = 1; /// Service Request ID for Vehicle Finder
}
/**
 * This message is in response to VehicleLocationRequest from SDP to Client .
 * <div class=exmsg-main>
 * <h4>VehicleLocationResponse Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 *		timestamp: 1489806024650
 * 		messageId: 3
 * 		correlationId: 12
 * 		messages
 * 		{
 * 		 [com.fca.uconnect.global.vehicleLocationResponse]
 * 		 {
 * 			response: SUCCESS
 * 			vehicleLocation
 * 		    {
 * 			 longitude: -83.67168
 * 			 latitude: 42.4804
 * 		    }
 *          timestamp: 1489806024650
 * 		 }
 * 		}
 * </code>
 * </div>
 * </div>
 */
message VehicleLocationResponse {
	 VehicleLocationResponseEnum response =1;
	enum VehicleLocationResponseEnum{
		SUCCESS=0;///VehicleLocationResponse is Successful.
		FAILURE=1;///VehicleLocationResponse is Failed.
		FAILURE_PRIVACY_ON = 2; /// VehicleFinder Response Privacy is On
		FAILURE_SPEED_LOCKOUT = 3; /// VehicleFinder Response Vehicle is motion at speed in excess of 5MPH (NAFTA ONLY)
	}
	 int64 timestamp = 2;/// The time of gps location reading which can also be from cache.
	 bytes serviceRequestID = 4; /// Service Request ID from Request
	 Location vehicleLocation = 3;
}
// extend UconnectAny {
//      VehicleLocationRequest vehicleLocationRequest = 1400;
//     VehicleLocationResponse vehicleLocationResponse= 1401;

//}

message VehicleLocationUpdate {
	Location periodicLocation = 1; /// For Periodic updates of the Vehicle Location

}

message VehicleFinderConfig {
	bool OnDemand = 1; /// Allow On Demand Updates
	bool Periodic = 2; /// Allow Periodic Updates
	bool KeyOff = 3; ///  Allow at KeyOFf (Use Only when SQDF is not present)
	UpdatePeriod updatePeriodEnum = 4; /// Periodic Selection expressed in milliseconds (K) for thousands)

	enum UpdatePeriod {
		FIVE_K = 0;
		TEN_K = 1;
		THIRTY_K = 2;
		SIXTY_K = 3;
		ONEHUNDRED_K =4;


	}
}
