/**
 *  * <script type="text/javascript" src="rawdeflate.js"></script>
* <script type="text/javascript" src="jquery.js"></script>
* <script type="text/javascript" src="jquery_plantuml.js"></script>
*
 * <p class=proto-main>This API is to upload Data Gathered for Eco Coaching .</p>
 *
 * <div class=proto-hier>
 *   UconnectAny
 *     |
 *     |---- <a href="#com.fca.uconnect.global.UploadPagesData">UploadCoachingData UploadCoachingData </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.1</td><td>Added UploadCoachingDataResponse</td></tr>
 *   <tr><td>1.0</td><td>2018-10-16</td><td>Seperated from ConnectedPages</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}/ECO</td></tr>
 *	 <tr><td>Cloud receive from Vehicle</td><td>Subscribe</td><td>fcasdp/ECO/#</td></tr>
 *	 <tr><td>Vehicle send to Cloud </td><td>Publish</td><td>fcasdp/ECO/${iot:ClientId}</td></tr>
 *	 <tr><td>Vehicle receive from Cloud </td><td>Subscribe</td><td>fcasdp/${iot:ClientId}/ECO</td></tr>
 *	</tbody></table>
 * <h3 class=change-log-hdr>Data Flow</h3>
 *
 * <p class=proto-main>The following sequence diagram depicts the flow of messages between the TBM and the SDP:</p>
 *
 * <img class=img-border src='eco.png' />
 *
 *
 */
syntax="proto3";
package com.fca.uconnect.global;
import "Global_Uconnect_Ext_Auth.proto";


//import public "Global_Uconnect_Control.proto";
/**
 * This message is to upload trip data.
 * <div class=exmsg-main>
 * <h4>UploadPagesData Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 *  timestamp: 1508946513018
 *  messageId: 1
 *  messages {
 *  [com.fca.uconnect.global.UploadPagesData] {
 *    tripData: [bytes]
 *     }
 * }
 *	</code>
 * </div>
 * </div>
 */



message UploadCoachingData {

		string userID=1; ///Same as ID used for the Personal Login, used for routing only
		string webSite = 2; ///Targeted Web Address
		string tripID = 5; /// Trip ID for ECO
		dataUploadTypeEnum dataTyped=3; /// Data Type EcoTrip, BrandTrip, Trail, Status, Event
 		bytes tripData = 4; /// Data being uploaded
 		bytes profileToken = 6; /// Token obtained for Eco Coaching Profile

enum dataUploadTypeEnum {
	BASE=0; /// Required Default value
	ECOTRIP=1; /// Trip Data for Eco
	STATUS=4; /// Status Data to be uploaded
	EVENT=5; /// Event based data upload [i.e. Ingition Off/On]
}

		}

message UploadCoachingDataResponse {

	enum ResponseEnum{
		SUCCESS = 0; ///Success
		ERROR_OK = 1;
		ERROR_SERVICES_NOT_ACTIVATED = 2;
		ERROR_INTERNAL = 3;
		ERROR_USR_ATTACH = 4;
		ERROR_VIN_ATTACH = 5;

}
	ResponseEnum response = 1; /// Success or Failure
	bool isTransient = 2; /// Indicates if the error is transient and to attempt a retry.
	int32 failureReasonCode = 3; /// App or System Supplied Reason Code for Failures - See Error Codes page in wiki for details

		}

