Platform API

<back to all web services

RegisterDevice

Saves/Updates a Devices details and registers that device with an appliance.

Requires Authentication
import 'package:servicestack/servicestack.dart';

class DeviceTypeModel implements IConvertible
{
    /**
    * Guid representing the saved Device Type
    */
    // @ApiMember(DataType="Guid", Description="Guid representing the saved Device Type", Name="DeviceTypeId", ParameterType="query")
    String? DeviceTypeId;

    /**
    * Guid representing the saved Device Class
    */
    // @ApiMember(DataType="Guid", Description="Guid representing the saved Device Class", Name="DeviceClassId", ParameterType="query")
    String? DeviceClassId;

    /**
    * The Device Class Name
    */
    // @ApiMember(DataType="string", Description="The Device Class Name", Name="DeviceClassName", ParameterType="query")
    String? DeviceClassName;

    /**
    * The Device Brand.
    */
    // @ApiMember(DataType="string", Description="The Device Brand.", Name="Brand", ParameterType="query")
    String? Brand;

    /**
    * The Device Model Name.
    */
    // @ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")
    String? ModelName;

    /**
    * The Device Form, e.g Phone | Tablet.
    */
    // @ApiMember(DataType="string", Description="The Device Form, e.g Phone | Tablet.", Name="FormFactor", ParameterType="query")
    String? FormFactor;

    /**
    * The Device Dimensions (Height x Width x Depth).
    */
    // @ApiMember(DataType="string", Description="The Device Dimensions (Height x Width x Depth).", Name="Dimensions", ParameterType="query")
    String? Dimensions;

    /**
    * The Device display resolution width in pixels.
    */
    // @ApiMember(DataType="int", Description="The Device display resolution width in pixels.", Name="DisplayResolutionWidthPixels", ParameterType="query")
    int? DisplayResolutionWidthPixels;

    /**
    * The Device display resolution height in pixels.
    */
    // @ApiMember(DataType="int", Description="The Device display resolution height in pixels.", Name="DisplayResolutionHeightPixels", ParameterType="query")
    int? DisplayResolutionHeightPixels;

    /**
    * The Device display width size in inches.
    */
    // @ApiMember(DataType="decimal", Description="The Device display width size in inches.", Name="DisplaySizeWidthInches", ParameterType="query")
    double? DisplaySizeWidthInches;

    /**
    * The Device display height size in inches.
    */
    // @ApiMember(DataType="decimal", Description="The Device display height size in inches.", Name="DisplaySizeHeightInches", ParameterType="query")
    double? DisplaySizeHeightInches;

    DeviceTypeModel({this.DeviceTypeId,this.DeviceClassId,this.DeviceClassName,this.Brand,this.ModelName,this.FormFactor,this.Dimensions,this.DisplayResolutionWidthPixels,this.DisplayResolutionHeightPixels,this.DisplaySizeWidthInches,this.DisplaySizeHeightInches});
    DeviceTypeModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DeviceTypeId = json['DeviceTypeId'];
        DeviceClassId = json['DeviceClassId'];
        DeviceClassName = json['DeviceClassName'];
        Brand = json['Brand'];
        ModelName = json['ModelName'];
        FormFactor = json['FormFactor'];
        Dimensions = json['Dimensions'];
        DisplayResolutionWidthPixels = json['DisplayResolutionWidthPixels'];
        DisplayResolutionHeightPixels = json['DisplayResolutionHeightPixels'];
        DisplaySizeWidthInches = JsonConverters.toDouble(json['DisplaySizeWidthInches']);
        DisplaySizeHeightInches = JsonConverters.toDouble(json['DisplaySizeHeightInches']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DeviceTypeId': DeviceTypeId,
        'DeviceClassId': DeviceClassId,
        'DeviceClassName': DeviceClassName,
        'Brand': Brand,
        'ModelName': ModelName,
        'FormFactor': FormFactor,
        'Dimensions': Dimensions,
        'DisplayResolutionWidthPixels': DisplayResolutionWidthPixels,
        'DisplayResolutionHeightPixels': DisplayResolutionHeightPixels,
        'DisplaySizeWidthInches': DisplaySizeWidthInches,
        'DisplaySizeHeightInches': DisplaySizeHeightInches
    };

