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
[<AllowNullLiteral>]
type DeviceTypeModel() =
///<summary>
///Guid representing the saved Device Type
///</summary>
[<ApiMember(DataType="Guid", Description="Guid representing the saved Device Type", Name="DeviceTypeId", ParameterType="query")>]
member val DeviceTypeId:Guid = new Guid() with get,set
///<summary>
///Guid representing the saved Device Class
///</summary>
[<ApiMember(DataType="Guid", Description="Guid representing the saved Device Class", Name="DeviceClassId", ParameterType="query")>]
member val DeviceClassId:Guid = new Guid() with get,set
///<summary>
///The Device Class Name
///</summary>
[<ApiMember(DataType="string", Description="The Device Class Name", Name="DeviceClassName", ParameterType="query")>]
member val DeviceClassName:String = null with get,set
///<summary>
///The Device Brand.
///</summary>
[<ApiMember(DataType="string", Description="The Device Brand.", Name="Brand", ParameterType="query")>]
member val Brand:String = null with get,set
///<summary>
///The Device Model Name.
///</summary>
[<ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")>]
member val ModelName:String = null with get,set
///<summary>
///The Device Form, e.g Phone | Tablet.
///</summary>
[<ApiMember(DataType="string", Description="The Device Form, e.g Phone | Tablet.", Name="FormFactor", ParameterType="query")>]
member val FormFactor:String = null with get,set
///<summary>
///The Device Dimensions (Height x Width x Depth).
///</summary>
[<ApiMember(DataType="string", Description="The Device Dimensions (Height x Width x Depth).", Name="Dimensions", ParameterType="query")>]
member val Dimensions:String = null with get,set
///<summary>
///The Device display resolution width in pixels.
///</summary>
[<ApiMember(DataType="int", Description="The Device display resolution width in pixels.", Name="DisplayResolutionWidthPixels", ParameterType="query")>]
member val DisplayResolutionWidthPixels:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The Device display resolution height in pixels.
///</summary>
[<ApiMember(DataType="int", Description="The Device display resolution height in pixels.", Name="DisplayResolutionHeightPixels", ParameterType="query")>]
member val DisplayResolutionHeightPixels:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The Device display width size in inches.
///</summary>
[<ApiMember(DataType="decimal", Description="The Device display width size in inches.", Name="DisplaySizeWidthInches", ParameterType="query")>]
member val DisplaySizeWidthInches:Nullable<Decimal> = new Nullable<Decimal>() with get,set
///<summary>
///The Device display height size in inches.
///</summary>
[<ApiMember(DataType="decimal", Description="The Device display height size in inches.", Name="DisplaySizeHeightInches", ParameterType="query")>]
member val DisplaySizeHeightInches:Nullable<Decimal> = new Nullable<Decimal>() with get,set
[<AllowNullLiteral>]
type DeviceHistoryModel() =
///<summary>
///Guid representing the current Device History
///</summary>
[<ApiMember(DataType="Guid", Description="Guid representing the current Device History", Name="DeviceHistoryId", ParameterType="query")>]
member val DeviceHistoryId:Guid = new Guid() with get,set
///<summary>
///Guid representing the current Device History Device Configuration record.
///</summary>
[<ApiMember(DataType="Guid", Description="Guid representing the current Device History Device Configuration record.", Name="PrimaryDeviceHistoryDeviceConfigurationId", ParameterType="query")>]
member val PrimaryDeviceHistoryDeviceConfigurationId:Guid = new Guid() with get,set
///<summary>
///The Device name.
///</summary>
[<ApiMember(DataType="string", Description="The Device name.", Name="DeviceName", ParameterType="query")>]
member val DeviceName:String = null with get,set
///<summary>
///The Device operating system.
///</summary>
[<ApiMember(DataType="string", Description="The Device operating system.", Name="OperatingSystem", ParameterType="query")>]
member val OperatingSystem:String = null with get,set
///<summary>
///The Device operating system version.
///</summary>
[<ApiMember(DataType="string", Description="The Device operating system version.", Name="OperatingSystemVersion", ParameterType="query")>]
member val OperatingSystemVersion:String = null with get,set
///<summary>
///The Device IP Address.
///</summary>
[<ApiMember(DataType="string", Description="The Device IP Address.", Name="IpAddress", ParameterType="query")>]
member val IpAddress:String = null with get,set
///<summary>
///Any Notes about the device.
///</summary>
[<ApiMember(DataType="string", Description="Any Notes about the device.", Name="Notes", ParameterType="query")>]
member val Notes:String = null with get,set
///<summary>
///Total memory size available (in bytes).
///</summary>
[<ApiMember(DataType="string", Description="Total memory size available (in bytes).", Name="TotalMemorySize", ParameterType="query")>]
member val TotalMemorySize:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The Network provider name.
///</summary>
[<ApiMember(DataType="string", Description="The Network provider name.", Name="CellularProviderName", ParameterType="query")>]
member val CellularProviderName:String = null with get,set
///<summary>
///The Mobile Country Code the device is currently located in.
///</summary>
[<ApiMember(DataType="string", Description="The Mobile Country Code the device is currently located in.", Name="MobileCountryCode", ParameterType="query")>]
member val MobileCountryCode:String = null with get,set
///<summary>
///The Mobile Network Code the device is currently using.
///</summary>
[<ApiMember(DataType="string", Description="The Mobile Network Code the device is currently using.", Name="MobileNetworkCode", ParameterType="query")>]
member val MobileNetworkCode:String = null with get,set
///<summary>
///The Language Code Identifier that represents the language used on the device.
///</summary>
[<ApiMember(DataType="string", Description="The Language Code Identifier that represents the language used on the device.", Name="LanguageCodeIdentifier", ParameterType="query")>]
member val LanguageCodeIdentifier:String = null 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.", 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.", Name="Longitude", ParameterType="query")>]
member val Longitude:Double = new Double() with get,set
[<AllowNullLiteral>]
type DeviceModel() =
///<summary>
///Guid representing the saved Device
///</summary>
[<ApiMember(DataType="Guid", Description="Guid representing the saved Device", Name="DeviceId", ParameterType="query")>]
member val DeviceId:Guid = new Guid() with get,set
///<summary>
///Details of the Type of Device
///</summary>
[<ApiMember(DataType="DeviceTypeModel", Description="Details of the Type of Device", Name="DeviceType", ParameterType="query")>]
member val DeviceType:DeviceTypeModel = null with get,set
///<summary>
///Current saved settings of the Device
///</summary>
[<ApiMember(DataType="DeviceHistoryModel", Description="Current saved settings of the Device", Name="CurrentHistory", ParameterType="query")>]
member val CurrentHistory:DeviceHistoryModel = null with get,set
///<summary>
///The Device Model Name.
///</summary>
[<ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")>]
member val ModelName:String = null with get,set
///<summary>
///The Device model number.
///</summary>
[<ApiMember(DataType="string", Description="The Device model number.", Name="ModelNumber", ParameterType="query")>]
member val ModelNumber:String = null with get,set
///<summary>
///The Device serial number.
///</summary>
[<ApiMember(DataType="string", Description="The Device serial number.", Name="SerialNumber", ParameterType="query")>]
member val SerialNumber:String = null with get,set
///<summary>
///The Device manufacturers number.
///</summary>
[<ApiMember(DataType="string", Description="The Device manufacturers number.", Name="ManufacturerDeviceNumber", ParameterType="query")>]
member val ManufacturerDeviceNumber:String = null with get,set
///<summary>
///The Device MAC Address.
///</summary>
[<ApiMember(DataType="string", Description="The Device MAC Address.", Name="MacAddress", ParameterType="query")>]
member val MacAddress:String = null with get,set
///<summary>
///The current value of InstanceSeed that the device has stored. If InstanceCounterLastValue has gone over 99999, this will contain a new seed value for the device.
///</summary>
[<ApiMember(DataType="int", Description="The current value of InstanceSeed that the device has stored. If InstanceCounterLastValue has gone over 99999, this will contain a new seed value for the device.", IsRequired=true, Name="InstanceSeed", ParameterType="query")>]
member val InstanceSeed:Int32 = new Int32() with get,set
///<summary>
///The current value of InstanceCounterLastValue that the device has stored
///</summary>
[<ApiMember(DataType="int", Description="The current value of InstanceCounterLastValue that the device has stored", IsRequired=true, Name="InstanceCounterLastValue", ParameterType="query")>]
member val InstanceCounterLastValue:Int32 = new Int32() with get,set
///<summary>
///ServiceStack ResponseStatus.
///</summary>
[<ApiMember(DataType="ResponseStatus", Description="ServiceStack ResponseStatus.", Name="ResponseStatus", ParameterType="query")>]
member val ResponseStatus:ResponseStatus = null with get,set
///<summary>
///Saves/Updates a Devices details and registers that device with an appliance.
///</summary>
[<Api(Description="Saves/Updates a Devices details and registers that device with an appliance.")>]
[<AllowNullLiteral>]
type RegisterDevice() =
///<summary>
///Guid of the Appliance this Device is Registering under.
///</summary>
[<ApiMember(DataType="Guid", Description="Guid of the Appliance this Device is Registering under.", IsRequired=true, Name="ApplianceId", ParameterType="query")>]
member val ApplianceId:Guid = new Guid() with get,set
///<summary>
///Guid of the Device. If empty the Device will be inserted, if provided the device will be updated.
///</summary>
[<ApiMember(DataType="Guid", Description="Guid of the Device. If empty the Device will be inserted, if provided the device will be updated.", IsRequired=true, Name="DeviceId", ParameterType="query")>]
member val DeviceId:Guid = new Guid() with get,set
///<summary>
///The Device manufacturers number.
///</summary>
[<ApiMember(DataType="string", Description="The Device manufacturers number.", Name="ManufacturerDeviceNumber", ParameterType="query")>]
member val ManufacturerDeviceNumber:String = null with get,set
///<summary>
///The Device MAC Address.
///</summary>
[<ApiMember(DataType="string", Description="The Device MAC Address.", Name="MacAddress", ParameterType="query")>]
member val MacAddress:String = null with get,set
///<summary>
///The Device Model Name.
///</summary>
[<ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")>]
member val ModelName:String = null with get,set
///<summary>
///The Device Form, e.g Phone | Tablet.
///</summary>
[<ApiMember(DataType="string", Description="The Device Form, e.g Phone | Tablet.", IsRequired=true, Name="FormFactor", ParameterType="query")>]
member val FormFactor:String = null with get,set
///<summary>
///The Device Brand.
///</summary>
[<ApiMember(DataType="string", Description="The Device Brand.", Name="Brand", ParameterType="query")>]
member val Brand:String = null with get,set
///<summary>
///The Device Dimensions (Height x Width x Depth).
///</summary>
[<ApiMember(DataType="string", Description="The Device Dimensions (Height x Width x Depth).", Name="Dimensions", ParameterType="query")>]
member val Dimensions:String = null with get,set
///<summary>
///The Device display resolution width in pixels.
///</summary>
[<ApiMember(DataType="int", Description="The Device display resolution width in pixels.", Name="DisplayResolutionWidthPixels", ParameterType="query")>]
member val DisplayResolutionWidthPixels:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The Device display resolution height in pixels.
///</summary>
[<ApiMember(DataType="int", Description="The Device display resolution height in pixels.", Name="DisplayResolutionHeightPixels", ParameterType="query")>]
member val DisplayResolutionHeightPixels:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The Device display width size in inches.
///</summary>
[<ApiMember(DataType="decimal", Description="The Device display width size in inches.", Name="DisplaySizeWidthInches", ParameterType="query")>]
member val DisplaySizeWidthInches:Nullable<Decimal> = new Nullable<Decimal>() with get,set
///<summary>
///The Device display height size in inches.
///</summary>
[<ApiMember(DataType="decimal", Description="The Device display height size in inches.", Name="DisplaySizeHeightInches", ParameterType="query")>]
member val DisplaySizeHeightInches:Nullable<Decimal> = new Nullable<Decimal>() with get,set
///<summary>
///The Device operating system.
///</summary>
[<ApiMember(DataType="string", Description="The Device operating system.", Name="OperatingSystem", ParameterType="query")>]
member val OperatingSystem:String = null with get,set
///<summary>
///The Device operating system version.
///</summary>
[<ApiMember(DataType="string", Description="The Device operating system version.", Name="OperatingSystemVersion", ParameterType="query")>]
member val OperatingSystemVersion:String = null with get,set
///<summary>
///The Device IP Address.
///</summary>
[<ApiMember(DataType="string", Description="The Device IP Address.", Name="IpAddress", ParameterType="query")>]
member val IpAddress:String = null with get,set
///<summary>
///Any Notes about the device.
///</summary>
[<ApiMember(DataType="string", Description="Any Notes about the device.", Name="Notes", ParameterType="query")>]
member val Notes:String = null with get,set
///<summary>
///Total memory size available (in bytes).
///</summary>
[<ApiMember(DataType="string", Description="Total memory size available (in bytes).", Name="TotalMemorySize", ParameterType="query")>]
member val TotalMemorySize:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The Network provider name.
///</summary>
[<ApiMember(DataType="string", Description="The Network provider name.", Name="CellularProviderName", ParameterType="query")>]
member val CellularProviderName:String = null with get,set
///<summary>
///The ISO Country Code of the country the device is currently located in.
///</summary>
[<ApiMember(DataType="string", Description="The ISO Country Code of the country the device is currently located in.", Name="ISOCountryCode", ParameterType="query")>]
member val ISOCountryCode:String = null with get,set
///<summary>
///The Mobile Country Code the device is currently located in.
///</summary>
[<ApiMember(DataType="string", Description="The Mobile Country Code the device is currently located in.", Name="MobileCountryCode", ParameterType="query")>]
member val MobileCountryCode:String = null with get,set
///<summary>
///The Mobile Network Code the device is currently using.
///</summary>
[<ApiMember(DataType="string", Description="The Mobile Network Code the device is currently using.", Name="MobileNetworkCode", ParameterType="query")>]
member val MobileNetworkCode:String = null with get,set
///<summary>
///The Language Code Identifier that represents the language used on the device.
///</summary>
[<ApiMember(DataType="string", Description="The Language Code Identifier that represents the language used on the device.", Name="LanguageCodeIdentifier", ParameterType="query")>]
member val LanguageCodeIdentifier:String = null with get,set
///<summary>
///The name of the Timezone the device was last used in.
///</summary>
[<ApiMember(DataType="string", Description="The name of the Timezone the device was last used in.", Name="LastKnownTimeZone", ParameterType="query")>]
member val LastKnownTimeZone:String = null with get,set
///<summary>
///The UTC Offset of the Timezone the device was last used in. Formatted as +-##:##
///</summary>
[<ApiMember(DataType="string", Description="The UTC Offset of the Timezone the device was last used in. Formatted as +-##:##", Name="LastKnownTimeZoneOffset", ParameterType="query")>]
member val LastKnownTimeZoneOffset:String = null 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>
///The current value of InstanceSeed that the device has stored.
///</summary>
[<ApiMember(DataType="int", Description="The current value of InstanceSeed that the device has stored.", IsRequired=true, Name="InstanceSeed", ParameterType="query")>]
member val InstanceSeed:Int32 = new Int32() with get,set
///<summary>
///The current value of InstanceCounterLastValue that the device has stored
///</summary>
[<ApiMember(DataType="int", Description="The current value of InstanceCounterLastValue that the device has stored", IsRequired=true, Name="InstanceCounterLastValue", ParameterType="query")>]
member val InstanceCounterLastValue:Int32 = new Int32() 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/RegisterDevice HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"ApplianceId":"00000000-0000-0000-0000-000000000000","DeviceId":"00000000-0000-0000-0000-000000000000","ManufacturerDeviceNumber":"String","MacAddress":"String","ModelName":"String","FormFactor":"String","Brand":"String","Dimensions":"String","DisplayResolutionWidthPixels":0,"DisplayResolutionHeightPixels":0,"DisplaySizeWidthInches":0,"DisplaySizeHeightInches":0,"OperatingSystem":"String","OperatingSystemVersion":"String","IpAddress":"String","Notes":"String","TotalMemorySize":0,"CellularProviderName":"String","ISOCountryCode":"String","MobileCountryCode":"String","MobileNetworkCode":"String","LanguageCodeIdentifier":"String","LastKnownTimeZone":"String","LastKnownTimeZoneOffset":"String","Latitude":0,"Longitude":0,"InstanceSeed":0,"InstanceCounterLastValue":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"DeviceId":"00000000-0000-0000-0000-000000000000","DeviceType":{"DeviceTypeId":"00000000-0000-0000-0000-000000000000","DeviceClassId":"00000000-0000-0000-0000-000000000000","DeviceClassName":"String","Brand":"String","ModelName":"String","FormFactor":"String","Dimensions":"String","DisplayResolutionWidthPixels":0,"DisplayResolutionHeightPixels":0,"DisplaySizeWidthInches":0,"DisplaySizeHeightInches":0},"CurrentHistory":{"DeviceHistoryId":"00000000-0000-0000-0000-000000000000","PrimaryDeviceHistoryDeviceConfigurationId":"00000000-0000-0000-0000-000000000000","DeviceName":"String","OperatingSystem":"String","OperatingSystemVersion":"String","IpAddress":"String","Notes":"String","TotalMemorySize":0,"CellularProviderName":"String","MobileCountryCode":"String","MobileNetworkCode":"String","LanguageCodeIdentifier":"String","Latitude":0,"Longitude":0},"ModelName":"String","ModelNumber":"String","SerialNumber":"String","ManufacturerDeviceNumber":"String","MacAddress":"String","InstanceSeed":0,"InstanceCounterLastValue":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}