/**
 * <p class=proto-main>TThis API supports the Remote Operations</p>
 *
 * <div class=proto-hier>
 *   UconnectAny
 *     |
 *     |---- <a href="#com.fca.uconnect.global.RemoteOperationRequest">RemoteOperationRequest remoteOperationRequest (320)</a>
 * 			|
 * 			|---- <a href="#com.fca.uconnect.global.RemoteHornAndLightsRequest">RemoteHornAndLightsRequest remoteHornAndLightsRequest</a>
 * 			|
 * 			|---- <a href="#com.fca.uconnect.global.RemoteEngineRequest">RemoteEngineRequest remoteEngineRequest </a>
 * 			|
 *			|---- <a href="#com.fca.uconnect.global.RemoteDoorRequest">RemoteDoorRequest remoteDoorRequest </a>
 * 			|
 * 			|---- <a href="#com.fca.uconnect.global.RemoteClimateRequest">RemoteClimateRequest remoteClimateRequest </a>
 * 			|
 * 			|---- <a href="#com.fca.uconnect.global.RemoteWindowRequest">RemoteWindowRequest remoteWindowRequest </a>
 * 			|
 * 	  |
 * 	  |---- <a href="#com.fca.uconnect.global.RemoteOperationResponse"> RemoteOperationResponse  remoteOperationResponse (321) </a>
 * 	  |
 * 	  |---- <a href="#com.fca.uconnect.global.RemoteOperationStatus"> RemoteOperationStatus  remoteOperationStatus (324)</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>2018-06-18</td><td>Removed Inhibits</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>
 * <p><b>The ${AppTopic} defines which app is being addressed i.e. SVL or FTD<b></p>
 *  <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}/RO</td></tr>
 *	 <tr><td>Cloud receive from Vehicle</td><td>Subscribe</td><td>fcasdp/RO</td></tr>
 *	 <tr><td>Vehicle send to Cloud </td><td>Publish</td><td>fcasdp/RO/${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/remoteop.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>RemoteOperations Event</td><td>SDP</td><td></td><td></td><td><p>The SDP request TBM for Remote Operation Event.</p></td></tr>
 * <tr><td>2.1</td><td>Assign MessageId</td><td>SDP</td><td></td><td></td><td><p>The Service generates the messageId for the message by incrementing a sequence counter.</p></td></tr>
 * <tr><td>2.2</td><td>Assign ServiceId</td><td>SDP</td><td></td><td></td><td><p>The SDP generates ServiceId for the message with Random UUID for Sending Remote Operation Messages.</p></td></tr>
 * <tr><td>3.</td><td>Send RemoteOperationRequest Message</td><td>SDP</td><td>RemoteOperationRequest</td><td>/RO/${iot:ClientId}</td><td><p>The Service populates the RemoteOperationRequest Message with the  elements and publishes to the RO topic.</p></td></tr>
 * <tr><td>4.</td><td>Process Message</td><td>TBM</td><td></td><td></td><td><p>The Client processes the message and generates an RemoteOperationResponse Message with the status and the correlationId set to the messageId from the received RemoteOperationRequest Message.</p></td></tr>
 * <tr><td>5.</td><td>Send RemoteOperationResponse Message</td><td>TBM</td><td>RemoteOperationResponse</td><td>${iot:ClientId}/RO</td><td><p>The Client publishes the response message to the RO topic for the Service to receive.</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>7_1</td><td>Send RemoteOperationResponse [Success] Message</td><td>TBM</td><td>RemoteOperationStatus</td><td>${iot:ClientId}/RO</td><td><p>The Client publishes the Status message to the RO topic for the Service to receive.</p></td></tr>
 * <tr><td>7_2</td><td>Send RemoteOperationResponse [Failure Message</td><td>TBM</td><td>RemoteOperationStatus</td><td>${iot:ClientId}/RO</td><td><p>The Client publishes the Status message to the RO topic for the Service to receive.</p></td></tr>
 * <tr><td>8.</td><td>Assign correlationID</td><td>SDP</td><td></td><td></td><td><p>Assign correct correlationId.</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 RemoteOperationStatus Message.</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.remoteOperationRequest]
 * 		 {
 * 		  action: SUBSCRIBE
 * 		  serviceRequestId:"-\0274\302]\325\324 \354K"
 * 		  remoteDoorRequest
 * 		  {
 * 			command: UNLOCK_DRIVER
 * 			
 * 		  }
 * 		 }
 * 		}
 *	</code>
 *   </div>
 * </div>
 */
