Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Subtle.Canvara.WebAPIModel.ServiceModel
Namespace Global
Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
Public Partial Class DeviceHistoryModel
'''<Summary>
'''Guid representing the current Device History
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid representing the current Device History", Name:="DeviceHistoryId", ParameterType:="query")>
Public Overridable Property DeviceHistoryId As Guid
'''<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")>
Public Overridable Property PrimaryDeviceHistoryDeviceConfigurationId As Guid
'''<Summary>
'''The Device name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device name.", Name:="DeviceName", ParameterType:="query")>
Public Overridable Property DeviceName As String
'''<Summary>
'''The Device operating system.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device operating system.", Name:="OperatingSystem", ParameterType:="query")>
Public Overridable Property OperatingSystem As String
'''<Summary>
'''The Device operating system version.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device operating system version.", Name:="OperatingSystemVersion", ParameterType:="query")>
Public Overridable Property OperatingSystemVersion As String
'''<Summary>
'''The Device IP Address.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device IP Address.", Name:="IpAddress", ParameterType:="query")>
Public Overridable Property IpAddress As String
'''<Summary>
'''Any Notes about the device.
'''</Summary>
<ApiMember(DataType:="string", Description:="Any Notes about the device.", Name:="Notes", ParameterType:="query")>
Public Overridable Property Notes As String
'''<Summary>
'''Total memory size available (in bytes).
'''</Summary>
<ApiMember(DataType:="string", Description:="Total memory size available (in bytes).", Name:="TotalMemorySize", ParameterType:="query")>
Public Overridable Property TotalMemorySize As Integer?
'''<Summary>
'''The Network provider name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Network provider name.", Name:="CellularProviderName", ParameterType:="query")>
Public Overridable Property CellularProviderName As String
'''<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")>
Public Overridable Property MobileCountryCode As String
'''<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")>
Public Overridable Property MobileNetworkCode As String
'''<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")>
Public Overridable Property LanguageCodeIdentifier As String
'''<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")>
Public Overridable Property Latitude As Double
'''<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")>
Public Overridable Property Longitude As Double
End Class
Public Partial Class DeviceModel
'''<Summary>
'''Guid representing the saved Device
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid representing the saved Device", Name:="DeviceId", ParameterType:="query")>
Public Overridable Property DeviceId As Guid
'''<Summary>
'''Details of the Type of Device
'''</Summary>
<ApiMember(DataType:="DeviceTypeModel", Description:="Details of the Type of Device", Name:="DeviceType", ParameterType:="query")>
Public Overridable Property DeviceType As DeviceTypeModel
'''<Summary>
'''Current saved settings of the Device
'''</Summary>
<ApiMember(DataType:="DeviceHistoryModel", Description:="Current saved settings of the Device", Name:="CurrentHistory", ParameterType:="query")>
Public Overridable Property CurrentHistory As DeviceHistoryModel
'''<Summary>
'''The Device Model Name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Model Name.", IsRequired:=true, Name:="ModelName", ParameterType:="query")>
Public Overridable Property ModelName As String
'''<Summary>
'''The Device model number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device model number.", Name:="ModelNumber", ParameterType:="query")>
Public Overridable Property ModelNumber As String
'''<Summary>
'''The Device serial number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device serial number.", Name:="SerialNumber", ParameterType:="query")>
Public Overridable Property SerialNumber As String
'''<Summary>
'''The Device manufacturers number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device manufacturers number.", Name:="ManufacturerDeviceNumber", ParameterType:="query")>
Public Overridable Property ManufacturerDeviceNumber As String
'''<Summary>
'''The Device MAC Address.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device MAC Address.", Name:="MacAddress", ParameterType:="query")>
Public Overridable Property MacAddress As String
'''<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")>
Public Overridable Property InstanceSeed As Integer
'''<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")>
Public Overridable Property InstanceCounterLastValue As Integer
'''<Summary>
'''ServiceStack ResponseStatus.
'''</Summary>
<ApiMember(DataType:="ResponseStatus", Description:="ServiceStack ResponseStatus.", Name:="ResponseStatus", ParameterType:="query")>
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class DeviceTypeModel
'''<Summary>
'''Guid representing the saved Device Type
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid representing the saved Device Type", Name:="DeviceTypeId", ParameterType:="query")>
Public Overridable Property DeviceTypeId As Guid
'''<Summary>
'''Guid representing the saved Device Class
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid representing the saved Device Class", Name:="DeviceClassId", ParameterType:="query")>
Public Overridable Property DeviceClassId As Guid
'''<Summary>
'''The Device Class Name
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Class Name", Name:="DeviceClassName", ParameterType:="query")>
Public Overridable Property DeviceClassName As String
'''<Summary>
'''The Device Brand.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Brand.", Name:="Brand", ParameterType:="query")>
Public Overridable Property Brand As String
'''<Summary>
'''The Device Model Name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Model Name.", IsRequired:=true, Name:="ModelName", ParameterType:="query")>
Public Overridable Property ModelName As String
'''<Summary>
'''The Device Form, e.g Phone | Tablet.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Form, e.g Phone | Tablet.", Name:="FormFactor", ParameterType:="query")>
Public Overridable Property FormFactor As String
'''<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")>
Public Overridable Property Dimensions As String
'''<Summary>
'''The Device display resolution width in pixels.
'''</Summary>
<ApiMember(DataType:="int", Description:="The Device display resolution width in pixels.", Name:="DisplayResolutionWidthPixels", ParameterType:="query")>
Public Overridable Property DisplayResolutionWidthPixels As Integer?
'''<Summary>
'''The Device display resolution height in pixels.
'''</Summary>
<ApiMember(DataType:="int", Description:="The Device display resolution height in pixels.", Name:="DisplayResolutionHeightPixels", ParameterType:="query")>
Public Overridable Property DisplayResolutionHeightPixels As Integer?
'''<Summary>
'''The Device display width size in inches.
'''</Summary>
<ApiMember(DataType:="decimal", Description:="The Device display width size in inches.", Name:="DisplaySizeWidthInches", ParameterType:="query")>
Public Overridable Property DisplaySizeWidthInches As Decimal?
'''<Summary>
'''The Device display height size in inches.
'''</Summary>
<ApiMember(DataType:="decimal", Description:="The Device display height size in inches.", Name:="DisplaySizeHeightInches", ParameterType:="query")>
Public Overridable Property DisplaySizeHeightInches As Decimal?
End Class
'''<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.")>
Public Partial Class 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")>
Public Overridable Property ApplianceId As Guid
'''<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")>
Public Overridable Property DeviceId As Guid
'''<Summary>
'''The Device manufacturers number.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device manufacturers number.", Name:="ManufacturerDeviceNumber", ParameterType:="query")>
Public Overridable Property ManufacturerDeviceNumber As String
'''<Summary>
'''The Device MAC Address.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device MAC Address.", Name:="MacAddress", ParameterType:="query")>
Public Overridable Property MacAddress As String
'''<Summary>
'''The Device Model Name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Model Name.", IsRequired:=true, Name:="ModelName", ParameterType:="query")>
Public Overridable Property ModelName As String
'''<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")>
Public Overridable Property FormFactor As String
'''<Summary>
'''The Device Brand.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device Brand.", Name:="Brand", ParameterType:="query")>
Public Overridable Property Brand As String
'''<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")>
Public Overridable Property Dimensions As String
'''<Summary>
'''The Device display resolution width in pixels.
'''</Summary>
<ApiMember(DataType:="int", Description:="The Device display resolution width in pixels.", Name:="DisplayResolutionWidthPixels", ParameterType:="query")>
Public Overridable Property DisplayResolutionWidthPixels As Integer?
'''<Summary>
'''The Device display resolution height in pixels.
'''</Summary>
<ApiMember(DataType:="int", Description:="The Device display resolution height in pixels.", Name:="DisplayResolutionHeightPixels", ParameterType:="query")>
Public Overridable Property DisplayResolutionHeightPixels As Integer?
'''<Summary>
'''The Device display width size in inches.
'''</Summary>
<ApiMember(DataType:="decimal", Description:="The Device display width size in inches.", Name:="DisplaySizeWidthInches", ParameterType:="query")>
Public Overridable Property DisplaySizeWidthInches As Decimal?
'''<Summary>
'''The Device display height size in inches.
'''</Summary>
<ApiMember(DataType:="decimal", Description:="The Device display height size in inches.", Name:="DisplaySizeHeightInches", ParameterType:="query")>
Public Overridable Property DisplaySizeHeightInches As Decimal?
'''<Summary>
'''The Device operating system.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device operating system.", Name:="OperatingSystem", ParameterType:="query")>
Public Overridable Property OperatingSystem As String
'''<Summary>
'''The Device operating system version.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device operating system version.", Name:="OperatingSystemVersion", ParameterType:="query")>
Public Overridable Property OperatingSystemVersion As String
'''<Summary>
'''The Device IP Address.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Device IP Address.", Name:="IpAddress", ParameterType:="query")>
Public Overridable Property IpAddress As String
'''<Summary>
'''Any Notes about the device.
'''</Summary>
<ApiMember(DataType:="string", Description:="Any Notes about the device.", Name:="Notes", ParameterType:="query")>
Public Overridable Property Notes As String
'''<Summary>
'''Total memory size available (in bytes).
'''</Summary>
<ApiMember(DataType:="string", Description:="Total memory size available (in bytes).", Name:="TotalMemorySize", ParameterType:="query")>
Public Overridable Property TotalMemorySize As Integer?
'''<Summary>
'''The Network provider name.
'''</Summary>
<ApiMember(DataType:="string", Description:="The Network provider name.", Name:="CellularProviderName", ParameterType:="query")>
Public Overridable Property CellularProviderName As String
'''<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")>
Public Overridable Property ISOCountryCode As String
'''<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")>
Public Overridable Property MobileCountryCode As String
'''<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")>
Public Overridable Property MobileNetworkCode As String
'''<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")>
Public Overridable Property LanguageCodeIdentifier As String
'''<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")>
Public Overridable Property LastKnownTimeZone As String
'''<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")>
Public Overridable Property LastKnownTimeZoneOffset As String
'''<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")>
Public Overridable Property Latitude As Double
'''<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")>
Public Overridable Property Longitude As Double
'''<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")>
Public Overridable Property InstanceSeed As Integer
'''<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")>
Public Overridable Property InstanceCounterLastValue As Integer
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/RegisterDevice HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/csv
Content-Type: text/csv
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/csv
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"}}}