    getTypeName() => "DeviceTypeModel";
    TypeContext? context = _ctx;
}

class DeviceHistoryModel implements IConvertible
{
    /**
    * Guid representing the current Device History
    */
    // @ApiMember(DataType="Guid", Description="Guid representing the current Device History", Name="DeviceHistoryId", ParameterType="query")
    String? DeviceHistoryId;

    /**
    * Guid representing the current Device History Device Configuration record.
    */
    // @ApiMember(DataType="Guid", Description="Guid representing the current Device History Device Configuration record.", Name="PrimaryDeviceHistoryDeviceConfigurationId", ParameterType="query")
    String? PrimaryDeviceHistoryDeviceConfigurationId;

    /**
    * The Device name.
    */
    // @ApiMember(DataType="string", Description="The Device name.", Name="DeviceName", ParameterType="query")
    String? DeviceName;

    /**
    * The Device operating system.
    */
    // @ApiMember(DataType="string", Description="The Device operating system.", Name="OperatingSystem", ParameterType="query")
    String? OperatingSystem;

    /**
    * The Device operating system version.
    */
    // @ApiMember(DataType="string", Description="The Device operating system version.", Name="OperatingSystemVersion", ParameterType="query")
    String? OperatingSystemVersion;

    /**
    * The Device IP Address.
    */
    // @ApiMember(DataType="string", Description="The Device IP Address.", Name="IpAddress", ParameterType="query")
    String? IpAddress;

    /**
    * Any Notes about the device.
    */
    // @ApiMember(DataType="string", Description="Any Notes about the device.", Name="Notes", ParameterType="query")
    String? Notes;

    /**
    * Total memory size available (in bytes).
    */
    // @ApiMember(DataType="string", Description="Total memory size available (in bytes).", Name="TotalMemorySize", ParameterType="query")
    int? TotalMemorySize;

    /**
    * The Network provider name.
    */
    // @ApiMember(DataType="string", Description="The Network provider name.", Name="CellularProviderName", ParameterType="query")
    String? CellularProviderName;

    /**
    * The Mobile Country Code the device is currently located in.
    */
    // @ApiMember(DataType="string", Description="The Mobile Country Code the device is currently located in.", Name="MobileCountryCode", ParameterType="query")
    String? MobileCountryCode;

    /**
    * The Mobile Network Code the device is currently using.
    */
    // @ApiMember(DataType="string", Description="The Mobile Network Code the device is currently using.", Name="MobileNetworkCode", ParameterType="query")
    String? MobileNetworkCode;

    /**
    * The Language Code Identifier that represents the language used on the device.
    */
    // @ApiMember(DataType="string", Description="The Language Code Identifier that represents the language used on the device.", Name="LanguageCodeIdentifier", ParameterType="query")
    String? LanguageCodeIdentifier;

    /**
    * The latitude the device was last located at.
    */
    // @ApiMember(DataType="double", Description="The latitude the device was last located at.", Name="Latitude", ParameterType="query")
    double? Latitude;

    /**
    * The longitude the device was last located at.
    */
    // @ApiMember(DataType="double", Description="The longitude the device was last located at.", Name="Longitude", ParameterType="query")
    double? Longitude;