message RemoteOperationRequest {

	enum ActionEnum {
		NO_ACTION = 0; /// No Action
		SUBSCRIBE = 1; /// Subscribe
	}	

	 ActionEnum action = 1; /// This is not being used and is intended for future when subsequent state updates are implemented.
    	 bytes serviceRequestId = 2; /// ServiceRequestId assigned by the SDP
	oneof param {
		// CancelRequest cancelRequest = 10; // Cancel Previous Remote Request
		RemoteHornAndLightsRequest remoteHornAndLightsRequest = 11; /// Remote Horns and Light Request		
		RemoteEngineRequest remoteEngineRequest = 12; /// Remote Engine Request
		RemoteDoorRequest remoteDoorRequest = 13; /// Remote Door Request
		RemoteClimateRequest remoteClimateRequest=14; /// Remote Client Request - Not used in this release
		RemoteWindowRequest remoteWindowRequest=15; /// Remote Window Request  - Not used in this release
	}
}

// message CancelRequest {
//	 bytes serviceRequestId = 1;
//}
 /** This message represents  RemoteHornAndLights Operation of the vehicle .
 * <div class=exmsg-main>
 * <h4>RemoteHornAndLightsRequest Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 * 		timestamp: 1489632211020
 * 		messageId: 1
 * 		messages
 * 		{
 * 		 [com.fca.uconnect.global.remoteOperationRequest]
 * 		 {
 * 		  action: SUBSCRIBE
 * 		  remoteDoorRequest
 * 		  {
 * 			command: UNLOCK_DRIVER
 * 			duration: 0
 * 		  }
 * 		 }
 * 		}
 *	</code>
 *   </div>
 * </div>
 */
message RemoteHornAndLightsRequest {

	enum CommandEnum {
		HORN_AND_LIGHTS = 0; /// Activate Horns and Lights
		// HORN = 1; /// Activate Horns only
		// LIGHTS = 2; /// Activate Lights only
	}

	 CommandEnum command = 1; /// command element
	 int32 duration = 2; /// duration of execution - not used in this release
}

message RemoteEngineRequest {

	enum CommandEnum {
		START = 0; /// Execute a Remote Start
		STOP = 1; /// End a Remote Start
	   // INHIBIT = 2; /// Inhibit the engine from starting - used only for specially authorized channels and use cases. See SFS ofr details
		//END_INHIBIT = 3; /// Ends the vehicle engine inhibit.
		//SLOW = 4; /// Slows the vehicle engine
			}

	CommandEnum command = 1; /// command element
	 int32 duration = 2; /// duration of execution
}

message RemoteDoorRequest {

	enum CommandEnum {
		LOCK_ALL_DOORS = 0; /// Lock All Doors
		UNLOCK_DRIVER_DOOR = 1; /// Unlock Driver Door Only
		UNLOCK_ALL_DOORS = 2; /// Unlock All Doors
		OPEN_LIFTGATE = 3; /// Open Lift Gate for Power Lift Gate Models
		OPEN_HOOD = 4; /// Open Hood - Not used this release
		UNLOCK_TRUNK = 5; /// Unlock/Unlatch trunk. Unlock Liftgate on Power models
		CLOSE_LIFTGATE = 6; ///Closes the liftgate - can only be used where feasible for particular model

	}

	 CommandEnum command = 1;
}
message RemoteWindowRequest {

	enum CommandEnum {
		OPEN = 0; /// Open Window 
		PARTIAL = 1; /// Partially Open Window
		CLOSE = 2; /// Close Window
	}

	 CommandEnum command = 1; /// command element
	// int32 duration = 2; // duration of execution
}
message RemoteClimateRequest {

	enum CommandEnum {
		ON = 0; /// On
		OFF = 1; /// Off
	}
	 CommandEnum command = 1;
	 // int32 duration = 2; // Duration
	 int32 interiorTemperature = 3; /// interior Temperature
	 int32 fanSpeed = 4;///speed of the fan values between 0 to 100
	 TemperatureEnum termperatureUOM = 5;/// This identifies whether temperature measured in Celsius or Fahrenit degrees.
	 int32 targetTemp = 6; /// Target temperature for pre-trip climate
	 int32 timeoutAfterTemp = 7; /// Period that the pre-trip should remain on after temp is reached
	 int32 preTripTimeout = 8; /// Total time the pre-trip climate shall remain on
	enum TemperatureEnum{
		Celsius = 0; /// Celsius
		Fahrenheit = 1; /// Fahrenheit
		}
}
/** This message represents  Response to Remote Operation of the vehicle .
 * <div class=exmsg-main>
 * <h4>RemoteOperationResponse Example Message:</h4>
 * <div class=ex-msg>
 *	<code>
 * 		timestamp: 1489633266061
 *		messageId: 1
 *		correlationId: 1
 *		messages
 * 		{
 *		 [com.fca.uconnect.global.remoteOperationResponse]
 * 		 {
 * 		  response: SUCCESS
 * 		  serviceRequestId: "-\0274\302]\325\324 \354K"
 * 		 }
 * 		}
 * </code></div></div>
 */
