/**
 * <p class=proto-main>This API supports the Remote Inhibits.</p>
 *
 * <div class=proto-hier>
 *   UconnectAny
 *     |
 *     |---- <a href="#com.fca.uconnect.global.RemoteInhibitRequest">RemoteInhibitRequest remoteInhibitRequest ()</a>
 *     |---- <a href="#com.fca.uconnect.global.RemoteInhibitResponse"> RemoteInhibitResponse  remoteInhibitResponse () </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>2018-08-15</td><td>Changed CrankAttempted boolean to isCrankAttempted </td></tr>
 * <tr><td>1.0</td><td>2018-06-18</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}/RI/${AppID}</td></tr>
 *	 <tr><td>Cloud receive from Vehicle</td><td>Subscribe</td><td>fcasdp/RI/${AppID}/#</td></tr>
 *	 <tr><td>Vehicle send to Cloud </td><td>Publish</td><td>fcasdp/RI/${AppID}/${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/remoteinhib.png>
 *
 * <table class=sequence-table><thead><tr>
 *	<td>Sequence</td><td>Title</td><td>Role</td><td>Message</td><td>Topic</td><td>Description</td></tr></thead>
 *   <tbody>
 * <tr><td>1.</td><td>Send RemoteInhibitRequest Message</td><td>SDP</td><td></td><td></td><td><p>The SDP request TBM for Remote Inhibit.</p></td></tr>
 * <tr><td>2</td><td>Process Message and assign correlation ID</td><td>TBM</td><td></td><td></td><td><p>The message is processed and the correlationID is assigned for the response</p></td></tr>
 * <tr><td>3</td><td>Send RemoteInhibitResponse Message</td><td>TBM</td><td></td><td></td><td><p>The TBM sends a success or failure message back to the SDP.</p></td></tr>
 * <tr><td>4</td><td>Inhibit Event</td><td>TBM</td><td></td><td></td><td>The TBM monitors for the specific remote inhibit on the CAN and when it is applied an event is triggered</p></td></tr>
 * <tr><td>5</td><td>CrankAttemptedNotification</td><td>TBM</td><td></td><td></td><td><p>The client sends a message to the SDP notifying that engine start was attempted while inhibited</p></td></tr>
 * <tr><td>6.</td><td>Process Message</td><td>SDP</td><td></td><td></td><td><p>The Service receives the message and verifies the correlationId matches the messageId of the sent request.</p></td></tr>
 * <tr><td>9.</td><td>send AckMessage</td><td>SDP</td><td>AckMessage</td><td>/RO/${iot:ClientId}</td><td><p>The SDP sends AckMessage to acknowledge that it received CrankAttemptedNotification</p></td></tr>
 * <tr><td>10.</td><td>Process AckMessage</td><td>TBM</td><td></td><td></td><td><p>The client process AckMessage.</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  RemoteOperationRequest of vehicle for Remote Operations.
 * <div class=exmsg-main>
 * <h4>RemoteOperationRequest Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 * 		timestamp: 1489632211020
 * 		messageId: 1
 * 		messages
 * 		{
 * 		 [com.fca.uconnect.global.remoteInhibitRequest]
 * 		 {
 * 		  action: SUBSCRIBE
 * 		  serviceRequestId:"-\0274\302]\325\324 \354K"
 * 		  remoteInhibitRequest
 * 		  {
 * 			command: CRANK_INHIBIT
 * 			
 * 		  }
 * 		 }
 * 		}
 *	</code>
 *   </div>
 * </div>
 */
message RemoteInhibitRequest {

	bytes serviceRequestId = 1; /// ServiceRequestId assigned by the SDP
	CrankInhibitEnum crankInhibit = 2; /// Turn on or off the inhibit of the vehicle start
	EngineSlowEnum engineSlow = 3;



enum CrankInhibitEnum {
	END_INHIBIT = 0;
	INHIBIT = 1;

	}
enum EngineSlowEnum {
	EXIT_SLOW = 0;
	SLOW = 1;
}

}


message RemoteInhibitResponse {

	enum ResponseEnum {
		SUCCESS = 0; /// Success
		FAILED = 1; /// FAILED
		    }
	 ResponseEnum response = 1;
	 bytes serviceRequestId = 2;/// service request id assigned by SDP
	 bool isTransient = 3; /// Indicates a transient error and a retry can be attempted.
	 int32 failureReasonCode = 4; /// Specific error code.

}

message CrankAttemptedNotification {
	bool isCrankAttempted = 1;
	Location location = 2;

}