    DeviceHistoryModel({this.DeviceHistoryId,this.PrimaryDeviceHistoryDeviceConfigurationId,this.DeviceName,this.OperatingSystem,this.OperatingSystemVersion,this.IpAddress,this.Notes,this.TotalMemorySize,this.CellularProviderName,this.MobileCountryCode,this.MobileNetworkCode,this.LanguageCodeIdentifier,this.Latitude,this.Longitude});
    DeviceHistoryModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DeviceHistoryId = json['DeviceHistoryId'];
        PrimaryDeviceHistoryDeviceConfigurationId = json['PrimaryDeviceHistoryDeviceConfigurationId'];
        DeviceName = json['DeviceName'];
        OperatingSystem = json['OperatingSystem'];
        OperatingSystemVersion = json['OperatingSystemVersion'];
        IpAddress = json['IpAddress'];
        Notes = json['Notes'];
        TotalMemorySize = json['TotalMemorySize'];
        CellularProviderName = json['CellularProviderName'];
        MobileCountryCode = json['MobileCountryCode'];
        MobileNetworkCode = json['MobileNetworkCode'];
        LanguageCodeIdentifier = json['LanguageCodeIdentifier'];
        Latitude = JsonConverters.toDouble(json['Latitude']);
        Longitude = JsonConverters.toDouble(json['Longitude']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DeviceHistoryId': DeviceHistoryId,
        'PrimaryDeviceHistoryDeviceConfigurationId': PrimaryDeviceHistoryDeviceConfigurationId,
        'DeviceName': DeviceName,
        'OperatingSystem': OperatingSystem,
        'OperatingSystemVersion': OperatingSystemVersion,
        'IpAddress': IpAddress,
        'Notes': Notes,
        'TotalMemorySize': TotalMemorySize,
        'CellularProviderName': CellularProviderName,
        'MobileCountryCode': MobileCountryCode,
        'MobileNetworkCode': MobileNetworkCode,
        'LanguageCodeIdentifier': LanguageCodeIdentifier,
        'Latitude': Latitude,
        'Longitude': Longitude
    };

    getTypeName() => "DeviceHistoryModel";
    TypeContext? context = _ctx;
}

class DeviceModel implements IConvertible
{
    /**
    * Guid representing the saved Device
    */
    // @ApiMember(DataType="Guid", Description="Guid representing the saved Device", Name="DeviceId", ParameterType="query")
    String? DeviceId;

    /**
    * Details of the Type of Device
    */
    // @ApiMember(DataType="DeviceTypeModel", Description="Details of the Type of Device", Name="DeviceType", ParameterType="query")
    DeviceTypeModel? DeviceType;

    /**
    * Current saved settings of the Device
    */
    // @ApiMember(DataType="DeviceHistoryModel", Description="Current saved settings of the Device", Name="CurrentHistory", ParameterType="query")
    DeviceHistoryModel? CurrentHistory;

    /**
    * The Device Model Name.
    */
    // @ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")
    String? ModelName;

    /**
    * The Device model number.
    */
    // @ApiMember(DataType="string", Description="The Device model number.", Name="ModelNumber", ParameterType="query")
    String? ModelNumber;

    /**
    * The Device serial number.
    */
    // @ApiMember(DataType="string", Description="The Device serial number.", Name="SerialNumber", ParameterType="query")
    String? SerialNumber;

    /**
    * The Device manufacturers number.
    */
    // @ApiMember(DataType="string", Description="The Device manufacturers number.", Name="ManufacturerDeviceNumber", ParameterType="query")
    String? ManufacturerDeviceNumber;

    /**
    * The Device MAC Address.
    */
    // @ApiMember(DataType="string", Description="The Device MAC Address.", Name="MacAddress", ParameterType="query")
    String? MacAddress;

    /**
    * 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.
    */
    // @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")
    int? InstanceSeed;

    /**
    * The current value of InstanceCounterLastValue that the device has stored
    */
    // @ApiMember(DataType="int", Description="The current value of InstanceCounterLastValue that the device has stored", IsRequired=true, Name="InstanceCounterLastValue", ParameterType="query")
    int? InstanceCounterLastValue;

    /**
    * ServiceStack ResponseStatus.
    */
    // @ApiMember(DataType="ResponseStatus", Description="ServiceStack ResponseStatus.", Name="ResponseStatus", ParameterType="query")
    ResponseStatus? ResponseStatus;