message RemoteOperationResponse {

	enum ResponseEnum {
		SUCCESS = 0; /// Success
		SUCCESS_CONTINUE = 1; /// Success Continue
		SUCCESS_NOCONTINUE = 2; /// Success NoContinue
		NOT_AUTHORIZED = 3; /// NOT AUTHORIZED
		FAILED = 4; /// FAILED
		FAILED_IGNITION_ON = 5; /// FAILED IGNITION
		FAILED_NOCANACK = 6; /// FAILED NO CAN ACK
		FAILED_VEHCONDITION = 7; /// FAILED VEHICLE CONDITION
		STARTFAILED_DOORS_NOTLOCKED = 8; /// STARTFAILED DOORS NOT LOCKED
		STARTFAILED_DOORS_OPEN = 9; /// DOORS OPEN
		STARTFAILED_HOODTRUNK_OPEN = 10; ///HOOD OR TRUNK OPEN
		STARTFAILED_ALARM_ACTIVE = 11; ///ALARM ACTIVE
		STARTFAILED_FUELLOW = 12; ///FUEL LOW
		STARTFAILED_GASPEDAL = 13; /// GAS PEDAL
		STARTFAILED_PRNDL = 14; /// GEAR ENGAGED
		STARTFAILED_WINDOWSUNOPEN = 15; /// WINDOWS NOT OPEN
		STARTFAILED_MAXATTEMPTS_MET = 16; /// MAX ATTEMPTS EXCEEDED
		STARTFAILED_VEHPOWERMODE = 17; /// VEHICLE POWER MODE
		STARTFAILED_BATTERYLOW = 18; /// BATTERY LOW
		STOPFAILED_ENG_ALREADYOFF = 19; /// ENGINE OFF
		DOORS_FAILED_DOOR_OPEN = 20; /// DOOR OPEN
  		FLASHLIGHTS_FAILED_IGNITIONON = 21; /// FLASH FAILED IGNITION ON
  		FLASHLIGHTS_FAILED_DOOROPEN = 22; /// FLASH FAILED DOOR OPEN
  		FLASHLIGHTS_FAILED_EXPIRED = 23; /// FLASH FAILED EXPIRED
		DOORUNLOCK_RELOCKED_FAILED = 24; /// RELOCK FAILED
		DOORUNLOCK_RELOCKED = 25; /// RELOCKED
		NOTIFY_CONTINUE = 26; /// NOTIFY AND CONTINUE
		NOTIFY_NOCONTINUE = 27; /// NOTIFY AND DO NOT CONTINUE
		FAILED_ACTIVE_THEFT_ALARM = 28; /// ACTIVE THEFT ALARM
		NOT_FOUND = 35; /// Not Currently Planned for Use
		REQUESTED = 29; /// Not Currently Planned for Use
		DELIVERED = 30; /// Not Currently Planned for Use
		IN_PROGRESS = 31; /// Not Currently Planned for Use
		COMPLETE = 32; /// Not Currently Planned for Use
		COMPLETE_TIMEOUT = 34; /// Status monitor timed out
		SPEEDLOCKOUT =  36; /// Speed lockout for horns,lights and doors

    }
	 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.
	// VehicleInfo  vehicleInfo = 6; /// Vehicle details
	 VehicleStatus vehicleStatus = 5; ///Status of each door/window/hood/trunk. Not used in current planned release.
}



