using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Subtle.Canvara.WebAPIModel.ServiceModel;
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 virtual Guid DeviceHistoryId { 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")]
public virtual Guid PrimaryDeviceHistoryDeviceConfigurationId { get; set; }
///<summary>
///The Device name.
///</summary>
[ApiMember(DataType="string", Description="The Device name.", Name="DeviceName", ParameterType="query")]
public virtual string DeviceName { get; set; }
///<summary>
///The Device operating system.
///</summary>
[ApiMember(DataType="string", Description="The Device operating system.", Name="OperatingSystem", ParameterType="query")]
public virtual string OperatingSystem { get; set; }
///<summary>
///The Device operating system version.
///</summary>
[ApiMember(DataType="string", Description="The Device operating system version.", Name="OperatingSystemVersion", ParameterType="query")]
public virtual string OperatingSystemVersion { get; set; }
///<summary>
///The Device IP Address.
///</summary>
[ApiMember(DataType="string", Description="The Device IP Address.", Name="IpAddress", ParameterType="query")]
public virtual string IpAddress { get; set; }
///<summary>
///Any Notes about the device.
///</summary>
[ApiMember(DataType="string", Description="Any Notes about the device.", Name="Notes", ParameterType="query")]
public virtual string Notes { get; set; }
///<summary>
///Total memory size available (in bytes).
///</summary>
[ApiMember(DataType="string", Description="Total memory size available (in bytes).", Name="TotalMemorySize", ParameterType="query")]
public virtual int? TotalMemorySize { get; set; }
///<summary>
///The Network provider name.
///</summary>
[ApiMember(DataType="string", Description="The Network provider name.", Name="CellularProviderName", ParameterType="query")]
public virtual string CellularProviderName { 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")]
public virtual string MobileCountryCode { 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")]
public virtual string MobileNetworkCode { 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")]
public virtual string LanguageCodeIdentifier { 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")]
public virtual double Latitude { 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")]
public virtual double Longitude { get; set; }
}
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 virtual Guid DeviceId { get; set; }
///<summary>
///Details of the Type of Device
///</summary>
[ApiMember(DataType="DeviceTypeModel", Description="Details of the Type of Device", Name="DeviceType", ParameterType="query")]
public virtual DeviceTypeModel DeviceType { get; set; }
///<summary>
///Current saved settings of the Device
///</summary>
[ApiMember(DataType="DeviceHistoryModel", Description="Current saved settings of the Device", Name="CurrentHistory", ParameterType="query")]
public virtual DeviceHistoryModel CurrentHistory { get; set; }
///<summary>
///The Device Model Name.
///</summary>
[ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")]
public virtual string ModelName { get; set; }
///<summary>
///The Device model number.
///</summary>
[ApiMember(DataType="string", Description="The Device model number.", Name="ModelNumber", ParameterType="query")]
public virtual string ModelNumber { get; set; }
///<summary>
///The Device serial number.
///</summary>
[ApiMember(DataType="string", Description="The Device serial number.", Name="SerialNumber", ParameterType="query")]
public virtual string SerialNumber { get; set; }
///<summary>
///The Device manufacturers number.
///</summary>
[ApiMember(DataType="string", Description="The Device manufacturers number.", Name="ManufacturerDeviceNumber", ParameterType="query")]
public virtual string ManufacturerDeviceNumber { get; set; }
///<summary>
///The Device MAC Address.
///</summary>
[ApiMember(DataType="string", Description="The Device MAC Address.", Name="MacAddress", ParameterType="query")]
public virtual string MacAddress { 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")]
public virtual int InstanceSeed { 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")]
public virtual int InstanceCounterLastValue { get; set; }
///<summary>
///ServiceStack ResponseStatus.
///</summary>
[ApiMember(DataType="ResponseStatus", Description="ServiceStack ResponseStatus.", Name="ResponseStatus", ParameterType="query")]
public virtual ResponseStatus ResponseStatus { get; set; }
}
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 virtual Guid DeviceTypeId { get; set; }
///<summary>
///Guid representing the saved Device Class
///</summary>
[ApiMember(DataType="Guid", Description="Guid representing the saved Device Class", Name="DeviceClassId", ParameterType="query")]
public virtual Guid DeviceClassId { get; set; }
///<summary>
///The Device Class Name
///</summary>
[ApiMember(DataType="string", Description="The Device Class Name", Name="DeviceClassName", ParameterType="query")]
public virtual string DeviceClassName { get; set; }
///<summary>
///The Device Brand.
///</summary>
[ApiMember(DataType="string", Description="The Device Brand.", Name="Brand", ParameterType="query")]
public virtual string Brand { get; set; }
///<summary>
///The Device Model Name.
///</summary>
[ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")]
public virtual string ModelName { 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")]
public virtual string FormFactor { 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")]
public virtual string Dimensions { 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")]
public virtual int? DisplayResolutionWidthPixels { 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")]
public virtual int? DisplayResolutionHeightPixels { 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")]
public virtual decimal? DisplaySizeWidthInches { 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")]
public virtual decimal? DisplaySizeHeightInches { 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.")]
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 virtual Guid ApplianceId { 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")]
public virtual Guid DeviceId { get; set; }
///<summary>
///The Device manufacturers number.
///</summary>
[ApiMember(DataType="string", Description="The Device manufacturers number.", Name="ManufacturerDeviceNumber", ParameterType="query")]
public virtual string ManufacturerDeviceNumber { get; set; }
///<summary>
///The Device MAC Address.
///</summary>
[ApiMember(DataType="string", Description="The Device MAC Address.", Name="MacAddress", ParameterType="query")]
public virtual string MacAddress { get; set; }
///<summary>
///The Device Model Name.
///</summary>
[ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")]
public virtual string ModelName { 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")]
public virtual string FormFactor { get; set; }
///<summary>
///The Device Brand.
///</summary>
[ApiMember(DataType="string", Description="The Device Brand.", Name="Brand", ParameterType="query")]
public virtual string Brand { 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")]
public virtual string Dimensions { 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")]
public virtual int? DisplayResolutionWidthPixels { 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")]
public virtual int? DisplayResolutionHeightPixels { 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")]
public virtual decimal? DisplaySizeWidthInches { 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")]
public virtual decimal? DisplaySizeHeightInches { get; set; }
///<summary>
///The Device operating system.
///</summary>
[ApiMember(DataType="string", Description="The Device operating system.", Name="OperatingSystem", ParameterType="query")]
public virtual string OperatingSystem { get; set; }
///<summary>
///The Device operating system version.
///</summary>
[ApiMember(DataType="string", Description="The Device operating system version.", Name="OperatingSystemVersion", ParameterType="query")]
public virtual string OperatingSystemVersion { get; set; }
///<summary>
///The Device IP Address.
///</summary>
[ApiMember(DataType="string", Description="The Device IP Address.", Name="IpAddress", ParameterType="query")]
public virtual string IpAddress { get; set; }
///<summary>
///Any Notes about the device.
///</summary>
[ApiMember(DataType="string", Description="Any Notes about the device.", Name="Notes", ParameterType="query")]
public virtual string Notes { get; set; }
///<summary>
///Total memory size available (in bytes).
///</summary>
[ApiMember(DataType="string", Description="Total memory size available (in bytes).", Name="TotalMemorySize", ParameterType="query")]
public virtual int? TotalMemorySize { get; set; }
///<summary>
///The Network provider name.
///</summary>
[ApiMember(DataType="string", Description="The Network provider name.", Name="CellularProviderName", ParameterType="query")]
public virtual string CellularProviderName { 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")]
public virtual string ISOCountryCode { 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")]
public virtual string MobileCountryCode { 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")]
public virtual string MobileNetworkCode { 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")]
public virtual string LanguageCodeIdentifier { 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")]
public virtual string LastKnownTimeZone { 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")]
public virtual string LastKnownTimeZoneOffset { 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")]
public virtual double Latitude { 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")]
public virtual double Longitude { 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")]
public virtual int InstanceSeed { 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")]
public virtual int InstanceCounterLastValue { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/RegisterDevice HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RegisterDevice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ApplianceId>00000000-0000-0000-0000-000000000000</ApplianceId>
<Brand>String</Brand>
<CellularProviderName>String</CellularProviderName>
<DeviceId>00000000-0000-0000-0000-000000000000</DeviceId>
<Dimensions>String</Dimensions>
<DisplayResolutionHeightPixels>0</DisplayResolutionHeightPixels>
<DisplayResolutionWidthPixels>0</DisplayResolutionWidthPixels>
<DisplaySizeHeightInches>0</DisplaySizeHeightInches>
<DisplaySizeWidthInches>0</DisplaySizeWidthInches>
<FormFactor>String</FormFactor>
<ISOCountryCode>String</ISOCountryCode>
<InstanceCounterLastValue>0</InstanceCounterLastValue>
<InstanceSeed>0</InstanceSeed>
<IpAddress>String</IpAddress>
<LanguageCodeIdentifier>String</LanguageCodeIdentifier>
<LastKnownTimeZone>String</LastKnownTimeZone>
<LastKnownTimeZoneOffset>String</LastKnownTimeZoneOffset>
<Latitude>0</Latitude>
<Longitude>0</Longitude>
<MacAddress>String</MacAddress>
<ManufacturerDeviceNumber>String</ManufacturerDeviceNumber>
<MobileCountryCode>String</MobileCountryCode>
<MobileNetworkCode>String</MobileNetworkCode>
<ModelName>String</ModelName>
<Notes>String</Notes>
<OperatingSystem>String</OperatingSystem>
<OperatingSystemVersion>String</OperatingSystemVersion>
<TotalMemorySize>0</TotalMemorySize>
</RegisterDevice>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DeviceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<CurrentHistory>
<CellularProviderName>String</CellularProviderName>
<DeviceHistoryId>00000000-0000-0000-0000-000000000000</DeviceHistoryId>
<DeviceName>String</DeviceName>
<IpAddress>String</IpAddress>
<LanguageCodeIdentifier>String</LanguageCodeIdentifier>
<Latitude>0</Latitude>
<Longitude>0</Longitude>
<MobileCountryCode>String</MobileCountryCode>
<MobileNetworkCode>String</MobileNetworkCode>
<Notes>String</Notes>
<OperatingSystem>String</OperatingSystem>
<OperatingSystemVersion>String</OperatingSystemVersion>
<PrimaryDeviceHistoryDeviceConfigurationId>00000000-0000-0000-0000-000000000000</PrimaryDeviceHistoryDeviceConfigurationId>
<TotalMemorySize>0</TotalMemorySize>
</CurrentHistory>
<DeviceId>00000000-0000-0000-0000-000000000000</DeviceId>
<DeviceType>
<Brand>String</Brand>
<DeviceClassId>00000000-0000-0000-0000-000000000000</DeviceClassId>
<DeviceClassName>String</DeviceClassName>
<DeviceTypeId>00000000-0000-0000-0000-000000000000</DeviceTypeId>
<Dimensions>String</Dimensions>
<DisplayResolutionHeightPixels>0</DisplayResolutionHeightPixels>
<DisplayResolutionWidthPixels>0</DisplayResolutionWidthPixels>
<DisplaySizeHeightInches>0</DisplaySizeHeightInches>
<DisplaySizeWidthInches>0</DisplaySizeWidthInches>
<FormFactor>String</FormFactor>
<ModelName>String</ModelName>
</DeviceType>
<InstanceCounterLastValue>0</InstanceCounterLastValue>
<InstanceSeed>0</InstanceSeed>
<MacAddress>String</MacAddress>
<ManufacturerDeviceNumber>String</ManufacturerDeviceNumber>
<ModelName>String</ModelName>
<ModelNumber>String</ModelNumber>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<SerialNumber>String</SerialNumber>
</DeviceModel>