    DeviceModel({this.DeviceId,this.DeviceType,this.CurrentHistory,this.ModelName,this.ModelNumber,this.SerialNumber,this.ManufacturerDeviceNumber,this.MacAddress,this.InstanceSeed,this.InstanceCounterLastValue,this.ResponseStatus});
    DeviceModel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DeviceId = json['DeviceId'];
        DeviceType = JsonConverters.fromJson(json['DeviceType'],'DeviceTypeModel',context!);
        CurrentHistory = JsonConverters.fromJson(json['CurrentHistory'],'DeviceHistoryModel',context!);
        ModelName = json['ModelName'];
        ModelNumber = json['ModelNumber'];
        SerialNumber = json['SerialNumber'];
        ManufacturerDeviceNumber = json['ManufacturerDeviceNumber'];
        MacAddress = json['MacAddress'];
        InstanceSeed = json['InstanceSeed'];
        InstanceCounterLastValue = json['InstanceCounterLastValue'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DeviceId': DeviceId,
        'DeviceType': JsonConverters.toJson(DeviceType,'DeviceTypeModel',context!),
        'CurrentHistory': JsonConverters.toJson(CurrentHistory,'DeviceHistoryModel',context!),
        'ModelName': ModelName,
        'ModelNumber': ModelNumber,
        'SerialNumber': SerialNumber,
        'ManufacturerDeviceNumber': ManufacturerDeviceNumber,
        'MacAddress': MacAddress,
        'InstanceSeed': InstanceSeed,
        'InstanceCounterLastValue': InstanceCounterLastValue,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "DeviceModel";
    TypeContext? context = _ctx;
}

/**
* Saves/Updates a Devices details and registers that device with an appliance.
*/
// @Api(Description="Saves/Updates a Devices details and registers that device with an appliance.")
class RegisterDevice implements IConvertible
{
    /**
    * Guid of the Appliance this Device is Registering under.
    */
    // @ApiMember(DataType="Guid", Description="Guid of the Appliance this Device is Registering under.", IsRequired=true, Name="ApplianceId", ParameterType="query")
    String? ApplianceId;

    /**
    * Guid of the Device. If empty the Device will be inserted, if provided the device will be updated.
    */
    // @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")
    String? DeviceId;

    /**
    * The Device manufacturers number.
    */
    // @ApiMember(DataType="string", Description="The Device manufacturers number.", Name="ManufacturerDeviceNumber", ParameterType="query")
    String? ManufacturerDeviceNumber;

    /**
    * The Device MAC Address.
    */
    // @ApiMember(DataType="string", Description="The Device MAC Address.", Name="MacAddress", ParameterType="query")
    String? MacAddress;

    /**
    * The Device Model Name.
    */
    // @ApiMember(DataType="string", Description="The Device Model Name.", IsRequired=true, Name="ModelName", ParameterType="query")
    String? ModelName;

    /**
    * The Device Form, e.g Phone | Tablet.
    */
    // @ApiMember(DataType="string", Description="The Device Form, e.g Phone | Tablet.", IsRequired=true, Name="FormFactor", ParameterType="query")
    String? FormFactor;

    /**
    * The Device Brand.
    */
    // @ApiMember(DataType="string", Description="The Device Brand.", Name="Brand", ParameterType="query")
    String? Brand;

    /**
    * The Device Dimensions (Height x Width x Depth).
    */
    // @ApiMember(DataType="string", Description="The Device Dimensions (Height x Width x Depth).", Name="Dimensions", ParameterType="query")
    String? Dimensions;

    /**
    * The Device display resolution width in pixels.
    */
    // @ApiMember(DataType="int", Description="The Device display resolution width in pixels.", Name="DisplayResolutionWidthPixels", ParameterType="query")
    int? DisplayResolutionWidthPixels;

    /**
    * The Device display resolution height in pixels.
    */
    // @ApiMember(DataType="int", Description="The Device display resolution height in pixels.", Name="DisplayResolutionHeightPixels", ParameterType="query")
    int? DisplayResolutionHeightPixels;

    /**
    * The Device display width size in inches.
    */
    // @ApiMember(DataType="decimal", Description="The Device display width size in inches.", Name="DisplaySizeWidthInches", ParameterType="query")
    double? DisplaySizeWidthInches;

    /**
    * The Device display height size in inches.
    */
    // @ApiMember(DataType="decimal", Description="The Device display height size in inches.", Name="DisplaySizeHeightInches", ParameterType="query")
    double? DisplaySizeHeightInches;

    /**
    * The Device operating system.
    */
    // @ApiMember(DataType="string", Description="The Device operating system.", Name="OperatingSystem", ParameterType="query")
    String? OperatingSystem;

    /**
    * The Device operating system version.
    */
    // @ApiMember(DataType="string", Description="The Device operating system version.", Name="OperatingSystemVersion", ParameterType="query")
    String? OperatingSystemVersion;

