namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
///<summary>
///Logs details of an event(crash,error,unexpected result) and the device status at the time of the event.
///</summary>
[<Api(Description="Logs details of an event(crash,error,unexpected result) and the device status at the time of the event.")>]
[<AllowNullLiteral>]
type LogDeviceStatus() =
///<summary>
///Guid of the Appliance this Device is logging an event status for.
///</summary>
[<ApiMember(DataType="Guid", Description="Guid of the Appliance this Device is logging an event status for.", IsRequired=true, Name="ApplianceId", ParameterType="query")>]
member val ApplianceId:Guid = new Guid() with get,set
///<summary>
///Guid representing the saved Device
///</summary>
[<ApiMember(DataType="Guid", Description="Guid representing the saved Device", IsRequired=true, Name="DeviceId", ParameterType="query")>]
member val DeviceId:Guid = new Guid() with get,set
///<summary>
///The latitude the device was last located at.
///</summary>
[<ApiMember(DataType="double", Description="The latitude the device was last located at.", IsRequired=true, Name="Latitude", ParameterType="query")>]
member val Latitude:Double = new Double() with get,set
///<summary>
///The longitude the device was last located at.
///</summary>
[<ApiMember(DataType="double", Description="The longitude the device was last located at.", IsRequired=true, Name="Longitude", ParameterType="query")>]
member val Longitude:Double = new Double() with get,set
///<summary>
///Name of the event we're logging.
///</summary>
[<ApiMember(DataType="string", Description="Name of the event we're logging.", Name="EventName", ParameterType="query")>]
member val EventName:String = null with get,set
///<summary>
///Details of the event up to (255 char).
///</summary>
[<ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail1", ParameterType="query")>]
member val EventDetail1:String = null with get,set
///<summary>
///Details of the event up to (255 char).
///</summary>
[<ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail2", ParameterType="query")>]
member val EventDetail2:String = null with get,set
///<summary>
///Details of the event up to (255 char).
///</summary>
[<ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail3", ParameterType="query")>]
member val EventDetail3:String = null with get,set
///<summary>
///Details of the event up to (255 char).
///</summary>
[<ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail4", ParameterType="query")>]
member val EventDetail4:String = null with get,set
///<summary>
///Details of the event up to (255 char).
///</summary>
[<ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail5", ParameterType="query")>]
member val EventDetail5:String = null with get,set
///<summary>
///Details of the event up to (255 char).
///</summary>
[<ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="Orientation", ParameterType="query")>]
member val Orientation:String = null with get,set
///<summary>
///The device internet connection status.
///</summary>
[<ApiMember(DataType="string", Description="The device internet connection status.", Name="InternetConnectionStatus", ParameterType="query")>]
member val InternetConnectionStatus:String = null with get,set
///<summary>
///Unlimited text field for logging details of the event.
///</summary>
[<ApiMember(DataType="string", Description="Unlimited text field for logging details of the event.", Name="Log", ParameterType="query")>]
member val Log:String = null with get,set
///<summary>
///Date and Time of the event.
///</summary>
[<ApiMember(DataType="DateTime", Description="Date and Time of the event.", Name="Event", ParameterType="query")>]
member val Event:DateTime = new DateTime() with get,set
///<summary>
///True if the device is in portrait mode.
///</summary>
[<ApiMember(DataType="bool", Description="True if the device is in portrait mode.", Name="IsInPortrait", ParameterType="query")>]
member val IsInPortrait:Boolean = new Boolean() with get,set
///<summary>
///True if the device is in landscape mode.
///</summary>
[<ApiMember(DataType="bool", Description="True if the device is in landscape mode.", Name="IsInLandscape", ParameterType="query")>]
member val IsInLandscape:Boolean = new Boolean() with get,set
///<summary>
///True if cellular data is enabled.
///</summary>
[<ApiMember(DataType="bool", Description="True if cellular data is enabled.", Name="CellularDataEnabled", ParameterType="query")>]
member val CellularDataEnabled:Boolean = new Boolean() with get,set
///<summary>
///True if data roaming is enabled.
///</summary>
[<ApiMember(DataType="bool", Description="True if data roaming is enabled.", Name="DataRoamingEnabled", ParameterType="query")>]
member val DataRoamingEnabled:Boolean = new Boolean() with get,set
///<summary>
///True if the network is available.
///</summary>
[<ApiMember(DataType="bool", Description="True if the network is available.", Name="IsNetworkAvailable", ParameterType="query")>]
member val IsNetworkAvailable:Boolean = new Boolean() with get,set
///<summary>
///True if the device can send an sms.
///</summary>
[<ApiMember(DataType="bool", Description="True if the device can send an sms.", Name="CanSendSMS", ParameterType="query")>]
member val CanSendSMS:Boolean = new Boolean() with get,set
///<summary>
///True if the battery is charging.
///</summary>
[<ApiMember(DataType="bool", Description="True if the battery is charging.", Name="BatteryCharging", ParameterType="query")>]
member val BatteryCharging:Boolean = new Boolean() with get,set
///<summary>
///The amount of battery life left as a percentage.
///</summary>
[<ApiMember(DataType="int", Description="The amount of battery life left as a percentage.", Name="BatteryLevel", ParameterType="query")>]
member val BatteryLevel:Int32 = new Int32() with get,set
///<summary>
///The Guid of a saved Media Object.
///</summary>
[<ApiMember(DataType="Guid", Description="The Guid of a saved Media Object.", Name="MediaFileId1", ParameterType="query")>]
member val MediaFileId1:Guid = new Guid() with get,set
///<summary>
///The Guid of a saved Media Object.
///</summary>
[<ApiMember(DataType="Guid", Description="The Guid of a saved Media Object.", Name="MediaFileId2", ParameterType="query")>]
member val MediaFileId2:Guid = new Guid() with get,set
///<summary>
///Logs multiple device event details. Details include an event(crash,error,unexpected result) and the device status at the time of the event.
///</summary>
[<Api(Description="Logs multiple device event details. Details include an event(crash,error,unexpected result) and the device status at the time of the event.")>]
[<AllowNullLiteral>]
type LogDeviceStatuses() =
///<summary>
///A list of logged event statuses for a device.
///</summary>
[<ApiMember(DataType="int", Description="A list of logged event statuses for a device.", IsRequired=true, Name="DeviceStatuses", ParameterType="query")>]
member val DeviceStatuses:ResizeArray<LogDeviceStatus> = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/LogDeviceStatuses HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"DeviceStatuses":[{"ApplianceId":"00000000-0000-0000-0000-000000000000","DeviceId":"00000000-0000-0000-0000-000000000000","Latitude":0,"Longitude":0,"EventName":"String","EventDetail1":"String","EventDetail2":"String","EventDetail3":"String","EventDetail4":"String","EventDetail5":"String","Orientation":"String","InternetConnectionStatus":"String","Log":"String","Event":"0001-01-01T00:00:00.0000000","IsInPortrait":false,"IsInLandscape":false,"CellularDataEnabled":false,"DataRoamingEnabled":false,"IsNetworkAvailable":false,"CanSendSMS":false,"BatteryCharging":false,"BatteryLevel":0,"MediaFileId1":"00000000-0000-0000-0000-000000000000","MediaFileId2":"00000000-0000-0000-0000-000000000000"}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}