    /**
    * The Device IP Address.
    */
    // @ApiMember(DataType="string", Description="The Device IP Address.", Name="IpAddress", ParameterType="query")
    String? IpAddress;

    /**
    * Any Notes about the device.
    */
    // @ApiMember(DataType="string", Description="Any Notes about the device.", Name="Notes", ParameterType="query")
    String? Notes;

    /**
    * Total memory size available (in bytes).
    */
    // @ApiMember(DataType="string", Description="Total memory size available (in bytes).", Name="TotalMemorySize", ParameterType="query")
    int? TotalMemorySize;

    /**
    * The Network provider name.
    */
    // @ApiMember(DataType="string", Description="The Network provider name.", Name="CellularProviderName", ParameterType="query")
    String? CellularProviderName;

    /**
    * The ISO Country Code of the country the device is currently located in.
    */
    // @ApiMember(DataType="string", Description="The ISO Country Code of the country the device is currently located in.", Name="ISOCountryCode", ParameterType="query")
    String? ISOCountryCode;

    /**
    * The Mobile Country Code the device is currently located in.
    */
    // @ApiMember(DataType="string", Description="The Mobile Country Code the device is currently located in.", Name="MobileCountryCode", ParameterType="query")
    String? MobileCountryCode;

    /**
    * The Mobile Network Code the device is currently using.
    */
    // @ApiMember(DataType="string", Description="The Mobile Network Code the device is currently using.", Name="MobileNetworkCode", ParameterType="query")
    String? MobileNetworkCode;

    /**
    * The Language Code Identifier that represents the language used on the device.
    */
    // @ApiMember(DataType="string", Description="The Language Code Identifier that represents the language used on the device.", Name="LanguageCodeIdentifier", ParameterType="query")
    String? LanguageCodeIdentifier;

    /**
    * The name of the Timezone the device was last used in.
    */
    // @ApiMember(DataType="string", Description="The name of the Timezone the device was last used in.", Name="LastKnownTimeZone", ParameterType="query")
    String? LastKnownTimeZone;

    /**
    * The UTC Offset of the Timezone the device was last used in.  Formatted as +-##:##
    */
    // @ApiMember(DataType="string", Description="The UTC Offset of the Timezone the device was last used in.  Formatted as +-##:##", Name="LastKnownTimeZoneOffset", ParameterType="query")
    String? LastKnownTimeZoneOffset;

    /**
    * The latitude the device was last located at.
    */
    // @ApiMember(DataType="double", Description="The latitude the device was last located at.", IsRequired=true, Name="Latitude", ParameterType="query")
    double? Latitude;

    /**
    * The longitude the device was last located at.
    */
    // @ApiMember(DataType="double", Description="The longitude the device was last located at.", IsRequired=true, Name="Longitude", ParameterType="query")
    double? Longitude;

    /**
    * The current value of InstanceSeed that the device has stored.
    */
    // @ApiMember(DataType="int", Description="The current value of InstanceSeed that the device has stored.", IsRequired=true, Name="InstanceSeed", ParameterType="query")
    int? InstanceSeed;

    /**
    * The current value of InstanceCounterLastValue that the device has stored
    */
    // @ApiMember(DataType="int", Description="The current value of InstanceCounterLastValue that the device has stored", IsRequired=true, Name="InstanceCounterLastValue", ParameterType="query")
    int? InstanceCounterLastValue;

    RegisterDevice({this.ApplianceId,this.DeviceId,this.ManufacturerDeviceNumber,this.MacAddress,this.ModelName,this.FormFactor,this.Brand,this.Dimensions,this.DisplayResolutionWidthPixels,this.DisplayResolutionHeightPixels,this.DisplaySizeWidthInches,this.DisplaySizeHeightInches,this.OperatingSystem,this.OperatingSystemVersion,this.IpAddress,this.Notes,this.TotalMemorySize,this.CellularProviderName,this.ISOCountryCode,this.MobileCountryCode,this.MobileNetworkCode,this.LanguageCodeIdentifier,this.LastKnownTimeZone,this.LastKnownTimeZoneOffset,this.Latitude,this.Longitude,this.InstanceSeed,this.InstanceCounterLastValue});
    RegisterDevice.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApplianceId = json['ApplianceId'];
        DeviceId = json['DeviceId'];
        ManufacturerDeviceNumber = json['ManufacturerDeviceNumber'];
        MacAddress = json['MacAddress'];
        ModelName = json['ModelName'];
        FormFactor = json['FormFactor'];
        Brand = json['Brand'];
        Dimensions = json['Dimensions'];
        DisplayResolutionWidthPixels = json['DisplayResolutionWidthPixels'];
        DisplayResolutionHeightPixels = json['DisplayResolutionHeightPixels'];
        DisplaySizeWidthInches = JsonConverters.toDouble(json['DisplaySizeWidthInches']);
        DisplaySizeHeightInches = JsonConverters.toDouble(json['DisplaySizeHeightInches']);
        OperatingSystem = json['OperatingSystem'];
        OperatingSystemVersion = json['OperatingSystemVersion'];
        IpAddress = json['IpAddress'];
        Notes = json['Notes'];
        TotalMemorySize = json['TotalMemorySize'];
        CellularProviderName = json['CellularProviderName'];
        ISOCountryCode = json['ISOCountryCode'];
        MobileCountryCode = json['MobileCountryCode'];
        MobileNetworkCode = json['MobileNetworkCode'];
        LanguageCodeIdentifier = json['LanguageCodeIdentifier'];
        LastKnownTimeZone = json['LastKnownTimeZone'];
        LastKnownTimeZoneOffset = json['LastKnownTimeZoneOffset'];
        Latitude = JsonConverters.toDouble(json['Latitude']);
        Longitude = JsonConverters.toDouble(json['Longitude']);
        InstanceSeed = json['InstanceSeed'];
        InstanceCounterLastValue = json['InstanceCounterLastValue'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApplianceId': ApplianceId,
        'DeviceId': DeviceId,
        'ManufacturerDeviceNumber': ManufacturerDeviceNumber,
        'MacAddress': MacAddress,
        'ModelName': ModelName,
        'FormFactor': FormFactor,
        'Brand': Brand,
        'Dimensions': Dimensions,
        'DisplayResolutionWidthPixels': DisplayResolutionWidthPixels,
        'DisplayResolutionHeightPixels': DisplayResolutionHeightPixels,
        'DisplaySizeWidthInches': DisplaySizeWidthInches,
        'DisplaySizeHeightInches': DisplaySizeHeightInches,
        'OperatingSystem': OperatingSystem,
        'OperatingSystemVersion': OperatingSystemVersion,
        'IpAddress': IpAddress,
        'Notes': Notes,
        'TotalMemorySize': TotalMemorySize,
        'CellularProviderName': CellularProviderName,
        'ISOCountryCode': ISOCountryCode,
        'MobileCountryCode': MobileCountryCode,
        'MobileNetworkCode': MobileNetworkCode,
        'LanguageCodeIdentifier': LanguageCodeIdentifier,
        'LastKnownTimeZone': LastKnownTimeZone,
        'LastKnownTimeZoneOffset': LastKnownTimeZoneOffset,
        'Latitude': Latitude,
        'Longitude': Longitude,
        'InstanceSeed': InstanceSeed,
        'InstanceCounterLastValue': InstanceCounterLastValue
    };

    getTypeName() => "RegisterDevice";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
    'DeviceTypeModel': TypeInfo(TypeOf.Class, create:() => DeviceTypeModel()),
    'DeviceHistoryModel': TypeInfo(TypeOf.Class, create:() => DeviceHistoryModel()),
    'DeviceModel': TypeInfo(TypeOf.Class, create:() => DeviceModel()),
    'RegisterDevice': TypeInfo(TypeOf.Class, create:() => RegisterDevice()),
});

Dart RegisterDevice DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsv/reply/RegisterDevice HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	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/jsv
Content-Length: length

{
	DeviceType: 
	{
		DeviceClassName: String,
		Brand: String,
		ModelName: String,
		FormFactor: String,
		Dimensions: String,
		DisplayResolutionWidthPixels: 0,
		DisplayResolutionHeightPixels: 0,
		DisplaySizeWidthInches: 0,
		DisplaySizeHeightInches: 0
	},
	CurrentHistory: 
	{
		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
		}
	}
}